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

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

Re: [avr-gcc-list] mega168 Support


From: Colin O'Flynn
Subject: Re: [avr-gcc-list] mega168 Support
Date: Fri, 4 Nov 2005 18:32:19 -0400
User-agent: KMail/1.8.2

Hello,


> Seems your compiler is incorrectly patched.  When I call avr-gcc with
> -v, it gives me:

I used the patch at 
https://savannah.nongnu.org/patch/?func=detailitem&item_id=2923 for 3.4.4. As 
well I can call it like:

address@hidden ~]$ avr-gcc -v -mmcu=atmega168 
-Wl,--section-start=.text=0x4000 -o foo foo.c

Reading specs from /opt/avr/lib/gcc/avr/3.4.4/specs
Configured with: ../configure --prefix=/opt/avr --target=avr 
--enable-languages=c,c++ --disable-nls : (reconfigured) ../configure 
--prefix=/opt/avr --target=avr --enable-languages=c --disable-nls
Thread model: single
gcc version 3.4.4
 /opt/avr/libexec/gcc/avr/3.4.4/cc1 -quiet -v foo.c -quiet -dumpbase foo.c 
-mmcu=atmega168 -auxbase foo -version -o /tmp/ccNSNRkd.s
ignoring nonexistent directory 
"/opt/avr/lib/gcc/avr/3.4.4/../../../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/avr/lib/gcc/avr/3.4.4/include
 /opt/avr/lib/gcc/avr/3.4.4/../../../../avr/include
End of search list.
GNU C version 3.4.4 (avr)
        compiled by GNU C version 3.4.4 20050721 (Red Hat 3.4.4-2).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129224
foo.c:3:26: warning: no newline at end of file
 /opt/avr/lib/gcc/avr/3.4.4/../../../../avr/bin/as -mmcu=atmega168 
-o /tmp/ccGpfgqi.o /tmp/ccNSNRkd.s
 /opt/avr/lib/gcc/avr/3.4.4/../../../../avr/bin/ld -m avr5 -Tdata 0x800100 -o 
foo /opt/avr/lib/gcc/avr/3.4.4/../../../../avr/lib/crtm168.o 
-L/opt/avr/lib/gcc/avr/3.4.4 -L/opt/avr/lib/gcc/avr/3.4.4/../../../../avr/lib 
--section-start=.text=0x4000 /tmp/ccGpfgqi.o -lgcc -lc -lgcc


Where foo.c is just a basic C program that does nothing. So it doesn't seem to 
complain?

Binutils is 2.16, unpatched. Does that need a patch as well, it looked to me 
like support got integrated into 2.16. When run from my makefile I see the 
following:

Linking: tinyloader.elf
avr-gcc  tinyloader.o --output tinyloader.elf -Wl,--section-start=.text=0x3E00 
-Wl,-Map=tinyloader.map,--cref     -nostartfiles -v
Reading specs from /opt/avr/lib/gcc/avr/3.4.4/specs
Configured with: ../configure --prefix=/opt/avr --target=avr 
--enable-languages=c,c++ --disable-nls : (reconfigured) ../configure 
--prefix=/opt/avr --target=avr --enable-languages=c --disable-nls
Thread model: single
gcc version 3.4.4
 /opt/avr/lib/gcc/avr/3.4.4/../../../../avr/bin/ld -m avr2 -o tinyloader.elf 
-L/opt/avr/lib/gcc/avr/3.4.4 -L/opt/avr/lib/gcc/avr/3.4.4/../../../../avr/lib 
tinyloader.o --section-start=.text=0x3E00 -Map=tinyloader.map --cref -lgcc 
-lc -lgcc
/opt/avr/lib/gcc/avr/3.4.4/../../../../avr/bin/ld: address 0x3f9e of 
tinyloader.elf section .text is not within region text
make: *** [tinyloader.elf] Error 1

The key line being:
 /opt/avr/lib/gcc/avr/3.4.4/../../../../avr/bin/ld -m avr2 -o tinyloader.elf
Which has avr2, whereas before it was avr5. When does this get set?

Regards,

 -Colin

Regards,

 -Colin




reply via email to

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