linux裸机开发 小白报错

1、错误:

as   -o start.o start.s
start.s: Assembler messages:
start.s:21: 错误: no such instruction: `mrs r0,cpsr'
start.s:22: 错误: no such instruction: `bic r0,r0,'
start.s:23: 错误: no such instruction: `orr r0,r0,'
start.s:24: 错误: no such instruction: `msr cpsr,r0'
start.s:26: 错误: no such instruction: `ldr sp,=0X80200000'
start.s:27: 错误: no such instruction: `b main'
<builtin>: recipe for target 'start.o' failed
make: *** [start.o] Error 1

解决:修改MakeFile文件,两个‘S’保持一样的大小写


        2、错误:

arm-linux-gnueabihf-gcc -Wall -nostdlib -c -O2 -o start.o start.s
 make: *** No rule to make target 'mian.o', needed by 'ledc.bin'。 停止。

检查是否main.o拼写错误

3、arm-linux-gnueabihf-lds -Timx6u.lds -o ledc.elf start.o main.o 
make: arm-linux-gnueabihf-lds:命令未找到
Makefile:13: recipe for target 'ledc.bin' failed
make: *** [ledc.bin] Error 127

修改:链接文件

修改后:

  • 11
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值