Hallo Community,
ich hab seit heute folgendes Problem beim Linken mit dem
yagarto-Compiler:
1 |
|
2 | arm-none-eabi-gcc -T ../../cpu/arm//atsam3s4/atsam3s4-flash.ld -L../../cpu/arm//atsam3s4 -march=armv7-m -mcpu=cortex-m3 -mthumb -Wl,-Map=mapfile -nostartfiles hello-world.co obj_deRFusb-13E00/contiki-main.o contiki-deRFusb-13E00.a -latsam3s4 -o hello-world.deRFusb-13E00
|
3 | c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib\libc.a(lib_a-impure.o):(.data+0x0): multiple definition of `_impure_ptr'
|
4 | rm hello-world.co
|
5 | ../../cpu/arm//atsam3s4\libatsam3s4.a(flash_stdio.o):(.data+0x428): first defined here
|
6 | c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
|
7 | C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/../../../../../newlib-1.20.0/newlib/libc/reent/sbrkr.c:58: undefined reference to `_sbrk'
|
8 | c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib\libc.a(lib_a-writer.o): In function `_write_r':
|
9 | C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/../../../../../newlib-1.20.0/newlib/libc/reent/writer.c:58: undefined reference to `_write'
|
10 | c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib\libc.a(lib_a-closer.o): In function `_close_r':
|
11 | C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/../../../../../newlib-1.20.0/newlib/libc/reent/closer.c:53: undefined reference to `_close'
|
12 | c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib\libc.a(lib_a-fstatr.o): In function `_fstat_r':
|
13 | C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/../../../../../newlib-1.20.0/newlib/libc/reent/fstatr.c:62: undefined reference to `_fstat'
|
14 | c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib\libc.a(lib_a-isattyr.o): In function `_isatty_r':
|
15 | C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/../../../../../newlib-1.20.0/newlib/libc/reent/isattyr.c:58: undefined reference to `_isatty'
|
16 | c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib\libc.a(lib_a-lseekr.o): In function `_lseek_r':
|
17 | C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/../../../../../newlib-1.20.0/newlib/libc/reent/lseekr.c:58: undefined reference to `_lseek'
|
18 | c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib\libc.a(lib_a-readr.o): In function `_read_r':
|
19 | C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/../../../../../newlib-1.20.0/newlib/libc/reent/readr.c:58: undefined reference to `_read'
|
20 | collect2.exe: error: ld returned 1 exit status
|
21 | make: *** [hello-world.deRFusb-13E00] Error 1
|
Ich hatte das Projekt ein paar Tage liegen lassen und als ich das letzte
Mal kompiliert habe, ging noch alles. Seit heute kommen diese
Fehlermeldungen. Ich habe eigentlich am Compileraufruf oder an
Linkerskripten usw. nichts geändert, nur an meinem C-Code. Es scheint ja
damit anzufangen, dass _inpure_ptr sowohl in libc.a als auch in der
uC-spezifischen libatsam3s4.a (benutze ATSAM3S4) definiert wird. Ich bin
mir nicht mal ganz sicher, was in libatsam3s4.a alles definiert ist, ich
hab das Projekt nur so übernommen und zunächst lief auch alles.
Witzigerweise liefert eine Google-Suche zu libatsam3s4.a 0 Treffer:D Und
auch wenn man sich die restlichen Fehlermeldungen ansieht, die auch
allesamt libc.a betreffen, scheint da ja irgendwo der Fehler zu liegen.
Brauche ich die libc.a überhaupt oder ist die C-Standardfunktionalität
schon in libatsam3s4.a enthalten? Wie bewege ich den Linker dazu nicht
mehr gegen libc.a zu linken? Und wieso hat vorher alles funktioniert und
jetzt plötzlich nicht mehr? Danke schon mal für die Hilfe.