avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] EEPROM array in certain location


From: Klaus Rudolph
Subject: Re: [avr-gcc-list] EEPROM array in certain location
Date: Tue, 7 Dec 2004 08:04:48 +0100 (MET)

> Hello all,
> 
> does anyone know how to initialize an array in the EEPROM at a certain
> desired location.
> as far as i havr tried, using this:
>       unsigned int EEPROM_ARRAY[][] __attribute__(((setion(".eeprom")))
> will make an array starting at the beginning of the EEPROM (address 0x00)
> how if i just want to start the array at, let's sat the address 0x10?

1) put some (0x10 bytes) before your EEPROM_ARRAY var with another var.
If you already use this then bytes this cap should allready be there.
If this eeprom location is used only from the outside world it seems a bit
misterious.

2) Add a new section for this like .eeprom.sec2 
You can sort all eeprom sections with command line options "--sort-section
name" in actual binutils. Then you have to give the gap via another var in
maybe another
section like .eeprom.sec1 and the sorting guarantees that the values are
correct
located.
2b) or you can provide your own linker script and provide your own 
section start. "eeprom (rw!x) : ORIGIN = 0x810010, LENGTH = ??K" This could
also be done from command line if only a single section is needed.
"--section-start sectionname=org"

Bye
   Klaus




-- 
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++


reply via email to

[Prev in Thread] Current Thread [Next in Thread]