请教ARM汇编 keil 编译提示

[复制链接]
2831|5
 楼主| itelectron 发表于 2014-3-30 08:28 | 显示全部楼层 |阅读模式
FUN1                               
                LDR        R0, =0x20000388
                LDR        R1, =0x20000988
                LDR        R2, =0x20000588
                LDR        R3, =0x20000588
                BX        LR

main.asm: error: A1284E: Literal pool too distant, use LTORG to assemble it within 4KB
zchong 发表于 2014-3-30 19:15 | 显示全部楼层
A1284E
Literal pool too distant, use LTORG to assemble it within 4KB
For ARM code, the literal pool must be within 4KB of the LDR instruction to access it. To solve this, add an LTORG directive into your assembler source file at a convenient place.
See the following in Using the Assembler:
Load addresses to a register using LDR Rd, =label.
See the following in the Assembler Reference:
LTORG.
ayb_ice 发表于 2014-3-31 08:49 | 显示全部楼层
这是个伪指令,应该是说目标太远,只能在4KB内

在附近内存里定义常量然后加载,

不过应该不会出错的,这些都是汇编器自动处理的

lr2131 发表于 2014-3-31 11:08 | 显示全部楼层
关注,帮顶
 楼主| itelectron 发表于 2014-4-3 21:45 | 显示全部楼层
FUN_8                                
                LDR        R0, =0x20000388
                LDR        R1, =0x20000988
                LDR        R2, =0x20000588
                LDR        R3, =0x20000588
                BX        LR


; ---------------------------------------------------------------------------
                DCB    0
                DCB    0
                DCB 0x31
                DCB    1
                DCB    0
                DCB    8
dword_1         DCD 0x20000388
dword_2         DCD 0x20000988
dword_3         DCD 0x20000588
dword_4         DCD 0x20000588
 楼主| itelectron 发表于 2014-4-3 21:46 | 显示全部楼层
问题还是 没有解决 继续求助
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:MARK: zhi kan ji shu

274

主题

2761

帖子

8

粉丝
快速回复 在线客服 返回列表 返回顶部