[Bug c/13610] New: __attribute__((progmem)) allocation problem

sergey at idknet dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 7 22:45:00 GMT 2004


Configured with: ./configure --prefix=/usr --target=avr --program-prefix=avr-
--enable-languages=c,c++
Thread model: single
gcc version 3.3.2

in source:
__attribute__((progmem)) char *tokens[] = {"hello1", "hello2", "hello3"};

__attribute__((progmem)) char test[] = {'a','b','c'};

allocates var tokens (array of pointers) into progmem, but strings "hello1",
"hello2", "hello3" - into sram (.data) (must be in progmem too).
in case with char test[] anything fine: array & data allocated into progmem.
Due to ram limitation on avr it's very important to keep such constant strings
in program memory (flash).
Question: how can I allocate this srtings into progmem for now?

-- 
           Summary: __attribute__((progmem)) allocation problem
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sergey at idknet dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: avr
GCC target triplet: avr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13610



More information about the Gcc-bugs mailing list