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 tool error in creating "dmm_wsnnode_remote_display" image

Part Number: LAUNCHXL-CC1352R1

Greetings,

I'm trying to use OAD image tool in SDK "simplelink_cc13x2_sdk_2_20_00_71" to create an OAD image for example "dmm_wsnnode_remote_display".

After reading the help and navigating through the tool source, I'm using this command (on Windows 7):

oad_image_tool.exe
-hex1 "C:/ti/wanot_ccs_1352_workspace/dmm_wsnnode_remote_display_cc1352r1lp_app/FlashROM_Release/dmm_wsnnode_remote_display_cc1352r1lp_app.hex"
-o my.bin
ccs "C:/ti/wanot_ccs_1352_workspace/dmm_wsnnode_remote_display_cc1352r1lp_app" 7

and I'm getting this error:

[3808] Failed to execute script oad_image_tool
Traceback (most recent call last):
File "oad_image_tool.py", line 587, in <module>
main(oad_args)
File "oad_image_tool.py", line 411, in main
args.HexPath2)
File "oad_image_tool.py", line 228, in createAppStackBinfile
imgEndOffset, imgLenOffset])
File "imgBinUtil.py", line 121, in updateImageLen
imgStAddr = computeAddr(addrTmp)
File "imgBinUtil.py", line 75, in computeAddr
addr = int(adrTemp[0]) + 256*int(adrTemp[1]) + 65536*int(adrTemp[2])
ValueError: invalid literal for int() with base 10: ''

What causes this error?

and is there any example for commands to use this tool? the help command & the BLE user's guide are not enough at all!

* James *

  • Hi James,
    I'm assigning this thread to one of our OAD experts.
  • Hi James,

    The OAD image tool is used as a post processing step in the OAD enabled projects, so in order to see how it is used, you can open an OAD enabled project:

    1) For IAR: Open the project with IAR, right click on the app project, click on Options => Build Actions => Post-build command line

    2) For CCS: Go to the project folder and open the *.projectspec file with a text editor, under "postBuildStep=" you can see how it is called by CCS

    - For example the call from IAR to the tool in the ble5_simple_peripheral_oad_offchip is:

    $TOOLS_COMMON_DIR$\oad\oad_image_tool.exe --verbose iar $PROJ_DIR$ 7 -hex1 $CONFIG_NAME$\Exe\sp_oad_offchip_$PROJ_FNAME$_$CONFIG_NAME$.hex -k $TOOLS_COMMON_DIR$\oad\private.pem -o $EXE_DIR$\$TARGET_BNAME$_oad

    Best Regards,
    Yuval

  • Hi Yuval,

    Thanks for your response. I checked CCS usage for the tool, it's the same as my script:

    ${TOOLS_OAD_DIR}/oad/oad_image_tool --verbose
    ccs ${PROJECT_LOC} 7
    -hex1 ${ConfigName}/${ProjName}_${ConfigName}.hex
    -o ${ConfigName}/${ProjName}_${ConfigName}_oad


    It's working on "ble5_simple_peripheral_oad_offchip" example of course, but when I run this command using my inputs it gives the same error. I also tried to put the same command in my project "dmm_wsnnode_remote_display_cc1352r1lp_app" as a post-build option, but no output.

    Is there something missing in the project to use the tool? You mentioned "OAD enabled project", is this what is missing?

    * James *
  • Hi James,

    I'm thinking that maybe the environment you're running doesn't know the defines you are feeding it.

    Did you define them in your script? if so, are they exactly the same as in the the .projectspec file?

    To verify this is the issue, try printing all environment variables out in your terminal and looking for the different defines (TOOLS_OAD_DIR, PROJECT_LOC...) values and comparing them to the ones in the projectspec file.
    Specifically, try to compare defined addresses as this appears to be the issue (an address is defined in base 10 and not 16 - 0x.... )
    My guess would be that they are not exactly similar or do not appear at all.

    Once you confirm this is the issue, you can simply replace them explicitly in your script with the ones defined in the *.projectspec file.

    Best Regards,
    Yuval
  • Hi James,

    I'm going to close this post due to inactivity. To reopen this thread, just post a follow up question. Otherwise, after 30-days of inactivity from this post, this thread will lock.

    Best Regards,
    Yuval