[ECOS] How to build a executed-in-flash application?

Bart Veer bartv@ecoscentric.com
Thu Sep 7 13:38:00 GMT 2006

>>>>> "Wang" == Wang Cui <iucgnaw@msn.com> writes:

    Wang> As I know, normally RedBoot use startup type "ROM", and
    Wang> application use startup type "RAM", then we can use RedBoot
    Wang> "load" application into ram and "go" it.

    Wang> On my target board, this method works pretty well now. But
    Wang> since the ram size is only 512K, I want the application
    Wang> image executed-in-place in the flash to save ram for usage.

Having a ROM RedBoot and a RAM application is only one of the standard
scenarios. If you want the application to run from flash then there
should be no need to have RedBoot in the system at all. Instead
configure eCos itself for ROM startup, link your application with
that, and install it in place of RedBoot. The application now has
control over all the hardware. The obvious caveats are:

  1) you need some way of programming the flash without RedBoot. This
     is likely to involve a hardware debug solution such as BDM or

  2) debugging applications in flash is generally a lot harder than
     ones in RAM (although that is going to be a problem whenever code
     resides in flash, irrespective of whether or not RedBoot is

  3) upgrading an application in the field becomes more difficult.

  4) not all platforms will be tested in this scenario. Depending on
     your hardware there may be platform HAL issues.

Andrew has been describing an alternative approach where RedBoot is
still in use and the application resides in a non-standard location in
flash. That can also be made to work, but having a ROM startup
application would be more conventional.


Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

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

More information about the Ecos-discuss mailing list