如何声明常量字符串到指定flash地址
展开全部
三种方法,举例如下:
1.需要修改icf文件。
#pragma location =
"ConstSection1"
__root __no_int char RELEASEDATE[16]
@"ConstSection1";
place at address mem:0x08001000 { readonly section
ConstSection1 };
2.
__root __no_init char RELEASEDATE[16] @0x08010000;
3.
#pragma location =0x08010000
__root __no_init char
RELEASEDATE[16];
1.需要修改icf文件。
#pragma location =
"ConstSection1"
__root __no_int char RELEASEDATE[16]
@"ConstSection1";
place at address mem:0x08001000 { readonly section
ConstSection1 };
2.
__root __no_init char RELEASEDATE[16] @0x08010000;
3.
#pragma location =0x08010000
__root __no_init char
RELEASEDATE[16];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询