Part Number: CC1312PSIP
Tool/software:
Hi,
I am writing TI15.4 OAD server code to embed into a CC1312PSIP using the rfOAD and Linux applications as a basis.
Can you tell me where the the image identify payload gets added to an OAD file? I have looked through the oad_image_tool.py and oad_write_bin.py but I cannot see where this header gets created.
/* Image Identify Payload */
typedef struct __attribute__((packed))
{
uint8_t imgID[8]; //!< User-defined Image Identification bytes. */
uint8_t bimVer; //!< BIM version */
uint8_t metaVer; //!< Metadata version */
uint8_t imgCpStat; //!< Image copy status bytes */
uint8_t crcStat; //!< CRC status */
uint8_t imgType; //!< Image Type */
uint8_t imgNo; //!< Image number of 'image type' */
uint32_t len; //!< Image length in bytes
uint8_t softVer[4]; //!< Software version of the image */
uint8_t isDeltaImg; //!< Indicates if payload is delta image */
uint8_t toadMetaVer; //!< Turbo OAD header version */
uint8_t toadVer; //!< Turbo OAD version */
uint8_t memoryCfg; //!< Flash configuration used */
uint32_t oldImgCrc; //!< CRC of the current app image */
uint32_t newImgLen; //!< Length of the new app image */
} OADStorage_imgIdentifyPld_t;
The reason I'm looking at this is because the BIM and META versions are causing me an issue in oad_storage.c when I upload a bin file to the server. How do I make sure the BIM and META versions match?
// Ensure the image is built with a compatible BIM and META (ensures the image is meant for the right bootloader too)
if(idPld->bimVer != currentImageHeader->fixedHdr.bimVer ||
idPld->metaVer != currentImageHeader->fixedHdr.metaVer )
{
status = OADStorage_Rejected;
}
Thanks,
Andy