[ECOS] How do I run applications from flash? -- some other question about this issue. thanks

QiangHuang jameshq@liverpool.ac.uk
Fri May 16 08:29:00 GMT 2003


Hi:
   I got the message from the mailing list, but I have some question about
the startup type.

system specification:

(ARM target)
SDRAM (32Mb)
FLASH at address 0x00 when power up the board (8Mb)

Is is possible to build a ecos application to be store into flash memory,
redboot also store in the flash memory. I would like the booting step as:
1. Redboot loaded into SDRAM from Flash when power up the board. (this has
been done)
memory map will be set up as: SDRAM from address 0x00~, Flash from address
0x40000000~
2. Redboot will load the ecos application from Flash into SDRAM and run the
ecos application from SDRAM.
3. running of the ecos application.

The question is what type of startup type should I choose when building the
ecos application. what should be the memory layout file be. Is the folloing
correct:
use RAM startup type and memory layout file for it :  VMA=LMA = SDRAM from
0x000~

Thanks a lot.



-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Andrew Lunn
Sent: 16 May 2003 08:59
To: Oyvind Harboe
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] How do I run applications from flash?


> - 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)

   and

   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
go.

        Andrew

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


-- 
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