先给例子:
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 */ |