Skip to main content
STura.1
Associate
April 30, 2020
Question

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

  • April 30, 2020
  • 3 replies
  • 996 views

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.

This topic has been closed for replies.

3 replies

DCtech
Associate III
April 30, 2020

Did you change FLASH.ld file your application code?

STura.1
STura.1Author
Associate
April 30, 2020

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
STura.1Author
Associate
April 30, 2020

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