BOOTLOADER- How to jump....
Dear Community,
I want to implement a boot loader routine located in the first flash sector (0x8000000) of a stm32F407 device. After power up the bootloader decides whether the program pointer can jump to the main app located @ 0x8004000 or stay within the boot loader routine.
I managed so far to upload a bootloader interface and an app to the desired memory locations. Then I was copy and pasting the following code from
https://community.st.com/0D50X00009XkYMHSA3
:&sharpdefine APPLICATION_ADDRESS (uint32_t)0x08040000
typedef void (*pFunction)(void);
pFunction Jump_To_Application;
uint32_t JumpAddress;
//…
case StartUP:
// Jump to user application
JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);
Jump_To_Application = (pFunction) JumpAddress;
// Initialize user application's Stack Pointer
__set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);
Jump_To_Application();
break;
Inside the system_stm32f4xx.c of the Testapp located @ 0x08040000 I modified the line:
&sharpdefine VECT_TAB_OFFSET 0x40000
Since the post in mentioned forum (see above) mentioned this script has to work I would be very happy if someone could comment on this (unfortunately in my case it does not work).
null