avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] .eeprom section overlapping bootloader linker error


From: Spencer Hollingum
Subject: [avr-gcc-list] .eeprom section overlapping bootloader linker error
Date: Thu, 12 Aug 2004 13:27:22 +0100

When my eeprom section gets above a certain size I get a linker error. I am
using an assembler bootloader located at 0x1e00. 
Error goes away if I reduce the eeprom or main code size, in which case
everyting works fine , main code and bootloader. 

Linker Error Message:-

C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3\..\..\..\..\avr\bin\ld.exe: section
.eeprom 
[00001d0e -> 00001e00] overlaps section .bootloader [00001e00 -> 00001fb7] 
make: *** [main.elf] Error 1 

I am using the following linker flags 

LDFLAGS = -Wl,-Map=$(TARGET).map,--cref,--section-start=.bootloader=0x1e00 

Below is the map file with the section sizes reduced so that the linker
error does not occur. 

Sections: 
Idx Name Size VMA LMA File off Algn 
0 .bootloader 000001b8 00001e00 00001e00 00001ed4 2**0 
CONTENTS, ALLOC, LOAD, READONLY, CODE 
1 .text 00001c8e 00000000 00000000 000000d4 2**1 
CONTENTS, ALLOC, LOAD, READONLY, CODE 
2 .data 00000080 00800060 00001c8e 00001d62 2**0 
CONTENTS, ALLOC, LOAD, DATA 
3 .bss 00000266 008000e0 008000e0 0000208c 2**0 
ALLOC 
4 .noinit 00000000 00800346 00800346 0000208c 2**0 
CONTENTS 
5 .eeprom 000000f2 00810000 00001d0e 00001de2 2**0 
CONTENTS, ALLOC, LOAD, DATA 
6 .stab 00005a84 00000000 00000000 0000208c 2**2 
CONTENTS, READONLY, DEBUGGING 
7 .stabstr 00002745 00000000 00000000 00007b10 2**0 
CONTENTS, READONLY, DEBUGGING

 

 

The LMA of the .eeprom section is 0x1d0e which means if the .eeprom size
increases above 0xf2 bytes it will hit the bootloader at 0x1e00. The eeprom
and bootloader should be in different address spaces so there should be no
clash.

 

Target device is an ATmega8.

 

Any suggestions?

 

Thanks

 

Spencer

 

 

 

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]