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

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

[avr-gcc-list] Variables in flash


From: Anton Erasmus
Subject: [avr-gcc-list] Variables in flash
Date: Sat, 14 Sep 2002 14:42:21 +0200

Hi,

In the attribute documentation the following attribute is listed (Relevent 
Section below) . Can something similar not be used for variables in flash 
and/or eeprom on the
AVR. For the M32R/D it seems that different instructions are generated to 
access variable within different "models". If gcc can generate different 
instructions
depending on this model attribute , then surely it can be used to generate the 
different instructions necessary to load variables from SRAM, Flash and EEPROM ?


model (model-name)

Use this attribute on the M32R/D to set the addressability of an object. The 
identifier model-name is one of small, medium, or large, representing each of 
the code models.

Small model objects live in the lower 16MB of memory (so that their addresses 
can be loaded with the ld24 instruction). 

Medium and large model objects may live anywhere in the 32-bit address space 
(the compiler will generate seth/add3 instructions to load their addresses).

Regards
  Anton Erasmus

avr-gcc-list at http://avr1.org



reply via email to

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