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.

LAUNCHXL-CC1352R1: OAD Image Creation Tool

Part Number: LAUNCHXL-CC1352R1
Other Parts Discussed in Thread: CC1352R

Hello,

I am using CC1352R board with SDK 3.10.

My aim is to create a *.bin file from a *.hex file and while going through the SDK user guide for CC1352R I noticed that OAD Image Tool is capable of doing so (the link I followed is referenced below).

http://dev.ti.com/tirex/explore/content/simplelink_cc13x2_26x2_sdk_3_10_00_53/docs/proprietary-rf/proprietary-rf-users-guide/oad/tools.html 

I tried my hand on it, but unfortunately, was not able to solve the problem. I also searched if I could find any other document which elaborates the steps and I found this (for a different board,) -

 

I noticed that this document has stepwise instructions and my guess is that, these steps could be similar if not the same for CC1352  board. I followed it and installed the pre-requisites, but performing the last step gave me only version number of the OAD tool (oad_image_tool 2.1.2) or errors saying "error: argument BinaryType: invalid int value: *.bin" as output.

Background / Test setup-
 1) Python 2.7.13
 2) Python intelhex-2.1
 3) Python crcmod-1.7
 4) Installed ecdsa

Can anyone point out where I might be going wrong? Or help me with a bit elaborated steps/documentation on how to use this tool to convert hex files to .bin files?

Thanks and Regards,

Yash.

  • Hello Yash,

    I am so sorry for the late reply on this.

    You should be able to use some components from the python oad image tool.

    the oad image tool uses  the intel hex utility to convert from hex 2 bin or bin 2 hex. This is how the utility does it and you can too.

    1.install python

    2.run this command on your cmd: $python -m pip install intelhex

    3.run the following on your script:

    import intelhex
    
    def main(args):
    # 
    # 
    # 
    # any handling of data
    # look at the oad image tool for examples on how to grab
    # data from the console, and how to get the flash limits
    # 
    # 
    # 
     # Write bin to hex
     intelhex.bin2hex(mergeHexFilePath, outFileMergedPath, start=appImgStartAddr, end=flash_limit)
    
     # Convert hex to bin
     intelhex.hex2bin(mergeHexFilePath, outFileMergedPath, start=appImgStartAddr, end=flash_limit)
    
    
    
    

    Regards,

    AB

  • Hello AB,

    Thank you for your response.

    Appreciate your help.

    Actually, I am trying to convert a hex file to its binary format from a project that's not originally created as OAD project (such as sensor or sensor_sn NOT like sensor_oad) so that I can use that file to send it over the air.

    I want to send that .bin file over the air as a firmware update, from the Sensor tag application. So, how can I create a bin file from hex, which has the capability to be sent over the air and get flashed in the board?

    Thanks and Regards,

    Yash.

  • Hello Yash,

    The above instructions should also work for this scenario.

    Regards,
    AB