|
From: | Juergen Harms |
Subject: | Re: [avr-gcc-list] Allocation sequence of eeprom variables |
Date: | Mon, 20 Aug 2012 20:32:45 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:10.0.6esrpre) Gecko/20120717 Thunderbird/10.0.6 |
On 08/20/2012 07:36 PM, Georg-Johann Lay wrote:
Don't rely on unspecified behavior. It's a bad design pattern...
Yes, that has been my original problem (which initially I had not realised).As a quick fix, I will put individual data structures in separate sections / modules and determine their allocation in my Makefile. That allows me to rapidly update my infrastructure.
But I intend to modify that to a concept of indirections, using pointers in low eeprom memory (defined in an inline assembly block arranged according to an externally specified layout) which in turn point to the data - wherever it is placed. This will make my eeprom more independant of version fancies (my own or gcc's). That is some kind of hard-coding, but independantly finding eeprom data - as I need it - practically requires some kind of hard-coding.
Juergen
[Prev in Thread] | Current Thread | [Next in Thread] |