在.c文件中添加
#pragma location="IMAGE_VERSION"
const CODE uint32 _imageVersion = 0x17053155;
#pragma required=_imageVersion
在xcl文件中添加
-Z(CODE)IMAGE_VERSION=0x4800-0x4803
但是在编译出来的hex文件中
:1047F30045B30E6F001245B3916F001245B36B685A
:10480300001245B32169001245B36369001245B331
在4800 - 4803 没有出现我定义的内容
我用IAR 版本是8.20 。
编译的时候在#pragma required=_imageVersion 这一句这里有个警告说
Warning[Pe609]: this kind of pragma may not be used here C:\Users\Administrator\Desktop\app\boot\source\sb_main.c 26
这个为什么不能用 获取有可能就是这个警告引起的