I am working on OTA of cc2541.
I have completed the OTA now I am adding that drevice with super hex file(BIM+Img-A) only accept my bin file.
I am changing the reserved bytes in the image header (So that BIM only load the application if the correct bytes is matched from IMAGE_HEADER).
But i don't know in BIM where i have to change.
Kindly tell me if
uint8 uid[4]; // User-defined Image Identification bytes.
used for this purpose then how can i used that?
#pragma location="IMAGE_HEADER"
const __code img_hdr_t _imgHdr = {
#if defined FEATURE_OAD_SECURE
2012, // CRC must not be 0x0000 or 0xFFFF.
#endif
#if defined (BOOTP_E_IMAGE_A)
#warning "Forcing a CRC-shadow match with the BOOTP_E_IMAGE_A flag - is this bootstrap code?"
2012, // CRC-shadow forced to match CRC for a bootstrap Encrypted Image-A
#else
0xFFFF, // CRC-shadow must be 0xFFFF for everything else
#endif
OAD_IMG_VER( OAD_IMAGE_VERSION ), // 15-bit Version #, left-shifted 1; OR with Image-B/Not-A bit.
OAD_IMG_R_AREA * OAD_FLASH_PAGE_MULT,
#if defined HAL_IMAGE_A
OAD_IMAGE_A_USER_ID, // User-Id
#else
OAD_IMAGE_B_USER_ID, // User-Id
#endif
{ 0xAA, 0xBB, 0xCC, 0xDD } // Reserved
};
#pragma required=_imgHdr