[ECOS] How do I run applications from flash?

Andrew Lunn andrew.lunn@ascom.ch
Fri May 16 07:59:00 GMT 2003

> - I want Redboot in flash. The user never upgrades Redboot. I believe
> I have correctly configured and built Redboot. Worked when I tried
> the ram version last week. (I'll test more next week.)
> - I'd then use Redboot to write the application to flash
> - I had planned to create a startup script with a "go" command w/a
> delay.
> - If the user needs to reprogram the application, he'll reboot,
> abort the startup script "go" command and write the application
> to flash. (Most likely we'll write a small app for this, I just
> recently put together a xmodem, ymodem, zmodem uploader using 
> lrzsz that I'm using from my Java program. 
> http://sources.redhat.com/ml/cygwin/2003-05/msg00740.html )

Build your application use the normal template you have been
doing. You don't need the redboot.ecm files. Then you need to change
the CYG_HAL_STARTUP to ROM. This will cause the eCos configuration to
be run from ROM, not RAM. 

Now, by default, the application will probably be linked to live in
flash at the same place as Redboot. So you need to edit the memory
layout files to change the location the binary is linked for. There
are two ways to do this.

1) Edit the HAL include/pkgconf/mlt_*rom.h and
   include/pkgconf/mlt_*rom.ldi files. 

   There are statements like

   #define CYGMEM_REGION_rom (0x41000000)


   rom : ORIGIN = 0x41000000, LENGTH = 0x400000
   SECTION_rom_vectors (rom, 0x41000000, LMA_EQ_VMA)

   which need to change to the address in flash you want the image to
   be placed.

2) Find an old, version 1.0 , release of the GUI configuration
   tool. It has a memory tool which allows you to change the memory
   layout using a GUI.

You should then be able to build the image, put it into flash, and use


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

More information about the Ecos-discuss mailing list