cancel
Showing results for 
Search instead for 
Did you mean: 

How to jump from one application to another application located at different location

STura.1
Associate II

Hi,

i'm using STM32H743  Nucleo Board, I'm new to it,

  1. first I want to know can we flash two executable's on two different location of flash memory?
  2. If yes, then trying to jump from one application located at 0x08000000 to another application located at 0x08020000 location. I tried it by changing linker script flash address to 0x08020000 for another application. but it can not worked for me. program is like this,

void (*Jump_To_application)(void);

volatile uint32_t BootAddr = 0x08020000;

void jump_To_sector()

{

/* Disable all interrupts */

__disable_irq();

/* Disable Systick timer */

SysTick->CTRL = 0;

SysTick->LOAD = 0;

SysTick->VAL = 0;

/* Set the clock to the default state */

HAL_RCC_DeInit();

SCB->VTOR = BootAddr;

Jump_To_application = (void (*)(void)) (*((uint32_t *) ((BootAddr + 4))));

__set_MSP(*(__IO uint32_t*)BootAddr);

Jump_To_application();

}

Please help me here to solve this.

Thanks in advance.

3 REPLIES 3
DCtech
Associate II

Did you change FLASH.ld file your application code?

STura.1
Associate II

yes, I changed Flash.ld file also.

this is the memory map

/* Specify the memory areas */

MEMORY

{

DTCMRAM (xrw)   : ORIGIN = 0x20000000, LENGTH = 128K

RAM_D1 (xrw)   : ORIGIN = 0x24000000, LENGTH = 512K

RAM_D2 (xrw)   : ORIGIN = 0x30000000, LENGTH = 288K

RAM_D3 (xrw)   : ORIGIN = 0x38000000, LENGTH = 64K

ITCMRAM (xrw)   : ORIGIN = 0x00000000, LENGTH = 64K

FLASH (rx)   : ORIGIN = 0x08020000, LENGTH = 1024K

}

STura.1
Associate II

is there anything I need to change in FLASH.ld file? please let me know if any.