Question
Jump address to choose one of 2 binary in flash
Posted on April 03, 2014 at 17:49
Hello,
I'm trying to create a bootloader into the component STM32f106RDT with 384KO of Flash. I have mapped the memory like this: 0x08000000 - 0x0802DFFF for main software (first binary) 0x0802F000 - 0x08030FFF reserved 0x08031000 - 0x0805FFFF for the temp binary (second binary) My function of bootloader() to jump at selected main address is in flash. When I debug with keil the pc is in the file startup_stm32f10x_hd.s, then i want to go into my function bootloader so IMPORT the function like this : ; Reset handler Reset_Handler PROC EXPORT Reset_Handler [WEAK] IMPORT __main IMPORT SystemInit IMPORT FLASH_Bootloader /*my add*/ LDR R0, =SystemInit BLX R0 LDR R0, =FLASH_Bootloader /*my add*/ BLX R0 /*my add*/ ;LDR R0, =__main ;BX R0 ENDP The problem is that i want to jump on one of the two binary file. How do i get the flash address of the main() function? If i jump on 0x08000000+4 the beginning of the first binary mapping it does nothing. Somebody have an idea to select one of my 2 apps and run it? Thank you. #stm32 #bootloader