汇编编译是出现错误:
arm-linux-gnueabihf-gcc -g -c start.s -o led.o
start.s: Assembler messages:
start.s:14: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.s:20: Error: internal_relocation (type: OFFSET_IMM) not fixed up
Makefile:2: recipe for target 'led.bin' failed
make: *** [led.bin] Error 1
检查实际的代码,为书写错误,汇编中的赋值需要加上等于号“=”,实际编写时漏掉了。
ldr r0, =0x020c4070
str r1, [r0]
ldr r0, 0x020c4078
str r1, [r0]
ldr r0, =0x020c407c
str r1, [r0]
ldr r0, 0x020c4080
str r1, [r0]
14行与20行代码输入错误,更正后重新编译正常