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.

When using the IAR command and keyword, the compiled hex file does not meet the expected value

Other Parts Discussed in Thread: BLE-STACK

Add in.c file

#pragma location="IMAGE_VERSION"
const CODE uint32 _imageVersion = 0x17053155;
#pragma required=_imageVersion

Add in xcl file

-Z(CODE)IMAGE_VERSION=0x4800-0x4803

But in hex file 0x4800-0x4803 , the data is not 0x17053155

My IAR version is 8.20 and "#pragma required=_imageVersion" has a warning 

Warning[Pe609]: this kind of pragma may not be used here C:\Users\Administrator\Desktop\app\boot\source\sb_main.c 26

i dont konw reason,and sometimes  the data in hex file is right 

  • Hi,

    Can you tell me more about what you are trying to do?

    Which device are you using?

    Which version of the TI BLE-Stack are you using?

    Are you starting with a TI Sample App? If so, which one?

    Are you trying to set your image version for OAD purposes? If so, did you follow the OAD Guide that corresponds to the BLE-Stack version you are using?