On 2014-10-21 02:27, Oleg Uzenkov wrote:
Hello Everyone,

I would like to make a small custom bootloader (not considering RedBoot) that 
would implement a simple function of checking a flag (some bytes in memory) and 
then jumping to one of
the applications stored in internal flash.

Something like this:

internal flash memory:

------------------  0x08000000
| bootloader  |
|                    |
------------------
|_____            |
|flag |            |
------------------
|                    |
|                    |
------------------
| app1           |
|                    |
------------------
| app2           |
|                    |
------------------
|                    |
|                    |
--------------

Basically, if flag is true then start app1 else start app2.

I suppose bootloader would be a simple eCos app with ROM startup. Applications 
in flash probably should also be built for ROM startup.
When the jump is made app's .data and .bss sections should be copied into RAM...

Any ideas how to make a jump to start an app? May be some sample code showing 
how to do it in eCos? May be someone has done it already?

I would appreciate any help on this.

You've already mentioned the answer - RedBoot!

RedBoot is just another eCos application which does all the
things you are considering.  I can understand not wanting to
include RedBoot in your design (although it can be extremely
useful, especially during development), but looking through
the sources you'll find guidance on all the topics you are
looking for.

Good luck

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to