臂无 - EABI-LD:找不到-lc [英] arm-none-eabi-ld: cannot find -lc
问题描述
我想code为XMC1100基础开发板。
我想这个教程: http://eleceng.dit.ie/frank/ ARM / BareMetalXMC2Go / index.html的
我已经下载了blinky.tar.gz文件并解压。当我尝试做我得到这个错误:臂无 - EABI-LD:找不到-lc
下面是制造
输出 臂无 - EABI-GCC -c -mcpu =的Cortex-M0 -mthumb -g INIT.C -o init.o
臂无 - EABI-GCC -c -mcpu =的Cortex-M0 -mthumb -g main.c中-o main.o中
臂无 - 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
臂无 - EABI-LD:找不到-lc
使:*** [main.elf]错误1
我使用的是Linux Mint的17钱啊
我所缺少的?
下面是我的makefile:
LIBSPEC = -L /usr/lib/gcc/arm-none-eabi/4.8.2/armv6-m#指定编译器使用
CC =臂无 - EABI - 海合会
#指定汇编器使用
AS =臂无 - EABI,作为
#Specity使用接头
LD =臂无 - EABI-LDCCFLAGS = -mcpu =的Cortex-M0 -mthumb -g#列出参与这个项目的目标文件
OBJS = init.o \\
main.o中#默认的目标(输出)main.elf,它依赖于目标文件在那里。
#这些目标文件链接在一起以创建main.elf
main.elf:$(OBJS)
$(LD)$(OBJS)$(LIBSPEC)-T linker_script.ld -lc --cref -Map main.map的-nostartfiles -o main.elf
臂无 - EABI-objcopy把-O二进制main.elf main.bin
objcopy把-O ihex main.elf main.hex
@echo完成#目标文件main.o中依赖于main.c中main.c中被编译成使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#如果有人类型的使清洁,然后删除所有目标文件和可执行文件
#相关机智这个项目
清洁:
RM $(OBJS)
RM main.elf
RM main.bin
我遇到了同样的问题,命令和apt-get安装libnewlib臂无 - EABI'帮我。
I'm trying to code for XMC1100 based development board. I'm trying this tutorial : http://eleceng.dit.ie/frank/arm/BareMetalXMC2Go/index.html
I have downloaded the blinky.tar.gz file and unzipped. When I try "make" I'm getting this error : arm-none-eabi-ld: cannot find -lc
Here is the output of "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
I'm using Linux Mint 17 Qiana
What I am missing?
Here is my 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
I met the same problem and 'sudo apt-get install libnewlib-arm-none-eabi' helped me.
这篇关于臂无 - EABI-LD:找不到-lc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!