[ECOS] Running code from on-chip flash

Mandeep Sandhu mandeepsandhu.chd@gmail.com
Wed Sep 30 08:25:00 GMT 2009

On Wed, Sep 30, 2009 at 1:20 PM, Bob Brusa <bob.brusa@gmail.com> wrote:
> Am 27.09.2009, 05:27 Uhr, schrieb Mandeep Sandhu
> <mandeepsandhu.chd@gmail.com>:
>> Hi all,
>> I'm going to be using a real hardware for the first time (with ECOS).
>> The h/w is the Atmel AT91SAM7X512 SoC.
>> In order to save RAM, i'll be running the code from the on-chip flash
>> itself (512KB).
>> Now is it true that if my code resides on the flash, I will not be
>> able to write to it? I.e is the whole flash area is marked as
>> readonly?
>> Thanks,
>> -mandeep
> Yes, its true. You will not be able to run tricks like self-modifying code
> that resides in flash. You would have to move such a routine to RAM and
> execute it there.

Ok, I'm confused now!

Andrew mentioned that I _could_ write to a different area of the flash
(i.e different from the one from where the code is running).

To give an example, say I have to do a firmware upgrade. Now I
download the image from, say an ethernet interface, and keep writing
chunks of it (since the whole firmware image won't fit in my RAM of
128KB) to a "well-known" safe area on the flash.

Wont this work?

I'm not going to be modifying my code segment at all.


>  Robert

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