multiple applications on one arm controller

Hi @all,

i’m trying to realise the following application structure in an AT91SAM7S controller using the gcc toolchain:

  1. a kind of bootloader in flash starting at offset 0x0.

  2. a first application in flash starting at offset 0x10000

  3. a second application in flash starting at offset 0x24000

The idea behind this is to start with the “bootloader” and choose the most recent of the two applications and start it. This gives me the opportunity to do an update of the other application during runtime and still keep one fully functional application even if the update fails (could happen due to an unreliable data transfer; in this case based on a GPRS connection).

Has anybody done something similar and can provide an example esspecially for the linker command file?

Best regards,

Ralf

This is a perfectly normal approach for an application with a bootloader.

The correct method would be for the bootloader to start, check the crc of the main application and if ok run it.

The bootloader vectors would obviously be mapped into Flash @ address 0.

Then when the main application boots it would remap it vectors into ram @ 0.

Treat each applcation as standalone, except that the bootloader need to be aware of the other applications start addresses - this could be done by a common flash area that stores application boot info.

Hope this helps.

Regards

Spen