[Top][All Lists]

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

Re: [avr-gcc-list] Memory problem

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Memory problem
Date: Tue, 23 Jun 2009 07:23:11 +0200 (MET DST)

Parthasaradhi Nayani <address@hidden> wrote:

> Later I moved the structure to the top and compiled again but this
> time the variables remained in the same old order (the structure
> should have occupied the first byte onwards).

The only method to not have the linker reorder your variables is to
just use a single variable (per memory section).  So, put some kind of
an "embracing" struct around all your variables you'd like to have in
a particular order, and you'll be done.

(This very same issue frequently comes up when accessing EEPROM.)

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

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