From: Robin Randhawa <robin.randhawa@gmail.com>
To: Mandeep Sandhu <mandeepsandhu.chd@gmail.com>
Cc: ecos-discuss <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Running code from on-chip flash
Date: Wed, 30 Sep 2009 09:19:00 -0000 [thread overview]
Message-ID: <8F044B38-DCAA-4B24-8141-40E53D8EC217@gmail.com> (raw)
In-Reply-To: <b18c5f790909300125y1895cb61x298b0d3893322377@mail.gmail.com>
Hi.
On 30 Sep 2009, at 09:25, Mandeep Sandhu wrote:
> 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.
IMHO, this is subject to the Flash part's abilities. I have worked
with NOR Flash parts in the past where it was possible to run code
from one sector while erasing/programming another sector. I suppose
that the AT91SAM7X512's manuals and/or the Flash part manufacturer's
manuals should shed light on this.
Bear in mind that the Flash chips might need a sector's worth of data
to be buffered in RAM before writing to the sector in one go.
Cheers,
Robin
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2009-09-30 9:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-27 3:28 Mandeep Sandhu
2009-09-27 16:37 ` Andrew Lunn
2009-09-30 7:58 ` Bob Brusa
2009-09-30 7:50 ` Bob Brusa
2009-09-30 8:25 ` Mandeep Sandhu
2009-09-30 9:19 ` Robin Randhawa [this message]
2009-09-30 10:36 ` Mandeep Sandhu
2009-09-30 10:35 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8F044B38-DCAA-4B24-8141-40E53D8EC217@gmail.com \
--to=robin.randhawa@gmail.com \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=mandeepsandhu.chd@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).