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 */ 实验证明过的,有问题发邮件:zhangsongchen@gmail.com 想问一下LZ,你上述所说的是把一个变量定义到一个绝对地址当中,那怎样把一个函数定义到结对地址当中呢? 函数定义绝对地址, 就要用连接命令了.
看一下连接器参考手册
页:
[1]