cancel
Showing results for 
Search instead for 
Did you mean: 

Jump to another application in Flash memory on stm32f4-discovery board

slaviuspan
Associate II
Posted on February 24, 2017 at 14:25

How to jump to another application in Flash memory on stm32f4-discovery board? Can anyone give complete ibstruction step by step? I have already written bin file to flash. Now I want only to run it. I looked through manu forums and saw a lot of advises, but my project doesn't work.

It is one of the examples I've seen:

static void boot_jump(uint32_t address) {

typedef  void (*pFunction)(void);

pFunction Jump_To_Application;

uint32_t JumpAddress;

if (((*(__IO uint32_t*)ApplicationAddress) & 0x2FFE0000 ) == 0x20000000)

    {

      JumpAddress = *(__IO uint32_t*) (ApplicationAddress + 4); 

      Jump_To_Application = (pFunction) JumpAddress;       

      __set_MSP(*(__IO uint32_t*) ApplicationAddress);             

      Jump_To_Application();                                                   

    }

}

It is in first default application. And In another target application I modified file system_stm32f4xx.c:

#define VECT_TAB_SRAM

#define VECT_TAB_OFFSET  0x10000 /*!< Vector Table base offset field.

                                   This value must be a multiple of 0x200. */

I also modified options for Target-Target IROM1: 0x8010000 SIze 0x8000

and Linker: Disable 'Use Memory Layout from Target Dialog' and R/O Base:0x8010000

1 REPLY 1
Posted on February 24, 2017 at 14:36

Ok so you are at a point where you need to examine what you have created. Run your debugger and step across the transition.

You should not be using interrupts.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..