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.
我正在尝试向已知的内存位置写入一个版本、但似乎无法使其正常工作。
看起来它应该正常工作、因为我没有遇到编译器投诉。
下面是我拥有的内容:
####################################
代码:
#define pragma (x)_Pragma (#x)
#ifdef __cplusplus
#define GEPRAGMA (FWVersion、"fwverisonfile") pragma (DATA_SECTION ("fwverisonfile"))
其他
#define GEPRAGMA (FWVersion、fwverisonfile) pragma (DATA_SECTION (FWVersion、fwverisonfile))
#endif
CONST UINT16 FWVersion = 0x2436;
链接器命令:
存储器
FWVERSITION (RWX):origin = 0x002E0060,length = 0x0010
部分
fwverisonfile :> FWVERSION
######################################