2025-12-06 8:20 AM - last edited on 2025-12-06 9:36 AM by Andrew Neil
The board was designed incorrectly, they have pins for a JTAG but forgot to actually route them to the MPU. The eMMC is not going to have a first-stage bootloader on it, and it's looking like it's not possible to flash an SPL to the eMMC over USB alone? Management won't be happy to do another board spin but it's sure looking like that's the only path forward.
ChatGPT says:
USB DFU alone cannot flash first-stage bootloader (SPL) to eMMC on a totally blank STM32MP135.
This is not a dfu-util bug — it’s how the STM32MP1 ROM works.
You need hardware access to write SPL + U-Boot to eMMC:
Option A: SWD / JTAG (ST-LINK)
CubeProgrammer can directly write SPL + U-Boot to eMMC.
Option B: SD card boot
The ROM can load a SPL + U-Boot image from SD into RAM and then copy it to eMMC.
2025-12-07 11:20 PM
Hi @cbcooper
chatGPT is two times wrong (btw, did you try sidekick chat on this page ?):
Some information on eMMC flashlayout here : https://wiki.st.com/stm32mpu/wiki/TM32CubeProgrammer_flashlayout#e-E2-80-A2MMC
eMMC boot has few HW constrains, please check if your board is aligned with AN5474 - Getting started with STM32MP13x lines hardware development
see also https://wiki.st.com/stm32mpu/wiki/STM32_MPU_ROM_code_overview#Boot_from_e-E2-80-A2MMC-E2-84-A2
and
Regards
2025-12-08 6:41 AM
How can I get my first-stage bootloader onto the MMC?
If I execute
dfu-util -lit responds
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Found DFU: [0483:df11] ver=0200, devnum=11, cfg=1, intf=0, path="2-1.3.2.1.1", alt=1, name="@virtual /0xF1/1*512Ba", serial="002100123232510738323637"
Found DFU: [0483:df11] ver=0200, devnum=11, cfg=1, intf=0, path="2-1.3.2.1.1", alt=0, name="@FSBL /0x01/1*128Ke", serial="002100123232510738323637"so my card is connected.
If I try to write the SPL to the MMC using
dfu-util.exe -a 0 -s 0x08000000:leave -D spl\u-boot-spl.binit fails with
Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Warning: DfuSe option used on non-DfuSe device
Device returned transfer size 1024
DfuSe interface name: "FSBL "
Downloading element to address = 0x08000000, size = 93818
Last page at 0x08016e79 is not writeableIf instead I run STM32CubeProgrammer and select USB and hit Connect it seems happy:
but where I go from there I have no idea.
What's my best path for programming the SPL onto the MMC?
2025-12-08 6:54 AM
Regarding the interface between the MPU and the MMC - we're using a THGBMTG5D1LBAIL and it mostly matches the example in section 8.9 "eMMC Flash" of AN5474 except that it's connected in 4 bit mode (D4..D7 unconnected).
The boot pins on the MPU don't seem to match any of the connection examples:
2025-12-08 6:57 AM
The chat button in the lower-right corner isn't happy:
Is that what you meant by "sidekick chat on this page"?
2025-12-08 6:58 AM
Hi,
trying to help, but there is no simple answer, and I'm not expert on this.
If using the STM32MP13 in bare-metal (i.e. using STM32CubeMP13 HAL SW), please look at https://wiki.st.com/stm32mpu/wiki/How_to_load_and_start_STM32CubeMP13_applications_via_eMMC_storage
If you want to use OpenSTLinux, then you should build full custom board image (using Yocto) and use Cubeprogrammer with adequate Flashlayout for eMMC (see https://wiki.st.com/stm32mpu/wiki/TM32CubeProgrammer_flashlayout#e-E2-80-A2MMC).
Note that u-boot SPL is not supported as FSBL. you must use TF-A
https://wiki.st.com/stm32mpu/wiki/Boot_chain_overview#STM32MP13_boot_chain
Regards.
2025-12-08 7:05 AM
@cbcooper wrote:The chat button in the lower-right corner isn't happy:
Sometimes, logging-out from the forum and then logging back in can help...
The "Sidekick" button looks like this:
2025-12-08 7:42 AM - edited 2025-12-08 7:44 AM
Regarding dfu-util, you first need to load TF-A into the internal RAM, then this binary will initialize the DDR.
Then you could load uBoot (FIP).
It is not usually foreseen for Flashloading (but uBoot can do flashloading, cube programmer is using uBoot to flash).
https://wiki.st.com/stm32mpu/wiki/How_to_load_U-Boot_with_dfu-util#On_STM32MP1-lines
Similar could be done with Cubeprogrammer.
https://wiki.st.com/stm32mpu/wiki/How_to_load_U-Boot_with_STM32CubeProgrammer
As it is a new board, with a newly customized FW, I encourage you to look in parallel at UART console for any messages (proving correct execution or giving errors).
Regards.
2025-12-08 8:52 AM
I learned that one of our EEs modified the board so it's now jumpered to serial boot mode (which is good).
But when I try to follow "How to load and start STM32CubeMP13 applications via eMMC storage" I run into a couple of problems.
First of all, that document says to "Select Binaries path with the Browse button: Firmware\Projects\STM32MP13XX_CUSTOM_HW\External_Loader\MMC_Ext_Loader" but if I do that and click Download, it gives the error "File does not exist: STM32Cube_FW_MP13_V1.2.0\Projects\STM32MP13XX_CUSTOM_HW\External_Loader\EMMC_Ext_Loader
\External_Mem_Loader_A7.stm32".
The correct path (I believe) is STM32Cube_FW_MP13_V1.2.0\Projects
\STM32MP13XX_CUSTOM_HW\External_Loader\Prebuild_Binaries\EMMC_Ext_Loader
But when I fix the path and click Download, it chugs for a while and then freezes:
2025-12-08 9:24 AM
The command line version also failed, but at least gave an error: