Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6539
  • 博文数量: 6
  • 博客积分: 150
  • 博客等级: 入伍新兵
  • 技术积分: 75
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-22 00:13
文章分类

全部博文(6)

文章存档

2011年(6)

我的朋友
最近访客

分类: 嵌入式

2011-05-05 11:47:06

-----------------------------------------------------------------

下面以boot270工程为例子分析:

输出的Image Symbol Table

Global Symbols

 

    Symbol Name      Value              Ov Type       Size  Object(Section)

xlli_read_SCR      0xa000cea0      ARM Code     420  xlli_LowLev_Init.o(text)

可以看出xlli_read_SCRARM Code,是一个标号label,值即为其在bin中的地址,由于设置RO Base0xA0000000,所以在bin中找0x0000cea0处的指令:

clip_image002

指令为E59F_419C,即为

xlli_read_SCR   FUNCTION

;

;       Insure the RDH and PH bits on PXA27x must be clear to enable GPIO pins.

;       They are sticky bits so they must be set to clear them.

;

        ldr     r4, =xlli_PMRCREGS_PHYSICAL_BASE

该指令表示(E表示AL,无条件,FR15=PC4表示放到R4里,地址为PC+19C=D03C,再加2*4D044

clip_image004

0x0000d044处的数据为40F00000,与代码中的数据吻合:

; POWER MANAGER base address and register offsets from the base address

;

 

xlli_PMRCREGS_PHYSICAL_BASE  EQU    0x40F00000

这个数据在Image Symbol Table中也能找到,在Local Symbols中:

xlli_PMRCREGS_PHYSICAL_BASE    0x40f00000   Number     0  main_Flash.o ABSOLUTE

能看到是一个Number,值value0x40f00000

这个数据的地址在Image Symbol Table中也能看到:

Mapping Symbols

 

    Sym    Value        Execution Region

$d     0xa000d044   ER_RO

$d表示数据data

 

下一条指令:

;       Get, and save the present GPIO settings for direction registers 0, 1 and 2

;

        ldr     r4,  =xlli_GPIOREGS_PHYSICAL_BASE  ; Get the GPIO registers base address

clip_image006

指令为:E5_9F_4_194

数据的地址为:PC+194+2*4=D048

clip_image008

数据为:40E0 0000,与代码中的定义对应:

; GENERAL PURPOSE I/O (GPIO) base address and register offsets from the base address

;

 

xlli_GPIOREGS_PHYSICAL_BASE   EQU    0x40E00000

地址0x0000 D048Image Symbol Table中没有,不过有:

Mapping Symbols

 

    Sym    Value        Execution Region

$d     0xa000d044   ER_RO

说明从0xa000d044处开始为许多RO data

 

阅读(396) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~