This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Placing data at an absolute address


Hi Gary,
Thanks for the response.
I did try using the "attribute" method but the allocated size for the
segment was always wrong (0).

I looked in the archives but without any success.

			...Laurie:{)

-----Original Message-----
From: Gary Thomas [mailto:gary@mlbassoc.com]
Sent: Monday, 2 April 2007 3:55 AM
To: Laurie Gellatly
Cc: Øyvind Harboe; eCos Discussion
Subject: Re: [ECOS] Placing data at an absolute address


Laurie Gellatly wrote:
> Hi All,
> For our eCos application, I'd like to place the MAC address at a
particular
> address in flash
> and have it loaded as part of storing Redboot into the flash.
> At production time, a script would be run that finds that address section
in
> redboot.elf and
> updates it before it is stored into the next unit.
> Finding the section in the elf is not the hard bit.
> I've tried adding a new section on the gcc command line and adding a
> variable into the
> C source which almost works except the section size is of length 0.
> How can I make the section 6 bytes long or is there a better way to do
this
> whole thing?

The best way would be to assign this data to a particular
section of its own, using "attribute".  Then in the linker
file, put that section at the desired physical address.

There was some discussion of this many years ago.  Some
trawling through the archives might find more clues.

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]