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

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

Re: [avr-gcc-list] gdb: No debugging symbols found for '128 bootloader


From: E. Weddington
Subject: Re: [avr-gcc-list] gdb: No debugging symbols found for '128 bootloader
Date: Tue, 09 Dec 2003 16:23:50 -0700

On 9 Dec 2003 at 12:57, Kyle Jamieson wrote:

> I suspect that this will be an easily-answerable newbie question, but
> here goes anyway.  When I build a binary in the following manner, gdb
> can't find debugging symbols.  Can anyone shed some light on why not?
> 
> Following is the sequence of events.
> 
> $ make
> avr-gcc  -c -g -Wall -I/usr/local/avr/include  -I. -mmcu=atmega128 -o
> inpispm2.o inpisp.c
>  .
>  .
>  .
>  avr-ld -v -mavr5 -Map=inpispm2.map -T bootloader.lds -o inpispm2 inpispm2.o

First off, is there any overarching reason why you're calling avr-ld 
directly?

It's better if you let avr-gcc call the linker. If you want to relocate 
your code because of a bootloader, you can do that with avr-gcc. For 
example (ignore wrapping):

avr-gcc -mmcu=atmega128 -I. -g inpispm2.o --output inpispm2.elf -Wl,-
Map=inpispm2.map,--cref,-Ttext=0x1E000 

Note the use of the -Wl switch. This passes on linker flags to the linker. 
See the GCC User Manual on how to use this switch. See the ld manual for 
it's switches. CAUTION: Note how the linker switches following the -Wl are 
delimited by commas and there are no spaces between them. 

The above example relocates the entire text section to a bootloader 
address. If you have just a section of code that is your bootloader and you 
have it in a named section (.bootloader), you can replace the -Ttext option 
with something like:
--section-start=.bootloader=0x1E000

Eric



reply via email to

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