返回> 网站首页 

Keil定位常量、变量到指定地址

yoours2021-08-12 20:56:35 阅读 2786

简介一边听听音乐,一边写写文章。

一、常量 - ROM区域

const char Version[] __attribute__((at(0x8001000))) =

{

    'M','V','1','0','0'

};


二、变量 - RAM区域

int val __attribute__((section(".ARM.__at_0x20000004"))) = 0x00;


三、函数 - ROM区域

#pragma arm section code=".ARM.__at_0x8002000"

void SendInfo(uint8_t data)

{

}

#pragma arm section


微信小程序扫码登陆

文章评论

2786人参与,0条评论