cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader to lauch 2 different programs

pedro23
Senior
Posted on January 02, 2013 at 18:15

hi there.

I have 2 programs that share the same hardware and a customer wants both.

The best option that I found is the posibilty to store both binaries in memory and launch them based in a pin value at startup. For this I will need bootloader/launcher.

I have some questions.

1) Is it possible (i suppose that it is but i want a confirmation). ?

2) Do you know something like this already?

3) Do the 2 binaries need to know something about the launcher/bootloader or the current binary is ok? Since i'm using IAR, does IAR need to know this on compilation (to assign relative addresses or something like that).

4) What steps are needed to launch the new binary? (I suppose that it is now enough changing the program counter to the new program address).

Any other note or comment is welcome.

Thanks in advance.

#bootloader #bin #launcher #stm32
1 REPLY 1
Posted on January 02, 2013 at 19:27

1) Yes, you control the code running on the target, so yes you can contrive all manner of solutions on all manner of platforms.

2) Yes, written dozens

3) You will need to specify the base address to the tools for each code region within the Flash you create.

4) Look at some of the IAP app notes for the ST parts (you don't specify which). Generally for an M3 design I have each app export it's own vector table as if it were a standalone ROM, and have the loader vector through the reset handler entry point, and have the app's code relocate the VTOR to it's own base address.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..