Forums › Devices › OSD32MP15x › tutorial broken
Tagged: mmc tutorial sdcard patch
I’ve followed the STM32MP1 CubeMX Tutorial for OSD32MP15x, and well it doesn’t work. I think it is because the patching instructions aren’t included in the tutorial so you end up with something that doesn’t work. “Error: Message from Embedded Flash Loader : mmc device 0 not found” This is likely because the missing sdcard detect pin? among other things not compatible with DK2.
Why are the patch files necessary? I really don’t mind downloading an already patched Developer-Package with the files for CubeProgrammer.
You all need to improve this tutorial. And be sure you do it yourself from scratch without making assumptions. Without it, I can’t bring the board and make pin modification, and can’t demo it to the company I work for, which could equate to a nice number of CPU sales for you.
Thanks
Hi Orocle,
We just published an updated version of that App Note on 11/28. It has been updated for the version 6 of CubeMX and V2.0 of the OpenSTLinux Kernel.
Please take a look at the new version with new CubeMX files and see if that helps solve your problem.
Thanks,
Greg
Hi Greg,
There are no relevant updates to what I describe here. The problem is when flashing the SD with the starter pack as it is described in section 5 of the tutorial doesn’t work. If I understand correctly it is because the starter pack needs to be patched first with the files from https://github.com/octavosystems/BRK_Developer_Package_patches which includes a compilation step which seems to be loosely described.
My question is why can’t you patch and compile the starter pack and make that available instead so that one can upgrade the Developer Package?
The primary goal of this exercise a custom device tree. It seems that there are a few unnecessary steps or information as to why they are necessary.
Thank you
“Flashing and upgrading SD card
Before you can use the custom device tree files generated from CubeMX, you need to first flash a SD card with OpenSTLinux Starter Package. ” …
“Step 1: Flashing the SD Card
To use a custom Device Tree, it is necessary to upgrade OpenSTLinux Starter Package (openstlinux-20-06-24 at the time of writing) to Developer Package. To do this, please complete the following steps:” …
Hi Orocle,
We actually do offer an Developer Package image for the BRK here. That should allow up to skip the starter to developer upgrade steps. I think that should get you what you need.
The Application note is written with the DK2 as a starting point so yes there are differences for the different boards.
I hope that helps.
Thanks,
Greg
Hi Greg,
Another improvement to this tutorial would be a process flow similar to the one below, which is probably wrong, but it gives a person an idea of the parts to all this. For example, there is no information that the patch files need to applied prior to compiling and that the patch files add the default device tree which seems to not be the min_config from cubeMX.
I now get a new set of errors while compiling and I suspect it is because the patch files are broken, or some other step is missing. See the error below.
Considering that a custom device tree is likely critical to working with this part, it should be easier. For example, I want to enable FDCAN2 because my application requires FDCAN1 and FDCAN2 and later I will need TFT configured. It seems what is really a must is the source files already patch for osd32mp1 from the developer package and all one needs is to generate the device tree from CubeMX and replace it for each image(TF-A,U-boot,Kernel). This is a really nice part, it would a shame not to have something like this be standard. I will eventually be able to align all this and keep it as a close secret, but that doesn’t help anyone else after.
Any help is appreciated.
Thank you
– PROCESS FLOW –
1. Get CubeMx and install it
2. Get the device tree and open it from CubeMX, may need to migrate
3. Generate from CubeMX
4. Get developer package and extract it
5. Copy the generated files from CubeMX to each image
6. Get the patch files and copy them to each image, replacing prior makefile.sdk
7. Apply the patches – see howto file in each image
8. Compile each image – see howto file in each image
– COMPILATION ERROR –
DTC arch/arm/dts/stm32mp157c-osd32mp1-brk.dtb
Error: arch/arm/dts/.stm32mp157c-osd32mp1-brk.dtb.pre.tmp:1017.1-7 Label or path optee not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:308: recipe for target ‘arch/arm/dts/stm32mp157c-osd32mp1-brk.dtb’ failed
Hello Orocle,
Please give us the following information so that we can debug the issue better:
1. Which development platform are you using? OSD32MP1-BRK or ST’s DK2?
2. Which Linux image are you using? ST’s DK2 Starter Image or OSD32MP1-BRK OpenSTLinux?
While it is clearly apparent which board and image are in question from the prior posts, here it is again.
OSD32MP1-BRK and OSD32MP1-BRK OpenSTLinux. No DK2 whatsoever.
Why would I be looking here for DK2 information? And this is a sincere question not rhetorical.
Thank you
Hello Orocle,
1. Why would I be looking here for DK2 information? And this is a sincere question not rhetorical.
[Octavo]: Sorry for the inconvenience.
The CubeMX Tutorial was first published in June 2019. At that time OSD32MP1-BRK was not yet available to the public. Hence, we chose a STM32MP15x platform (DK2) that was easily available as the platform for this tutorial.
The overall flow of configuring the device trees and the tools used (CubeMX, CubeProgrammer, OpenSTLinux SDK etc) are same
for both STM32MP15x and OSD32MP15x.
CubeMX app note is intended to help customers become familiar with the overall flow of configuring device trees. We are currently working on a BRK specific version of CubeMX app note. We will release it soon.
2. I’ve followed the STM32MP1 CubeMX Tutorial for OSD32MP15x, and well it doesn’t work. I think it is because the
patching instructions aren’t included in the tutorial so you end up with something that doesn’t work.
“Error: Message from Embedded Flash Loader : mmc device 0 not found” This is likely because the missing
sdcard detect pin? among other things not compatible with DK2.
[Octavo]: The OpenSTLinux Starter Package suggested in the tutorial is for DK2. The chip detect pins for DK2 and BRK boards
are different. The Flash Loader is unable to detect mmc0 because it is looking for chip detect signal on the wrong pin.
To bring up OSD32MP1-BRK successfully, we recommend following the steps under section 5.2 of
BRK Getting Started Guide (https://octavosystems.com/app_notes/osd32mp1-brk-getting-started/).
We do provide OpenSTLinux and Debian options. Choose OpenSTLinux for this exercise.
Note: In order to flash BRK using instructions from CubeMX tutorial, you need the BRK specific .tsv file and Device Tree files.
The correct .tsv file can be found under “Cube Programmer Support” here – https://github.com/octavosystems/BRK_Developer_Package_patches.
The BRK specific Device Tree binaries can be built after applying the given patches to OpenSTLinux Developer Package as described here – https://github.com/octavosystems/BRK_Developer_Package_patches.
The patches actually take care of several steps described in the tutorial (thereby helping you skip them):
– Generating board specific device trees
– Placing the source device trees in respective directories in the developer environment
– Modifying makefiles suitably to account for the new device tree source files etc.
3. – COMPILATION ERROR –
DTC arch/arm/dts/stm32mp157c-osd32mp1-brk.dtb
Error: arch/arm/dts/.stm32mp157c-osd32mp1-brk.dtb.pre.tmp:1017.1-7 Label or path optee not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:308: recipe for target ‘arch/arm/dts/stm32mp157c-osd32mp1-brk.dtb’ failed
[Octavo]: As mentioned in the “Requirements” table of https://github.com/octavosystems/BRK_Developer_Package_patches, the
patches require these specific versions of Developer Package, SDK, U-Boot etc. Please double check the version of your Developer
Package. Using v2.0.0 (instead of the latest version) should resolve the issue. You can find Dev Package v2.0.0 under section 2.1 of
ST Wiki’s Archives – https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package_-_Linux_kernel#Archives
4. For example, I want to enable FDCAN2 because my application requires FDCAN1 and FDCAN2 and later I will need TFT configured.
It seems what is really a must is the source files already patch for osd32mp1 from the developer package and all one needs is
to generate the device tree from CubeMX and replace it for each image(TF-A,U-boot,Kernel).
[Octavo]: As mentioned in the Caveats of CubeMX tutorial, CubeMX does not allow us to fully configure all peripherals through its GUI. For example, it does not support configuration of STPMIC1 PMIC or let us set chip detect GPIO pin for uSD card. Such settings require manual configuration and validation.
The output of CubeMX should be used as a starting point only if you’re building DT from scratch. Otherwise, you can use it as a reference.
If you want to enable FDCANx for BRK (for which DT is already provided), we recommend using the Device Tree generated by CubeMX as a reference to modify the provided Device Tree for BRK. You can copy/paste the FDCAN related nodes from CubeMX DT to BRK’s DT and set other tags/properties under “USER CODE” suitably (if necessary).
Thank you for all the suggestions. We will make sure to capture and address all your concerns in the upcoming BRK specific CubeMX tutorial to ensure better development experience for other customers.
Please let us know if you have any other concerns.
Thank you @Eshtaartha. I appreciate your recommendation.
Hello,
To confirm, these patches won’t work with the latest install for the developers package? Assuming we follow the install instructions from ST.
Is there any instructions for applying the patches in the correction fashion to avoid ‘hunk failed’ errors?
Hello @mlarkin,
We have not tested the patches for OSD32MP1-BRK on latest version of Developer Package from ST.
We will update the “Requirements” section of BRK patches Git page (https://github.com/octavosystems/BRK_Developer_Package_patches) once the BRK patches are updated to work on the latest Developer Package. No instructions are available at the moment.
Please follow our twitter handle @octavosystems to get quickly notified about any new updates.
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields