MDK中定义
unsigned char ary[3] __attribute__((at(0x20000000))) = {0, 1, 3}; //MDK中定义变量指定SRAM地址
const unsigned char buf[2] __attribute__((at(0x08035800))) = {9, 7}; //MDK中定义常量指定Flash地址
void fun(void) __attribute__((at(0x08075800))); //MDK中定义函数指定Flash地址
GCC中定义
unsigned char ary[3] __attribute__((section(".ARM.__at_0x20000100")))= {0, 1, 3}; //GCC中定义 变量指定SRAM地址