STM32MP13XX Custom Bootloader issue
- February 19, 2026
- 3 replies
- 303 views
Hello! I'm attempting to build a custom bootloader for the STM32MP133C, heavily reliant upon the STM32MP13XX hal layer and then provided cmsis_core and cmsis_device_mp13 packages/pieces.
I'm attempting this on IAR (company decision) which has added some wrinkles to this. I load the main application to the NAND flash using a custom flashloader, and then run the Bootloader code from sysram. Can't do both at the same time because IAR's flash loader uses the sysram.
The bootloader initializes the necessary items- the HAL, system clock, DDR, UART, Flash, Ethernet, etc. I have it blink an LED 5 times for fun, and then load the .bin file from flash into a specific offset in the DDR, where I'm hoping to run from. I then set a function pointer to the starting location of the main app, and run that function pointer. It looks pretty simple/straightforward, as shown below:
GetApplicationDetails(flash); //loads from flash to DDR.
void (*p_AppEntryPoint)(void);
//boot the full OS
p_AppEntryPoint = reinterpret_cast<void(*)(void)>(DDR_START+DDR_OFFSET); //0xC0000000 + 0xA838
p_AppEntryPoint();
However, the app isn't running. I should be seeing the telltale lights of flashing LEDs, but no such luck. Am I missing something obvious? I see some examples have to reset/configure the stack pointer, but others don't, so I don't know if there's something common to the typical STM32 linking that I'm missing.
Thanks for your time/help!
