2016-12-12 06:45 AM
Hello everyone,
I am trying to developp a bootloader but I got some issues, My application is working well.
With my bootloader I read an usb key and program the content of the hex file into the flash (this step work).
The entry point of the application is the adress 0x0800BA00.
When my application is writed in flash, I set the vector register (SCB->VTOR = (uint32_t)0x0800BA00)
Then I tried to jump to the app :
JumpAddress = *(__IO uint32_t*) (0X0800BA04);
JumpToApplication = (pFunction) JumpAddress;__set_MSP(*(__IO uint32_t*) 0X0800BA00);
JumpToApplication();
Unfortunately this doesn't work.
Idon't know if I've forget some steps or what could be wrong ? Do you have any ideas ?
Thank you !
Dorian
2016-12-12 07:55 AM
Can you step into and through the code in a debugger and see where it goes? That 'it doesn't work' doesn't convey much information about what does happen, and why.
The code needs to be built (linked) to use the address you choose.
What STM32 part are you using? The make hundreds, and they can be quite different.
Please review threads describing near identical symptoms.
2016-12-13 02:22 AM
Hi Clive !
Thank you for your answer.
i have write some thread on the subject but couldn't find an answer to my issue.
If I go into the code through the debugger stopping at the jump instruction I got this assembly code
BLX R3 (R15 <= 803C76CH)
R15 is the Program counter and normally my jump should go to the adress I specified. I don't understand well why this wrong adress (803C76C) is taken.
My application linker is writted to start at the address i specified (0800BA00).
I am using a STM32F205VE.
Thank you for your time.
2016-12-15 03:29 AM
Well !
After investigation, I'm able to boot on a simple blink application.
But as soon as I enable the IT the app crash (but work without the bootloader).
Probably the IT vector table isn't well readress.
Do you have any idea of the origin of the problem ?
Thank you !