arm-none-eabi-ld: cannot find -lc

Ich versuche, code für XMC1100 basiertes Entwicklungs-board.
Ich versuche dieses tutorial : http://eleceng.dit.ie/frank/arm/BareMetalXMC2Go/index.html

Heruntergeladen habe ich das blinky.tar.gz Datei und entpackt. Wenn ich versuche "machen" ich bin immer diese Fehlermeldung : arm-none-eabi-ld: cannot find -lc

Ist hier die Ausgabe von "make"

arm-none-eabi-gcc -c -mcpu=cortex-m0 -mthumb -g init.c -o init.o
arm-none-eabi-gcc -c -mcpu=cortex-m0 -mthumb -g main.c -o main.o
arm-none-eabi-ld init.o main.o  -L /usr/lib/gcc/arm-none-eabi/4.8.2/armv6-m -T linker_script.ld -lc --cref -Map main.map -nostartfiles -o main.elf
arm-none-eabi-ld: cannot find -lc
make: *** [main.elf] Error 1

Ich bin mit Linux Mint 17 Qiana

Was ich bin fehlt?

Hier ist mein makefile :

LIBSPEC=-L /usr/lib/gcc/arm-none-eabi/4.8.2/armv6-m

# Specify the compiler to use
CC=arm-none-eabi-gcc
# Specify the assembler to use
AS=arm-none-eabi-as
# Specity the linker to use
LD=arm-none-eabi-ld

CCFLAGS=-mcpu=cortex-m0 -mthumb -g

# List the object files involved in this project
OBJS=   init.o \
        main.o 

# The default 'target' (output) is main.elf and it depends on the object files being there.
# These object files are linked together to create main.elf
main.elf : $(OBJS)
    $(LD) $(OBJS) $(LIBSPEC) -T linker_script.ld -lc --cref -Map main.map -nostartfiles -o main.elf
    arm-none-eabi-objcopy -O binary main.elf main.bin
    objcopy -O ihex main.elf main.hex
    @echo "done"

# The object file main.o depends on main.c.  main.c is compiled to make main.o
main.o: main.c
    $(CC) -c $(CCFLAGS) main.c -o main.o


init.o: init.c
    $(CC) -c $(CCFLAGS) init.c -o init.o

# if someone types in 'make clean' then remove all object files and executables
# associated wit this project
clean: 
    rm $(OBJS) 
    rm main.elf
    rm main.bin 
  • Ich denke, dass Ihr LIBSPEC ist falsch. Ich habe das Beispiel-Skript von der Website, die Sie verlinkt und auch heruntergeladen jüngsten (4_9-2014q4) version der toolchain für Linux und Windows, und Ihre LIBSPEC entspricht nicht der Verzeichnis-Struktur dieser Quellen. Wie haben Sie diese toolchain?
  • Hallo John, ich habe installiert mit apt-get. es downloads von der offiziellen repo. Habe ich geändert LIBSPEC, weil das Verzeichnis, in der orginal-Datei nicht vorhanden ist. Sie haben eine Idee, wie Sie den richtigen Weg zu finden für LIBSPEC?
  • Es wird mit libc.a was die -lc option bezieht sich auf (-lXXX links eine Bibliothek namens libXXX.a).
  • vielen Dank für Ihre Antwort, hat mir sehr geholfen. hier ist das richtige Verzeichnis /usr/lib/arm-none-eabi/newlib/armv7-m Es kompiliert jetzt mit diesem Verzeichnis.
InformationsquelleAutor fobus | 2015-02-16
Schreibe einen Kommentar