02.07.2013 Views

Uboot中start.S源码的指令级的详尽解析

Uboot中start.S源码的指令级的详尽解析

Uboot中start.S源码的指令级的详尽解析

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

_stat=0<br />

如果是重新relocate代码之后,就是我们定义的值了,即,在<br />

u-boot-1.1.6_20100601\opt\EmbedSky\u-boot-1.1.6\board\EmbedSky\config.mk<br />

中的:<br />

TEXT_BASE = 0x33D00000<br />

表示是代码段的基地址,即<br />

_start=TEXT_BASE=0x33D00000<br />

关于标号的语法解释:<br />

http://sourceware.org/binutils/docs-2.20/as/Labels.html#Labels<br />

―A label is written as a symbol immediately followed by a colon `:'. The<br />

symbol then represents the current value of the active location counter,<br />

and is, for example, a suitable instruction operand. You are warned if<br />

you use the same symbol to represent two different locations: the first<br />

definition overrides any other definitions. ‖<br />

而_start标号后面的:<br />

b reset<br />

就是跳转到对应的标号为reset的位置。<br />

ldr pc, _undefined_instruction<br />

ldr pc, _software_interrupt<br />

ldr pc, _prefetch_abort<br />

ldr pc, _data_abort<br />

ldr pc, _not_used<br />

ldr pc, _irq<br />

ldr pc, _fiq<br />

ldr命令的语法为:<br />

http://infocenter.arm.com/help/topic/com.arm.doc.dui0206hc/DUI0206HC_<br />

rvct_linker_and_utilities_guide.pdf

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!