From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27196 invoked by alias); 30 Sep 2009 08:25:15 -0000 Received: (qmail 27173 invoked by uid 22791); 30 Sep 2009 08:25:11 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f202.google.com (HELO mail-px0-f202.google.com) (209.85.216.202) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Sep 2009 08:25:08 +0000 Received: by pxi40 with SMTP id 40so7219028pxi.24 for ; Wed, 30 Sep 2009 01:25:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.201.21 with SMTP id y21mr445692wff.341.1254299106542; Wed, 30 Sep 2009 01:25:06 -0700 (PDT) In-Reply-To: References: Date: Wed, 30 Sep 2009 08:25:00 -0000 Message-ID: From: Mandeep Sandhu To: bob.brusa@gmail.com Cc: ecos-discuss Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Running code from on-chip flash X-SW-Source: 2009-09/txt/msg00264.txt.bz2 On Wed, Sep 30, 2009 at 1:20 PM, Bob Brusa wrote: > Am 27.09.2009, 05:27 Uhr, schrieb Mandeep Sandhu > : > >> 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. Thanks, -mandeep > =A0Robert > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss