RH850 CS+工程 定义常量变量到指定ROM地址

应用程序中定义const类型数组Test指定SECTION_TEST

#pragma section const   "SECTION_TEST"
uint32_t const     Test[] = {0x12345678};
#pragma section default

 

在CS+ Section设置界面设定地址0x21000;

Section名称写为SECTION_TEST.const  

增加了.const

那么经过此定义重新编译工程Test数据被指定在0x21000地址处。

posted on 2020-07-28 16:18  让代码改变世界ha  阅读(1135)  评论(0)    收藏  举报

导航