I am using STM32F427 microcontroller,I have couple of binaries(lets consider bootloader and Application) converted to hex and combined in intel format. I am flashing intel format hex image to flash. I wanted to jump from bootloader to Application. My start address of bootloader and Application are 0x08000000 and 0x081C0000 respectively. Now I wanted to know procedure to jump. I tried modifying the start_xxx.s
LDR R0, =SystemInit BLX R0 LDR R0, =__main BX R0 ENDP
replaced main with 0x081C0000, but failed. Secondly tried updating the VECT_TAB_OFFSET in system.c to 0x001C0000
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; but this too failed.
Like to know anyother methods to jump it in flash itself and any examples to copy flash to RAM
You can't jump to 0x081C0000 it's a vector table, not executable code. Thumb instructions also get referred by odd addresses, not even ones. Do you have any grasp of the processor you are using? Honestly it helps if you do. There are manuals and books you might find educational. Please also read posting instructions/tips
LDR R0, =0x081C0000 ; APP FLASH BASE LDR SP,[R0, #0] ; Initial Stack Pointer LDR R0,[R0, #4] ; Initial Program Counter BX R0