Forum: Compiler & IDEs Kann c-File unter Win mit GNU-ARM Toolchain kompilieren, unter Linux nicht!


von Andy A. (grandmaster)


Lesenswert?

Hallo zusammen.

Also, ich habe folgendes Problem. Ich muss für die Uni ein Programm für 
einen Lego Mindstorm schreiben. Das ganze soll aus Matlab/Simulink raus 
passieren, was hier jetzt aber erstmal unwichtig ist. Ich hab ein 
richtiges *.c-File, ein *.oil-File und ein make-file. Die kann ich aus 
Matlab raus erstellen. Sowohl auf dem Windwos-Rechner, als auch auf dem 
Linux Rechner hab ich die GNU-ARM Toolchain mit gcc 4.0.2 installiert. 
Laut diversen Berichten im Internet braucht man diese Version, sonst 
soll das wohl gar nicht klappen.

Jetzt zu meinem Problem. Ich kann die aus Matlab raus erzeugten Files 
unter Windwos mittels der Toolchain komilieren, indem ich das makefile 
ausführe. Das Prgramm was rauskommt funzt auf auf dem Lego Mindstorm, 
heißt also, der Code passt und die Toolchain auch. Wenn ich die aus 
Matlab erstellten Files auf meinen Windwos-Rechner kopiere und die 
makefile ausführe, dann funktioniert das compilierte Programm auch.

Heißt, die Files, bevor die GNU-ARM Toolchain eingreift, sind sowohl auf 
dem Win als auch auf dem Linux Rechner korrekt.

Wenn ich jetzt aber die makefile unter Linux aufrufe, bekomme ich Fehler 
in folgender Form:
GNUARM/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/bin/ld: failed 
to merge target specific data of file build/nxtvm/platform/nxt/vectors.o
GNUARM/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/bin/ld: ERROR: 
build/nxt_binary_header.o uses hardware FP, whereas nxtway_app_rom.elf 
uses software FP

Jetzt geh ich mal davon aus, dass meine GNU-ARM Toolchain unter Linux 
falsch konfiguriert ist. Ich muss leider (Vorgabe der UNI), OpenSUSE 
11.1 benutzen. D.h. ich muss mit die Toolchain selbst kompilieren.

Ich bin im großen und ganzen nach folgender Anleitung vorgegangen:
http://wiki.ubuntuusers.de/GNU_ARM-Toolchain

allerdings mit den Befehlen für OpenSUSE. Also su, anstatt sudo. Rest 
hab ich genau so gemacht und hab folgende Files installiert:
binutils-2.16.1, gcc-4.0.2, gdb-6.8, newlib-1.14.0, weil ich ja die 
4.0.2er Version von gcc brauche. Passen die andern Files dazu, oder ist 
da vllt schon was inkompatiebel?

Wie schon gesagt, ich bin bei der install nach der oben genannten 
Anleitung vorgegangen. Jetzt ist mir aber aufgefallen, dass ich bei der 
Win-Install der gnu-arm Toolchain im config Fenster vor der eigentlichen 
install den Harken vor:
-Floating Point Unit und
-big Endian
entferne (inklusive aller Unterpunkte bei diesen Einträgen). Nur noch 
Litte Endian bleibt ein Harken davor.

Kann es sein, dass ich sowas in der Art auch bei der Install unter Linux 
machen muss? Also dass ich beim erstellen der Toolchain irgendwelche 
--with-*** Anweisungen zu den in der Anleitung aufgeführten übergeben 
muss, oder welche aus der Anleitung entfernen muss?

Ich komm einfach nicht weiter, hab viele Anweisungen zur Toolchain im 
Internet gefunden und auch schon viele ausprobiert, aber es läuft 
einfach nicht.

Ich hoffe, dass mir hier jm. helfen kann, hab echt keine Idee mehr.

Schon mal vielen Dank,

gruß andy

von Rene H. (Gast)


Lesenswert?

Windows kenne ich leider nicht. :-)

In der Regel musst Du ja mit dem configure script die Makefiles 
erstellen, richtig?
Diese sollten die Einstellungen selber korrekt machen, also ob Big oder 
Little etc.
danach make / make install.

Viel falsch kann man da nicht machen, im Grunde.

von Rene H. (Gast)


Lesenswert?

Ah jetzt ja :-) Sorry, Du möchtest ja die Toolchain Compilieren. :-)


Guck Dir doch mal das Configure Script im vi an. Dort solltest Du sehen 
können, welche Einstellungen Du da mitgeben kannst.

von Rene H. (Gast)


Lesenswert?

