Skip to main content
Graduate
December 6, 2025
Question

first-stage bootloader for a custom STM32MP13 board with no SD and no JTAG?

  • December 6, 2025
  • 7 replies
  • 256 views

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:

  1. USB DFU alone cannot flash first-stage bootloader (SPL) to eMMC on a totally blank STM32MP135.

  2. This is not a dfu-util bug — it’s how the STM32MP1 ROM works.

  3. 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.

    This topic has been closed for replies.

    7 replies

    Technical Moderator
    December 8, 2025

    Hi @cbcooper 

    chatGPT is two times wrong (btw, did you try sidekick chat on this page ?):

    • eMMC FSBL is fully supported and vastly used by customers.
    • For MPU lines (all STM32MPxxx), flashing is NOT done with JTAG, but with USB. JTAG is only for debug.

     

    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  

    PatrickF_0-1765178359045.png

     

    see also https://wiki.st.com/stm32mpu/wiki/STM32_MPU_ROM_code_overview#Boot_from_e-E2-80-A2MMC-E2-84-A2

    and

    https://wiki.st.com/stm32mpu/wiki/STM32_MPU_ROM_code_overview#Boot_device_selection_on_STM32MP1_series

     

    Regards

     

    cbcooperAuthor
    Graduate
    December 8, 2025

    How can I get my first-stage bootloader onto the MMC?

    If I execute 

    dfu-util -l

    it 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.bin

    it 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 writeable

    If instead I run STM32CubeProgrammer and select USB and hit Connect it seems happy:

    cbcooper_0-1765204529457.png

    but where I go from there I have no idea.

    What's my best path for programming the SPL onto the MMC?

    Technical Moderator
    December 8, 2025

    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.

     

    cbcooperAuthor
    Graduate
    December 8, 2025

    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:

    cbcooper_1-1765205685071.png

     

     

    cbcooperAuthor
    Graduate
    December 8, 2025

    The chat button in the lower-right corner isn't happy:

    cbcooper_0-1765205821007.png

    Is that what you meant by "sidekick chat on this page"?

    Super User
    December 8, 2025

    @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:

    AndrewNeil_0-1765206290501.png

    How to use STM32 Sidekick

    cbcooperAuthor
    Graduate
    December 8, 2025

    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:

    cbcooper_0-1765212724170.png

     

    cbcooperAuthor
    Graduate
    December 8, 2025

    The command line version also failed, but at least gave an error:

    cbcooper_0-1765214675172.png

     

    cbcooperAuthor
    Graduate
    December 8, 2025

    ChatGPT thinks this failure is because "Some signed images (like FSBLA_eMMC_A7_Signed.bin) expect the chip to be in “boot from eMMC” mode to be written correctly" and my chip is in serial boot mode.

    It says I should look for a “First Time eMMC Programming Guide” with a special FSBLA loader + configuration file.

     

    cbcooperAuthor
    Graduate
    December 8, 2025

    BTW, I'm hoping to write the application under Zephyr, we don't need full Linux for what we're doing.

    Technical Moderator
    December 9, 2025

    Hi @cbcooper 

    did you already checked the board DDR is working fine using https://wiki.st.com/stm32mpu/wiki/STM32DDRFW-UTIL ?

     

    Regards.

    cbcooperAuthor
    Graduate
    December 9, 2025

    A couple of problems with STM32DDRFW-UTIL -

    1) The documentation says "Set the correct boot pins on your board in either Engineering mode or Boot from SD" and my board is set to serial boot.  I can unsolder & resolder the pads to switch the boot mode but that's a non-trivial operation.

    2) All of the test files (both source code and binaries) are hardware-specific.  So, for example, the STM32MP135C-DK code might work on my STM32MP135A (not a DK) and might not.