This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13610] New: __attribute__((progmem)) allocation problem
- From: "sergey at idknet dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jan 2004 22:45:56 -0000
- Subject: [Bug c/13610] New: __attribute__((progmem)) allocation problem
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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