Hi,
I built a bootloader for a STM32F107vc. The bootloader was stored at address 0x08000000 to 0x08009800 and the main application was saved at 0x08009800. Off course, I changed the Vector Table Address of the main application to 0x08009800. Well, everything worked fine but the code runs only if I am debugging (using ULINK2). I have noticed that if I click "Download and Execute" button in uVision the application works, as well.
Anyone can help me?
I don't work with your processor, but what makes the processor know that there is a boot loader at address 0x08000000? When debugging, Keil can make use of setup scripts etc to assign specific values to PC allowing programs to run in RAM etc - but that does not happen when processor is booted and trying to start a program without debugger involved.
The address 0x08000000 is the first address of flash code memory. When compiling the bootloader, uVision generates automatically scatter file and puts the bootloader image at this address, as usual for any simple application. About these setup scripts, how can I know what procedures the scripts do?
Thanks.
And what about when I click button "Download and Execute" in uVision? The application runs well.
You didn't, by any chance, forget to "sign" the bootloader and/or application image you flashed by that particular checksum, did you? From what I hear ARMs will refuse to run un-signed code.
I found out the problem. It was the interrupts. Before execute the application code I disabled all the interrupts I had configured in bootloader. Then everything worked well.