Der Linker sagt:

nxt_binary_header.o uses hardware FP, whereas nxtway_app_rom.elf
uses software FP

Ich vermute mal nxt_binary_header.o ist von Dir und das ist nicht mit 
dem Soft FP Kompiliert worden. Du wirst dem Compiler mitgeben müssen, 
dass Du Soft FP willst (man pages gucken).

von Andy A. (grandmaster)


Lesenswert?

Huhu!

Also das nxtway_app_rom.elf kommt erzeugt die Toolchain aus meinem 
*.c-File, aus meinem nxtway_app.o. Das file nxt_binary_header.o ist ein 
fertiges File, das aber vorher erzeugt wird:
Assembling 
/ecrobotNXT_v312/ecrobotNXT/environment/nxtOSEK/ecrobot/nxt_binary_heade 
r.s  to build/nxt_binary_header.o

Soll ich mal die ganze Fehlermeldung posten?

@Rene:

Du schreibst: 'Guck Dir doch mal das Configure Script im vi an'.
Was ist vi? *schäm? ;)

Danke schomal für eure Hilfe!

von Rene H. (Gast)


Lesenswert?

Ja, poste mal alles. Du willst da was mit Soft FP und Hard FP linken, 
das geht nicht. vi ist ein Editor unter UNIX. Kannst aber auch

more ./configure

machen.

von Rene H. (Gast)


Lesenswert?

Ich nehme an, das Zielsystem hat kein Hard FP. Dann musst du gucken dass 
Du das File nxt_binary_header.c mit Soft FP kompilierst.

von Rene H. (Gast)


Lesenswert?

poste doch einfach mal den kompletten gcc output, damit man 
nachvollziehen kann woher welches File kommt und wie was kompiliert 
wird.

von Andy Andy (Gast)


Lesenswert?

Hallo!

Also hier mal ein helloworld programm, dass unter Windows so komplett 
durchläuft, wenn ich make all eingebe.

Unter Linux passiert folgendes:

