链接器找不到脚本文件

问题描述

运行makefile时,其中包括 一个脚本文件,我收到一条错误消息,说链接器找不到脚本文件。 运行make文件时,输出如下:

arm-none-eabi-gcc        -g -Wall -Werror                               -c -o main.o main.c
arm-none-eabi-gcc        -g -Wall -Werror                               -c -o misc.o misc.c
arm-none-eabi-gcc        main.o misc.o misc.h                         -g -Wall -Werror                                -Wl,-Map=HOST.map -T=msp432p401r.lds        -o HOST
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: cannot open linker script file =msp432p401r.lds: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:11: HOST] Error 1

makefile的内容为:

#----   Variables (machine depending)   --------
TARGET = HOST
CC     = arm-none-eabi-gcc              #gcc
CFLAGS = -g -Wall -Werror                                        # compiler flags
LDFLAGS = -Wl,-Map=$(TARGET).map -T=msp432p401r.lds              # linker flag
SOURCE = main.c misc.c misc.h
OBJS   = $(SOURCE:.c=.o)                                         # replace all c with o

#----   Targets          ----------- 
$(TARGET): $(OBJS)
        $(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) -o $@

我已经为该问题寻找了很多解决方案,并尝试了各种修复程序,但均未成功。 脚本文件与源文件位于同一位置。 找不到文件的原因可能是什么? 谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...