心心程序博客

眼过千遍不如手过一遍! 书看千行不如手敲一行! 手敲千行不如单步一行! 单步源代码千行不如单步对应汇编一行!

导航

在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 <absacc.h>

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

posted on 2011-06-24 21:03  心心程序博客  阅读(2542)  评论(0编辑  收藏  举报