AnsweredAssumed Answered

BOOTLOADER- How to jump....

Question asked by on May 9, 2017
Latest reply on May 13, 2017 by

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

#define 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);




Inside the system_stm32f4xx.c of the Testapp located @ 0x08040000 I modified the line:

#define 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).