[Top][All Lists]

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

Re: [avr-gcc-list] typdefing 'cost' .. PROGMEM doesn't work

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] typdefing 'cost' .. PROGMEM doesn't work
Date: Fri, 1 Aug 2003 16:45:55 +0200 (MET DST)

As "Dave Hansen" <address@hidden> wrote:

>You need to look at his original example again.  Essentially he had two 
>typedefs and two variable declarations analogous to that below:
>   typedef const int PW1 PROGMEM;
>   typedef int PW2 PROGMEM;
>   PW1 v1;
>   const PW2 v2;

Ah, now i see.

Placing of __attribute__ is position-dependant, and can sometimes be
very tricky. :-(  Here's the doc pointer:


I've always found it best to use __attribute__((__progmem__)) as the
last part of the declaration:

const int foo PROGMEM = 42;

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

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