Chinaunix首页 | 论坛 | 博客
  • 博客访问: 583897
  • 博文数量: 119
  • 博客积分: 6010
  • 博客等级: 准将
  • 技术积分: 1583
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-15 09:18
文章分类

全部博文(119)

文章存档

2011年(3)

2010年(21)

2009年(44)

2008年(51)

我的朋友

分类:

2010-04-22 14:30:42

在KEIL中设定数组与变量的绝对地址
[ 2008-12-14 9:58:00 | By: SystemARM ]
 
0

Using the __at macro that is defined in the header file absacc.h allows you to locate variables to absolute addresses as shown below:

C Example:
#i nclude 

const char MyText[] __at (0x1F00) = "TEXT AT ADDRESS 0x1F00";
int x __at (0x40003000);     // variable at address 0x40003000
Assembler Example:

In assembler files you may define the location using section names composed of |.ARM.__AT_|. The following example will locate a section to address 0xFFE0:

     AREA |.ARM.__AT_0xFFE0|, CODE, READONLY
阅读(3602) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~