supercatinzoo 发表于 2011-4-6 15:37

MKD下地址绝对定位

先给例子:
const int x4 __attribute__((at(0x00010000)));
int x1 __attribute__((at(0x20003000)));
//
其中0x00010000、0x20003000分别为NUC140的Flash、Ram地址



MDK帮助文档:

__attribute__((at(address)))Example


const int x1 __attribute__((at(0x10000))) = 10; /* RO */int x2 __attribute__((at(0x12000))) = 10;       /* RW */int x3 __attribute__((at(0x14000))) = 0;      /* RW, not ZI */int x4 __attribute__((at(0x16000)));            /* ZI */

supercatinzoo 发表于 2011-4-6 15:38

实验证明过的,有问题发邮件:zhangsongchen@gmail.com

yuangt 发表于 2013-12-2 08:57

想问一下LZ,你上述所说的是把一个变量定义到一个绝对地址当中,那怎样把一个函数定义到结对地址当中呢?

airwill 发表于 2013-12-5 13:09

函数定义绝对地址, 就要用连接命令了.
看一下连接器参考手册
页: [1]
查看完整版本: MKD下地址绝对定位