[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] Toolchain woes
From: |
Robert von Knobloch |
Subject: |
Re: [avr-chat] Toolchain woes |
Date: |
Thu, 30 Sep 2010 10:51:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 |
On 29/09/10 21:26, address@hidden wrote:
> Did you clean the old project before?
Yes
> This looks like you were trying to mix object files produced by an
> older toolchain with the current library.
>
> If everything has been compiled afresh, can you post the compiler and
> linker options used?
Found it. It lies in my linker script.
Target cpu is ATTiny13
Under the 'old' toolchain [binutils 2.19] the script needs to have
"OUTPUT_ARCH(avr:3)".
Why? - I don't know. I hadn't noticed this until now. If I 'correct' it,
it complains:
ld: avr:3 architecture of input file `crttn13.o' is incompatible with
avr:25 output.
Where does it get arch3 from ??
The new toolchain requires "OUTPUT_ARCH(avr:25)" which seems correct.
So I have a solution (I will make a complete fork of all projects when I
have completed testing the new toolchain) - thank you Jörg. :-)
>> I'm still wondering why the FreeBSD patches seem to be inconsistent
>> with the gcc & binutils sources - I assume the author 'Joerg' is
>> you?
>
> Yes, that's me. What do you mean with "inconsistent" here?
>
In your patch from FreeBSD, marked for GCC 4.3.4:
--- ./gcc/config/avr/avr.c~ 2010-03-05 17:16:20.000000000 +0100
+++ ./gcc/config/avr/avr.c 2010-03-05 17:19:30.000000000 +0100
Whereas the gcc 4.3.4 tarball has it's "gcc/config/avr/avr.c" at 15.06.2008
Running "patch < patch-gcc" in the top directory gives:
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- ./gcc/config/avr/avr.c~ 2010-03-05 17:16:20.000000000 +0100
|+++ ./gcc/config/avr/avr.c 2010-03-05 17:19:30.000000000 +0100
--------------------------
File to patch:
entering "gcc/config/avr/avr.c" gives:
patching file gcc/config/avr/avr.c
Hunk #1 succeeded at 179 (offset -14 lines).
Hunk #2 succeeded at 216 (offset -14 lines).
Hunk #3 FAILED at 323.
1 out of 3 hunks FAILED -- saving rejects to file gcc/config/avr/avr.c.rej
can't find file to patch at input line 154
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- ./gcc/config/avr/avr.h~ 2010-03-05 17:15:55.000000000 +0100
|+++ ./gcc/config/avr/avr.h 2010-03-05 17:19:53.000000000 +0100
--------------------------
File to patch:
Looking in the avr.c.rej file:
***************
*** 270,278 ****
{ "atmega1280", ARCH_AVR51, "__AVR_ATmega1280__" },
{ "atmega1281", ARCH_AVR51, "__AVR_ATmega1281__" },
{ "atmega1284p", ARCH_AVR51, "__AVR_ATmega1284P__" },
{ "at90can128", ARCH_AVR51, "__AVR_AT90CAN128__" },
{ "at90usb1286", ARCH_AVR51, "__AVR_AT90USB1286__" },
{ "at90usb1287", ARCH_AVR51, "__AVR_AT90USB1287__" },
/* 3-Byte PC. */
{ "avr6", ARCH_AVR6, NULL },
{ "atmega2560", ARCH_AVR6, "__AVR_ATmega2560__" },
--- 323,335 ----
{ "atmega1280", ARCH_AVR51, "__AVR_ATmega1280__" },
{ "atmega1281", ARCH_AVR51, "__AVR_ATmega1281__" },
{ "atmega1284p", ARCH_AVR51, "__AVR_ATmega1284P__" },
+ { "atmega128rfa1", ARCH_AVR51, "__AVR_ATmega128RFA1__" },
{ "at90can128", ARCH_AVR51, "__AVR_AT90CAN128__" },
{ "at90usb1286", ARCH_AVR51, "__AVR_AT90USB1286__" },
{ "at90usb1287", ARCH_AVR51, "__AVR_AT90USB1287__" },
+ { "m3000f", ARCH_AVR51, "__AVR_M3000F__" },
+ { "m3000s", ARCH_AVR51, "__AVR_M3000S__" },
+ { "m3001b", ARCH_AVR51, "__AVR_M3001B__" },
/* 3-Byte PC. */
{ "avr6", ARCH_AVR6, NULL },
{ "atmega2560", ARCH_AVR6, "__AVR_ATmega2560__" },
The text /*3-Byte...... is not in the file to patch, so it dumps.
This file looks quite old, I wonder if the gcc-4.3.4 tarball is correct?
Regards,
Robert