[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Linker error with gcc & WinAVR
From: |
Gre7g Luterman |
Subject: |
[avr-gcc-list] Linker error with gcc & WinAVR |
Date: |
Tue, 8 May 2007 11:29:25 -0700 (PDT) |
I'm using the latest WinAVR and I'm trying to fit my
code into the tiny atmega8515. The code does fit, but
I am trying to force certain sections of code to be
hard-coded to certain locations.
I am trying to do this with the --section-start option
when linking. This technique worked fine with the
larger atmega32, but for some reason with the 8515,
the linker is complaining that my .data section
overlaps one of my code sections.
Please forgive me if this seems like a dumb way to do
this, but I am not an expert with compiling and
linking, so I've been using whatever trick has worked
for me in the past. If someone can show me a better
way, I will gladly change my methodology!
For example:
$ avr-gcc.exe -mmcu=atmega8515 -DENC_ \
-Wl,-Map=RIO-8.map,\
--section-start,.update2_app=1B00,\
--section-start,.update1_nrww=1E00,\
--section-start,.update2_nrww=1F00 \
_update_wrapper.o endian.o flash_update.o main.o \
modbus.o pf.o program_flash.o serial.o spi.o \
timer.o -o temp1.elf
c:\winavr\bin\..\lib\gcc\avr\4.1.1\..\..\..\..\avr\bin\ld.exe:
section .update2_app.1 [0000168c -> 00001911] overlaps
section .data [0000168c -> 00001729]
Why on Earth does it think .update2_app (not sure what
the deal with the .1 is) is below 1B00 where I told it
to be. And why is .data so far below 800060, where it
should be? I even tried forcing .data to be 800060,
but that gave me the same result.
What should I try?
Gre7g
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
- [avr-gcc-list] Linker error with gcc & WinAVR,
Gre7g Luterman <=