【查错】ARM交叉编译器出现如下错误查找Error: internal_relocation (type: OFFSET_IMM) not fixed up

错误如下:

[email protected]:~/workbook/hardware/led_on2$ arm-linux-gcc -c -o led_on2.o led_on2.S

led_on2.S: Assembler messages:

led_on2.S:15: Error: internal_relocation (type: OFFSET_IMM) not fixed up


原因查找:

/*设置邋邋GPF4为低电平输出0,写到地址:0x56000054*/
LDR R1, =0x56000054
LDR R0, =0 //GPFDAT : 0x0000 0000
STR R0, R1

语法错误:STR R0, R1   -》  STR  R0, [R1]

汇编程序中包含了对错误变量的定义


猜你喜欢

转载自blog.csdn.net/weixin_39420903/article/details/79753978
今日推荐