收藏0 举报
define symbol ICFEDIT_region_DATAROM_start = 0x0800 4000; define symbol ICFEDIT_region_DATAROM_end = 0x0800 7FFF; define region DATA_region = mem:[from ICFEDIT_region_DATAROM_start to ICFEDIT_region_DATAROM_end ]; place in DATA_region { readonly section .rom_data };
#define DATA_ROM _Pragma("location=".rom_data"") DATA_ROM const uint32_t test_data[] = {32,33,34}; DATA_ROM const uint32_t test_data2[] = {33,33,34};编译后的.map 文件中 可以看到 test_data 已经放在了我们希望存储的地址。 用户可以通过调用标准外设库提供的 flash 函数对该数据进行修改。
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
79
623
3
扫码关注 21ic 官方微信
扫码关注嵌入式微处理器
扫码关注电源系统设计
扫码关注21ic项目外包
扫码浏览21ic手机版
本站介绍 | 申请友情链接 | 欢迎投稿 | 隐私声明 | 广告业务 | 网站地图 | 联系我们 | 诚聘英才
京公网安备 11010802024343号