This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我是想通过APP程序,写一个CONST 数据在一个特定地址,比如如果是ARM 处理器就可以在程序中这么写
const APP_FingerStartPrintType SW_Infor __attribute__((at(0x08008100))) ={
.Version[0] = 0x01,
.Version[1] = 0x01,
.ConstantVal1 = Fingerprint_Constant1,
.APPFigerEndAddr = 0x08014800
};
这个结构体数据就会放在0x8008100的Flash地址下
问题解决了 使用
#pragma DATA_SECTION(AppSt_Infor,"FingerPrint");
const APP_FingerStartPrintType AppSt_Infor ={
.Version[0] = 0x01,
.Version[1] = 0x01,
.ConstantVal1 = Fingerprint_Constant1,
.APPFigerEndAddr = 0x00327f00
};
实际感觉const不用也没问题 cmd PAGE 0 增加
PAGE 0: /* Program Memory */
FLASHD : origin = 0x320000, length = 0x007F00 /* APP */
FLASHC : origin = 0x328030, length = 0x007FD0 /* APP */
FLASHA : origin = 0x338000, length = 0x007F80 /* reserved for boot */
BEGIN : origin = 0x328020, length = 0x000002 /* APP ENTRY. */
START_FINGER : origin = 0x328000, length = 0x000020 /* App StartFinger */
END_FINGER : origin = 0x327f00, length = 0x000060 /* App EndFinger */
SECTIONS 增加
FingerPrint : > START_FINGER, PAGE = 0
FingerPrint_ed : > END_FINGER, PAGE = 0