arm 初始化代码中的{CONFIG}语句疑问
2009-10-17 10:23
176 查看
ARM9 SC2440和2410得初始化代码中有下面一个定义:
GBLL THUMBCODE
[ {CONFIG} = 16
THUMBCODE SETL {TRUE}
CODE32
|
THUMBCODE SETL {FALSE}
]
网上的朋友有问下面问题的,我也有疑惑,从ARM官方网站查到了答案。特此列出。
请问代码里的 {CONFIG} 代表什么含义,如何知道它是不是等于为16
是某处定义的某个变量?
还是编译的时候某个配置选项?
用{}括起来代表什么含义
CONFIG 是ADS1.2编译器内建变量,还有其他一些内建变量。
Built-in variables and constants
Table 3.3 lists the built-in variables defined by the ARM assembler.
Table 3.3. Built-in variables
Built-in variables cannot be set using the SETA, SETL, or SETS directives. They can be used in expressions or conditions, for example:
IF {ARCHITECTURE} = "4T"
The built-in variable |ads$version| must be all in lowercase. The names of the other built-in variables can be in uppercase, lowercase, or mixed. For example:
IF {CpU} = "ARM7TDMI"
Note
All built-in string variables contain case-sensitive values. See CPU names for valid values for {CPU} and {ARCHITECTURE}. See FPU names for valid values for {FPU}. Relational operations on these built-in variables will not match with strings that contain an incorrect case.
Table 3.4 lists the built-in Boolean constants defined by the ARM assembler.
Table 3.4. Built-in Boolean constants
GBLL THUMBCODE
[ {CONFIG} = 16
THUMBCODE SETL {TRUE}
CODE32
|
THUMBCODE SETL {FALSE}
]
网上的朋友有问下面问题的,我也有疑惑,从ARM官方网站查到了答案。特此列出。
请问代码里的 {CONFIG} 代表什么含义,如何知道它是不是等于为16
是某处定义的某个变量?
还是编译的时候某个配置选项?
用{}括起来代表什么含义
CONFIG 是ADS1.2编译器内建变量,还有其他一些内建变量。
Built-in variables and constants
Table 3.3 lists the built-in variables defined by the ARM assembler.
Table 3.3. Built-in variables
{ARCHITECTURE} | Holds the name of the ARM architecture selected by the --device option. |
{AREANAME} | Holds the name of the current AREA. |
{ARMASM_VERSION} | Holds an integer that increases with each version of armasm. |
|ads$version| | Has the same value as {ARMASM_VERSION}. |
{CODESIZE} | Is a synonym for {CONFIG}. |
{COMMANDLINE} | Holds the contents of the command line. |
{CONFIG} | Has the value 32 if the assembler is assembling ARM code, or 16 if it is assembling Thumb code. |
{CPU} | Holds the name of the CPU selected by the --device option. |
{ENDIAN} | Has the value “big” if the assembler is in big-endian mode, or “little” if it is in little-endian mode. The default value is selected by the --device option. |
{FPU} | Holds the name of the FPU. The default FPU name is selected by the --device option. |
{INPUTFILE} | Holds the name of the current source file. |
{INTER} | Has the boolean value True if /inter is set. The default is False. |
{LINENUM} | Holds an integer indicating the line number in the current source file. |
{OPT} | Value of the currently-set listing option. The OPT directive can be used to save the current listing option, force a change in it, or restore its original value. |
{PC} or . | Address of current instruction. |
{PCSTOREOFFSET} | Is the offset between the address of the STR pc,[…] or STM Rb,{…, pc} instruction and the value of pc stored out. This varies depending on the device specified. |
{ROPI} | Has the boolean value True if /ropi is set. The default is False. |
{RWPI} | Has the boolean value True if /rwpi is set. The default is False. |
{VAR} or @ | Current value of the storage area location counter. |
IF {ARCHITECTURE} = "4T"
The built-in variable |ads$version| must be all in lowercase. The names of the other built-in variables can be in uppercase, lowercase, or mixed. For example:
IF {CpU} = "ARM7TDMI"
Note
All built-in string variables contain case-sensitive values. See CPU names for valid values for {CPU} and {ARCHITECTURE}. See FPU names for valid values for {FPU}. Relational operations on these built-in variables will not match with strings that contain an incorrect case.
Table 3.4 lists the built-in Boolean constants defined by the ARM assembler.
Table 3.4. Built-in Boolean constants
{FALSE} | Logical constant false. |
{TRUE} | Logical constant true. |
相关文章推荐
- arm 初始化代码中的{CONFIG}语句疑问
- arm 初始化代码中的{CONFIG}语句疑问
- arm 初始化代码中的{CONFIG}
- ARM Uboot经历——Uboot初始化代码解析
- arm 汇编代码还原--for语句还原
- Eclipse初始化常用设置(字体大小、代码补全、TODO语句等)
- ARM Uboot经历——Uboot初始化代码解析
- 注册中心 Eureka 源码解析 —— Eureka-Client 初始化(二)之 EurekaClientConfig
- 关于asp.net 代码显示在浏览器里的一点疑问
- ARM启动代码原理和分析
- c#新手入门级代码分享 using指令与using语句的实例
- XMPPFramework初始化、登录、注册详解(附代码)
- 牛腩购物 8 整合用户留言 动软生成器 ,.NET在后置代码中输入JS提示语句(背景不会变白),repeater 循环的时候事件判断,repeater 隔行 奇数行,item列,隐藏区块 Panel 的使用,前台绑定代码的时候使用函数
- php中转义mysql语句的实现代码
- 为什么ARM的启动代码是汇编?
- arm启动代码分析(转)
- 静态变量的两种初始化顺序与代码顺序相关。
- ARM初始化过程详解
- Linux 3.14的设备树-ARM架构-4412平台,最详细的实战开发代码(一)
- 存储过程 VS 嵌入代码的sql语句