On Mon, 12 Mar 2007, Colin O'Flynn wrote:

Hey,

How do I relocate the sections to the correct address? In the file I want to
add fuses to, I have:

const unsigned char lfuse __attribute__((section (".lfuse"))) = 0xFF;
const unsigned char hfuse __attribute__((section (".hfuse"))) = 0x02;
const unsigned char efuse __attribute__((section (".efuse"))) = 0xA4;

But I get:

Linking: main.elf
avr-gcc -mmcu=atmega16 -I. -gstabs -DF_CPU=3680000UL  -O0 -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes
-Wa,-adhlns=main.o  -std=gnu99 -MD -MP -MF .dep/main.elf.d main.o --output
main.elf -Wl,-Map=main.map,--cref  -Wl,-u,vfprintf -lprintf_min
-Wl,-u,vfscanf -lscanf_min
/opt/avr/lib/gcc/avr/3.4.4/../../../../avr/bin/ld: section .lfuse [00000bb4 ->
00000bb4] overlaps section .data [00000bb4 -> 00000bb7]
/opt/avr/lib/gcc/avr/3.4.4/../../../../avr/bin/ld: section .hfuse [00000bb5 ->
00000bb5] overlaps section .data [00000bb4 -> 00000bb7]
/opt/avr/lib/gcc/avr/3.4.4/../../../../avr/bin/ld: section .efuse [00000bb6 ->
00000bb6] overlaps section .data [00000bb4 -> 00000bb7]
make: *** [main.elf] Error 1

quick (command-line) way is "-Wl,--section-start=.lfuse=<address> ..."; otherwise you can tweak the linker scripts.



--

"Do not doubt that a small group of dedicated individuals can change
the world. Indeed, that is all that ever has." -- Margaret Mead


_______________________________________________
avrdude-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to