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.

CC1312PSIP: OAD

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

  • Hi Andy,

    Can you tell me which versions of the SimpleLink CC13xx/CC26xx SDK and Linux Gateway SDK you are using, both for the old and new image?

    OADStorage_imgIdentifyPld_t is defined in oad_storage.h.

    Cheers,

    Marie H

  • Hi,

    I'm using simplelink_cc13xx_cc26xx_sdk_7_41_00_17.

    The penny has dropped. So the internal flash BIM uses the linker to save the image header using .image_header area in internal flash. The external flash version instead stores the image header in external flash and so does not involve the linker. 

    I think the thing that confused me was the subtle but important point that the BIM_VER is not part of the OAD file and so is not included in the python scripts, but is rather created by the OAD server and sent to the client at run-time. 

    All BIM and META versions seem the same throughout the examples and I need to make sure I don't use another version of BIM at some point in the future.

    Thanks,

    Andy