Hi ! I'm using Embedded Linux Development Kit and I have some errors when I try to execute the makefile to rebuild a firmware (lejos for nxt): /opt/eldk/usr/bin/arm-linux-ld: ERROR: init.o uses FPA instructions, whereas lejos_nxt_ram.elf does not /opt/eldk/usr/bin/arm-linux-ld: failed to merge target specific data of file init.o /opt/eldk/usr/bin/arm-linux-ld: ERROR: interrupts.o uses FPA instructions, whereas lejos_nxt_ram.elf does not /opt/eldk/usr/bin/arm-linux-ld: failed to merge target specific data of file interrupts.o /opt/eldk/usr/bin/arm-linux-ld: ERROR: vectors.o uses FPA instructions, whereas lejos_nxt_ram.elf does not /opt/eldk/usr/bin/arm-linux-ld: failed to merge target specific data of file vectors.o /opt/eldk/usr/bin/arm-linux-ld: ERROR: irq.o uses FPA instructions, whereas lejos_nxt_ram.elf does not /opt/eldk/usr/bin/arm-linux-ld: failed to merge target specific data of file irq.o /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/arm/lib/libc.a(strlen.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/arm/lib/libc.a(memset.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/arm/lib/libc.a(memcpy.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/arm/lib/libc.a(wordcopy.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_udivsi3.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_divsi3.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_umodsi3.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_modsi3.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_dvmd_lnx.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_addsubsf3.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_muldivsf3.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_cmpsf2.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/usr/lib/gcc/arm-linux/4.0.0/libgcc.a(_fixsfsi.o) does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: Warning: /opt/eldk/arm/lib/libm.so does not support interworking, whereas lejos_nxt_ram.elf does /opt/eldk/usr/bin/arm-linux-ld: error: no memory region specified for loadable section `.dynamic' make: *** [lejos_nxt_ram.elf] Erreur 1 I don't manage to solved these errors; Can you help me please? Here there is the makefile: GCC_VERSION :=4.0.0 COMP_PATH := /opt/eldk LIBPREFIX := $(COMP_PATH)/arm/lib GCC_LIB := $(COMP_PATH)/usr/lib/gcc/arm-linux/$(GCC_VERSION)/libgcc.a LIBC := $(COMP_PATH)/arm/lib/libc.a TARGET_PREFIX :=arm-linux INC_PATH := $(COMP_PATH)/arm/usr/include CC := $(COMP_PATH)/usr/bin/$(TARGET_PREFIX)-gcc AS := $(COMP_PATH)/usr/bin/$(TARGET_PREFIX)-as AR := $(COMP_PATH)/usr/bin/$(TARGET_PREFIX)-ar LD := $(COMP_PATH)/usr/bin/$(TARGET_PREFIX)-ld OBJCOPY := $(COMP_PATH)/usr/bin/$(TARGET_PREFIX)-objcopy PHONY: EnvironmentMessage EnvironmentMessage: @echo " CC $(CC)" @echo " AS $(AS)" @echo " AR $(AR)" @echo " LD $(LD)" @echo " OBJCOPY $(OBJCOPY)" Thanks for any answer.
that was the environnment.make. The real makefile is: .SUFFIXES: default: def_target include environment.mak include targetdef.mak RAM_TARGET := $(TARGET)_ram.elf ROM_TARGET := $(TARGET)_rom.elf SAMBA_TARGET := $(TARGET)_samba_ram.bin ROMBIN_TARGET := $(TARGET)_rom.bin RAM_LDSCRIPT := $(TARGET)_ram.ld ROM_LDSCRIPT := $(TARGET)_rom.ld SAMBA_LDSCRIPT := $(TARGET)_samba.ld S_OBJECTS := $(S_SOURCES:.s=.o) C_OBJECTS := $(C_SOURCES:.c=.o) $(C_RAMSOURCES:.c=.oram) C_OPTIMISATION_FLAGS = -Os #C_OPTIMISATION_FLAGS = -O0 CFLAGS = -c -ffreestanding -fsigned-char -mcpu=arm7tdmi \ $(C_OPTIMISATION_FLAGS) -g \ -Winline -Wall -Werror-implicit-function-declaration \ -I. -I$(VM_DIR) \ -mthumb -mthumb-interwork -ffunction-sections -fdata-sections LDFLAGS = -Map $@.map -L$(LIBPREFIX) -lm -cref --gc-sections $(LIBC) ASFLAGS = -mthumb-interwork -mfpu=softfpa def_target: all ALL_TARGETS := $(RAM_TARGET) $(ROM_TARGET) $(ROMBIN_TARGET) $(SAMBA_TARGET) .PHONY: all all: BuildMessage $(ALL_TARGETS) PHONY: TargetMessage TargetMessage: @echo "" @echo "Building: $(ALL_TARGETS)" @echo "" @echo "C sources: $(C_SOURCES) to $(C_OBJECTS)" @echo "" @echo "Assembler sources: $(S_SOURCES) to $(S_OBJECTS)" @echo "" @echo "LD source: $(LDSCRIPT_SOURCE)" @echo "" PHONY: BuildMessage BuildMessage: TargetMessage EnvironmentMessage $(SAMBA_LDSCRIPT): $(LDSCRIPT_SOURCE) cat $< | sed -e 's/^SAMBA_ONLY//' -e '/^RAM_ONLY/d' -e'/^ROM_ONLY/d' >$@ $(RAM_LDSCRIPT): $(LDSCRIPT_SOURCE) cat $< | sed -e 's/^RAM_ONLY//' -e'/^ROM_ONLY/d' -e'/^SAMBA_ONLY/d' >$@ $(ROM_LDSCRIPT): $(LDSCRIPT_SOURCE) cat $< | sed -e 's/^ROM_ONLY//' -e'/^RAM_ONLY/d' -e'/^SAMBA_ONLY/d' >$@ $(SAMBA_TARGET)_elf: $(C_OBJECTS) $(S_OBJECTS) $(SAMBA_LDSCRIPT) @echo "Linking $@" $(LD) -o $@ $(C_OBJECTS) $(S_OBJECTS) -T $(SAMBA_LDSCRIPT) $(LIBC) $(GCC_LIB) $(LDFLAGS) $(RAM_TARGET): $(C_OBJECTS) $(S_OBJECTS) $(RAM_LDSCRIPT) @echo "Linking $@" $(LD) -o $@ $(C_OBJECTS) $(S_OBJECTS) -T $(RAM_LDSCRIPT) $(LIBC) $(GCC_LIB) $(LDFLAGS) $(ROM_TARGET): $(C_OBJECTS) $(S_OBJECTS) $(ROM_LDSCRIPT) @echo "Linking $@" $(LD) -o $@ $(C_OBJECTS) $(S_OBJECTS) -T $(ROM_LDSCRIPT) $(LIBC) $(GCC_LIB) $(LDFLAGS) $(ROMBIN_TARGET): $(ROM_TARGET) @echo "Generating binary file $@" $(OBJCOPY) -O binary $< $@ $(SAMBA_TARGET): $(SAMBA_TARGET)_elf @echo "Generating binary file $@" $(OBJCOPY) -O binary $< $@ %.o: %.s @echo "Assembling $< to $@" $(AS) $(ASFLAGS) -o $@ $< %.o: %.c @echo "Compiling $< to $@" $(CC) $(CFLAGS) -o $@ $< %.oram: %.c @echo "Compiling $< to $@" $(CC) $(CFLAGS) -o $@ $< .PHONY: clean clean: @echo "Removing All Objects" @rm -f $(S_OBJECTS) $(C_OBJECTS) *.o @echo "Removing generated ld scripts" @rm -f *.ld @echo "Removing target" @rm -f $(ALL_TARGETS) @echo "Removing map files" @ rm -f *map -include $(C_SOURCES:.c=.d) Sorry for this error. Thanks for any help !
I suggest to use an arm-elf or arm-eabi toolchain not a arm-linux toolchain. You can get precompiled binaries for Linux (if this is your OS) i.e. from gnuarm.org and codesourcery.com I don't know enough about the arm-linux targets but but with such a toolchain you may try the compiler-options: -msoft-float or -mfloat-abi=soft (add to CFLAGS).
Martin Thomas wrote: > I suggest to use an arm-elf or arm-eabi toolchain not a arm-linux > toolchain. You can get precompiled binaries for Linux (if this is your > OS) i.e. from gnuarm.org and codesourcery.com > I don't know enough about the arm-linux targets but but with such a > toolchain you may try the compiler-options: -msoft-float or > -mfloat-abi=soft (add to CFLAGS). I'm in training course and I have to use the arm-linux targets with such a toolchain. So I tried the compiler-option: -msoft-float or -mfloat-abi=soft (add to CFLAGS) but I have exactly the same errors ! Someone can help me please ?? Have a nice day !
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.