Dear GCC-List, I am writing an application that uses loadable portions of code (it is a tester for embedded products, where the target code and test routines will be sent to a remote location [the factory] and loaded into the tester via an Intel Hex download routine]. These 'test modules' are in pre-defined memory areas of the processor (Mega644), so no contention occurs. Writing these loadable modules requires that I only use resources inside these memory areas. I need to output strings to an LCD display in these modules. Clearly printf "something" would require entries in the base .text area which would move my main routines. I want to use 'prog_char[] ="Something", but the compiler won't let me put this in a section.
e.g. #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. Many thanks, Robert _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list