linux-y8m0:/home/andy/Documents/ecrobotNXT/environment/nxtOSEK/samples_c 
/helloworld  # make all
Compiling ../../ecrobot/../toppers_osek/kernel/alarm.c to alarm.o
Compiling ../../ecrobot/../toppers_osek/kernel/event.c to event.o
Compiling ../../ecrobot/../toppers_osek/kernel/interrupt.c to 
interrupt.o
Compiling ../../ecrobot/../toppers_osek/kernel/osctl.c to osctl.o
Compiling ../../ecrobot/../toppers_osek/kernel/resource.c to resource.o
Compiling ../../ecrobot/../toppers_osek/kernel/task.c to task.o
Compiling ../../ecrobot/../toppers_osek/kernel/task_manage.c to 
task_manage.o
Compiling 
../../ecrobot/../toppers_osek/config/at91sam7s-gnu/cpu_config.c to 
cpu_config.o
Compiling 
../../ecrobot/../toppers_osek/config/at91sam7s-gnu/lego_nxt/sys_config.c 
to sys_config.o
Generating  testststs OSEK kernel config files from ./helloworld.oil
Compiling kernel_cfg.c to kernel_cfg.o
Compiling ../../ecrobot/../ecrobot/c/syscalls.c to syscalls.o
Compiling ../../ecrobot/../ecrobot/c/ecrobot_bluetooth.c to 
ecrobot_bluetooth.o
Compiling ../../ecrobot/../ecrobot/c/ecrobot_base.c to ecrobot_base.o
Compiling ../../ecrobot/../ecrobot/c/ecrobot.c to ecrobot.o
Compiling helloworld.c to helloworld.o
Compiling 
../../ecrobot/../toppers_osek/syslib/at91sam7s-gnu/lego_nxt/hw_sys_timer 
.c  to hw_sys_timer.oram
Assembling ../../ecrobot/../lejos_nxj/src/nxtvm/platform/nxt/vectors.s 
to vectors.o
Assembling ../../ecrobot/../toppers_osek/config/at91sam7s-gnu/debug.S to 
debug.o
Assembling 
../../ecrobot/../toppers_osek/config/at91sam7s-gnu/lego_nxt/sys_support. 
S  to sys_support.o
Assembling ../../ecrobot/../ecrobot/c/nxt_binary_header.s to 
nxt_binary_header.o
Assembling ../../ecrobot/../ecrobot/c/nxt_entry_point.s to 
nxt_entry_point.o
Assembling ../../ecrobot/../ecrobot/c/ecrobot_init.s to ecrobot_init.o
Assembling 
../../ecrobot/../toppers_osek/config/at91sam7s-gnu/cpu_support.S to 
cpu_support.oram
Assembling ../../ecrobot/../toppers_osek/config/at91sam7s-gnu/irq.s to 
irq.oram
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
build/nxtvm/platform/nxt/vectors.o uses hardware FP, whereas 
helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file build/nxtvm/platform/nxt/vectors.o
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
build/nxt_binary_header.o uses hardware FP, whereas 
helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file build/nxt_binary_header.o
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
build/nxt_entry_point.o uses hardware FP, whereas 
helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file build/nxt_entry_point.o
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
build/ecrobot_init.o uses hardware FP, whereas helloworld_OSEK_rom.elf 
uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file build/ecrobot_init.o
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(ecrobot_device_hook.o) uses 
hardware FP, whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(ecrobot_device_hook.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(ecrobot_interface.o) uses hardware 
FP, whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(ecrobot_interface.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(osek_hook.o) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(osek_hook.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(uart.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(uart.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(systick.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(systick.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(byte_fifo.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(byte_fifo.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(aic.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(aic.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(udp.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(udp.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(twi.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(twi.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(nxt_spi.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(nxt_spi.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(nxt_motors.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(nxt_motors.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(data_abort.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(data_abort.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(display.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(display.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(i2c.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(i2c.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(sound.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(sound.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(bt.oram) uses hardware FP, whereas 
helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(bt.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(nxt_avr.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(nxt_avr.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(sensors.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(sensors.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(nxt_lcd.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(nxt_lcd.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(flash_loader.oram) uses hardware 
FP, whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(flash_loader.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(interrupts.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(interrupts.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(ecrobot_usb.o) uses hardware FP, 
whereas helloworld_OSEK_rom.elfuses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(ecrobot_usb.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
../../ecrobot/../ecrobot/libecrobot.a(flashprog.oram) uses hardware FP, 
whereas helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
../../ecrobot/../ecrobot/libecrobot.a(flashprog.oram)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(memcpy.o)  uses hardware FP, whereas helloworld_OSEK_rom.elf 
uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(memcpy.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(memset.o)  uses hardware FP, whereas helloworld_OSEK_rom.elf 
uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(memset.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(strcmp.o)  uses hardware FP, whereas helloworld_OSEK_rom.elf 
uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(strcmp.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(strcpy.o)  uses hardware FP, whereas helloworld_OSEK_rom.elf 
uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(strcpy.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(strlen.o)  uses hardware FP, whereas helloworld_OSEK_rom.elf 
uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(strlen.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(strncpy.o)  uses hardware FP, whereas helloworld_OSEK_rom.elf 
uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file 
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwor 
k/libc.a(strncpy.o)
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: ERROR: 
build/nxtvm/platform/nxt/vectors.o uses hardware FP, whereas 
helloworld_OSEK_rom.elf uses software FP
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: failed to 
merge target specific data of file build/nxtvm/platform/nxt/vectors.o
collect2: ld returned 1 exit status
make: *** [helloworld_OSEK_rom.elf] Fehler 1
linux-y8m0:/home/andy/Documents/ecrobotNXT/environment/nxtOSEK/samples_c 
/helloworld  #


Ist ziemlich viel, ich hoffe, ihr blickt da durch. Wie schon gesagt, 
einzige was halt wirklich nur unterschiedlich sein kann, ist eben die 
art der Konfiguration der gnu-toolchain, glaub ich. Weiß halt nicht, was 
ich bei Linux eingeben muss, wenn ich die toolchain konfiguriere.

Ich hoffe, es kann mir jm. helfen :).

Danke schonmal für eure Hilfe!

von Rene H. (Gast)


Lesenswert?

Poste doch bitte noch das Makefile.

von Rene H. (Gast)


Lesenswert?

Spar das Makefile. Du hast die libs nicht mit Soft FP kompiliert. Musst 
Du nochmals kompilieren und installieren.

von Rene H. (Gast)


Lesenswert?

Sorry wenn meine Post etwas kurz und komisch sind, ich mach das alles 
mit dem iPhone.

Vermutlich hast Du bei newlib kompilieren

--with-float=soft

vergessen.


Ich bin mir aber nicht sicher. Das ist etwas wirr, was von wo kommt.
Es ist ein völliges Chaos von mit und ohne Hard FP.

Was hat das Zielsystem? Mit Hard FP oder Ohne?

von Andy A. (grandmaster)


Angehängte Dateien:

Lesenswert?

Hallo!

Also erstmal vielen Dank für eure reichlichen Antworten. Die Files 
befinden sich als Zip im Anhang. Also das *.c, *.oil und das makefile.

Die sollten aber stimmen, weil ich die unter Windows komplett richtig 
kompilieren kann und das File, welches dabei raus kommt, funzt dann 
auch, wenn ich es auf den µC.

Das Zielsystem, also der Controller, auf den das Programm geladen werden 
soll, hat kein hardware-floatingpoint. Also Float=Soft.

Hab die Gnu-Arm-Toolchain wie folgt kompiliert:

cd build-binutils
../binutils-2.16.1/configure --target=arm-elf --prefix=/usr/bin/gnuarm 
--enable-interwork --enable-multilib --enable-target-optspace 
--with-float=soft

cd ../build-newlib
../newlib-1.14.0/configure --target=arm-elf --prefix=/usr/bin/gnuarm 
--enable-interwork --enable-multilib --enable-target-optspace 
--with-float=soft

cd ../build-gcc
sudo ../gcc-4.0.2/configure --target=arm-elf --prefix=/usr/bin/gnuarm 
--enable-interwork --enable-multilib --enable-languages="c,c++" 
--enable-target-optspace --with-float=soft --with-newlib 
--with-headers=../newlib-1.14.0/newlib/libc/include/ --disable-nls

cd ../build-gdb
../gdb-6.8/configure --target=arm-elf --prefix=/usr/bin/gnuarm 
--enable-interwork --enable-multilib --enable-target-optspace 
--disable-werror

Hab also bei der newlib leider nicht einfach --with-float=soft 
vergessen. Allerdings steht das bei der gdb-6.8 config nicht drin. Kann 
das ein Problem sein?

Was mir auch noch eingefallen ist. Ich hab ja von Haus aus bei der Linux 
install gcc mit installiert. Da benutz ich die aktuellste Version. Im 
Internet hab ich gelesen, dass dieser Fehler den ich hab, auftritt, wenn 
man für den einen compiler gcc aktueller gcc-4.0.2 hat. Ich hab ja jetzt 
mit meiner Toolchain den gcc-4.0.2 runtergeladen, kompiliert und 
installiert. Jetzt hab ich ja auch auch noch den anderen gcc drauf. Hat 
der was mit der Arm Toolchain zu tun? Kann es sein, dass der Probleme 
macht? Oder hat das miteinander gar nix zu tun? Bei der Fehlermeldung 
kommt der Error ja auch von:
/opt/gnuarm/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld

also aus dem gnuarm Verzeichniss.

Hoffe, ihr habt noch Ideen, ich hab keine mehr :(.

Danke,

andy

von Rene H. (Gast)


Lesenswert?

Das könnte das Problem sein. Schmeiss nochmals alles runter inkl. den 
gcc. Dann installiere den gcc 4.0.2 und kompiliere die Toolchain 
nochmals. Das Problem welches Du hast, ist, das die libc (die wird mit 
dem gcc kompiliert) mit Hardware FP gebildet wurde. Deshalb motzt der 
Linker.

von Andy Andy (Gast)


Lesenswert?

Also soweit mal besten dank. Dann probier ich das heute Mittag mal aus. 
Weißt du zufällig auch, ob ich einfach den aktuellen gcc in yast löschen 
kann und den 4.0.2er installieren? Meinst du das geht? Löscht der auch 
alle libs, die jetzt schon drauf sind?

Naja, ich werde mal testen und meld mich dann!

Danke schön!

von Rene H. (Gast)


Lesenswert?

Ja, das geht.

von Andy Andy (Gast)


Lesenswert?

Hallo!

Also ich hab jetzt mit mal eine Virtual Maschine aufgesetzt und SUSE mal 
ohne gcc installiert. Hab ganz naiv gedacht, ich kann dann über yast 
einfach den gcc-4.0.2 installieren, aber den gibts da nicht.
Man muss dazu sagen, dass ich von Linux nicht so die Ahnung habe :(.

Ich hab dann mal den gcc-3.4.3 installiert und damit die Toolchain 
compiliert. Danach konnte ich mein c, oil, make-File wieder wie gehabt 
compilieren, und es kamen die gleichen Fehler.

Hast du noch eine Idee? Muss es wirklich der 4.0.2er sein? Wenn ja, wie 
bekomm ich den auf einen für mich machbaren Weg auf meinen Linux PC? :-(

Schönes WE, gruß andy

von Rene H. (Gast)


Lesenswert?

Mail mir bitte mal den kompletten Output wie die toolchain gebildet 
wird. Da hat es ein Fehler. Libc wird mit HW FP gebildet.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.