> -----Original Message----- > From: > avr-gcc-list-bounces+eweddington=cso.atmel....@nongnu.org > [mailto:avr-gcc-list-bounces+eweddington=cso.atmel....@nongnu. > org] On Behalf Of Robert von Knobloch > Sent: Friday, March 13, 2009 6:51 AM > To: avr-gcc-list@nongnu.org > Subject: [avr-gcc-list] Strings in ROM > > #define SECTION TEST1_SECTION > > SECTION prog_char press_button[] = ">> Press UUT button <<"; > SECTION prog_char button_timeout[] = "*** Error - Timeout! ***"; > > where the linker sees: > LDFLAGS = -Wl,-Map,$(PRG).map \ > -Wl,--section-start=.test0=0x2600 \ > -Wl,--section-start=.testparms0=0x2e80 \ > -Wl,--section-start=.test1=0x2f00 \ > -Wl,--section-start=.testparms1=0x3780 > > 'make' results in: > > avr-gcc -g -Wall -Os -mmcu=atmega644 -DF_CPU=20000000 -c > -o main.o > main.c > In file included from main.c:25: > tests.c:138: error: section of 'press_button' conflicts with previous > declaration > tests.c:139: error: section of 'button_timeout' conflicts > with previous > declaration > > I cannot find where 'prog_char is defined and would like to know how I > can force the compiler to put these strings in my 'test1' section.
prog_char is defined in <avr/pgmspace.h>. Take a look at the GCC user manual, under Function Attributes, look at the "section" attribute: <http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Function-Attributes.html#Function-Attributes> _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list