Hi,
I'm using the STM32F103ZD uC and the Keil IDE uVision V4.03q.
I wrote two programs: a default Application and a Bootloader. The Bootloader can load the Application by some interface and execute it.
Now I want both programs to be combined into one single project so I can compile both and flash both in one go into my uC.
But, the Bootloader should reside at a predefined memory address.
What's the best way to achieve this?
Thanks in advance,
Henk
You can have multiple releases of your hardware, that gets newer boot loaders. An initial boot loader might support RS232. A newer version may also support USB or CAN. And there may be reasons to release updated boot loaders that supports interface bridging. however replacing a bootloader will require "engineer load" where replacing the app only requires "customer load"
or there should be a fixed memory region or similar where application and boot loader may exchange information. VERY risky, I'd stay away from that one
Erik
"VERY risky, I'd stay away from that one"
Not at all. It can be enough to decide that a couple of bytes of RAM or EEPROM should be dedicated for application/bootloader information.
There may be regulatory requirements (such as for Telco equipment) that a device have multiple applications installed, and that the boot loader is capable of automatically switch from one application copy to the other in case there is corruption or if one application copy for some reason fails to run and gives watchdog resets. In that case, the application may after an OTA update need to inform the boot loader that the currently running application shouldn't be used for the next boot since there is a newer version downloaded.