Cutom bootloader STM32u575
Hello,
I am trying to realise my own bootloader on my STM32U575 and have found the following article:
https://community.st.com/t5/stm32cubeide-mcus/stm32u575-custom-bootloader-bootloader/td-p/584218
Unfortunately this does not work for me.
I am using a STM32u575VGT and the following code:
- Function at main.c
static void _bootJumpToFirmware() {
typedef void (*pFunction)(void);
#define APPLICATION_ADDRESS 0x0803C000
pFunction JumpToApplication;
JumpToApplication = (pFunction) (*(volatile uint32_t*) (APPLICATION_ADDRESS + 4));
__set_MSP(*(uint32_t*) APPLICATION_ADDRESS);
JumpToApplication();
}- STM32U575VGTX_FLASH.ld in bootloader project
/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 768K
SRAM4 (xrw) : ORIGIN = 0x28000000, LENGTH = 16K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 240K
}- STM32U575VGTX_FLASH.ld in main project
/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 768K
SRAM4 (xrw) : ORIGIN = 0x28000000, LENGTH = 16K
FLASH (rx) : ORIGIN = 0x0803C000, LENGTH = 784K
}ICACH is disabled.
I have flashed the main project and the bootloader project and checked with the STM32CubeProgrammer that from 0x8000000 or from 0x0803C000 code is contained in the flash with the expected code length.
When I start the controller, I can see that the bootloader is running (with LEDs on my board) and at the point where it should jump to the firmware, the controller seems to stop or the firmware does not start.
What can I investigate to find the problem?
