i am currently using stm32f103C8, i want to build a custom bootloader in address 0x8000000 and my application will placed in 0x8008000.
in cortex M4 (stm32f407vgtx) i manage to jump to address 0x8008000 with these code
but these code seem doesn't work in cortex M3, i tried a few modification. like bellow, it doesn't work either. i am sure my application already in place. i check address 0x8008000 during debug, my binary app was already there, and yes i compile it with address 0x8008000
and if i do without calling Jump_To_Application() my bootloader back to main again after all statement in if block is executed. i have no idea why. what do you think?
Re: [ASK] jump to specific address in STM32 Cortex-M3
i tried to dig deeper, i break down the different hex from STM32f103 and STMF407, bellow is the hex i break down base on intel hex format. i found very interesting fact, that changes of ROM address in keil make no effect for stm32f103 (generated hex is exactly the same), but it has effect on stm32f407. i assume that start address in stm32f407's hex change (0000 and 8000) and i think jump command has also pointed to different location (9D01 and 9D81. i have not found a way to change ROM for stm32f1 yet, any idea?
yah, it is the value from memory address (APPLICATION_ADDRESS or MAIN_FLASH_OFFSET). when i debug, it already has the correct value, if not, it would not be executed at the first time, i mean there is an if to make sure stack pointer has correct offset from 0x20000000
Code:
if (((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0x2FFE0000 ) == 0x20000000){
//something here
}