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.

LAUNCHCC3220MODASF: Absence of ota.a Library in SDK

Part Number: LAUNCHCC3220MODASF
Other Parts Discussed in Thread: CC3220SF

Hello,

Using CC3220MODASF, I faced an error building the cloud_ota app as it couldn't find "ota.a" library at ti/net/ota/ccs/Release/ota.a path. SDK check revealed the missing ota.a file. Can you share the compiled ota.a?

Thanks

  • You need to compile it with your otauser.h configuration. 

    The easiest way is to import to CCS.

    IF you are using it through OTA_IF - you should make sure the following is set:

    #define OTA_SERVER_TYPE OTA_FILE_DOWNLOAD

  • Hi,
    I believe '#define OTA_SERVER_TYPE OTA_FILE_DOWNLOAD' is used to specify the cloud service. There are three options available: GitHub, Dropbox, and OTA file download. I have enabled this setting on otauser.h, but the issue persists.

    **** Build of configuration Debug for project cloud_ota_CC3220SF_LAUNCHXL_tirtos_ccs ****

     

    "C:\\ti\\ccs1240\\ccs\\utils\\bin\\gmake" -k -j 12 all -O 

    Building target: "cloud_ota_CC3220SF_LAUNCHXL_tirtos_ccs.out"
    Invoking: Arm Linker
    "C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --define=CC32XX -g --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on -z -m"cloud_ota_CC3220SF_LAUNCHXL_tirtos_ccs.map" -i"C:/ti/simplelink_cc32xx_sdk_4_10_00_07/source/ti/net/ota" -i"C:/ti/simplelink_cc32xx_sdk_4_10_00_07/source/ti/utils/json/lib" -i"C:/ti/simplelink_cc32xx_sdk_4_10_00_07/source" -i"C:/ti/simplelink_cc32xx_sdk_4_10_00_07/source/ti/drivers/net/wifi" -i"C:/ti/simplelink_cc32xx_sdk_4_10_00_07/kernel/tirtos/packages" -i"C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib" --diag_wrap=off --display_error_number --warn_sections --xml_link_info="cloud_ota_CC3220SF_LAUNCHXL_tirtos_ccs_linkInfo.xml" --rom_model -o "cloud_ota_CC3220SF_LAUNCHXL_tirtos_ccs.out" "./cloud_ota.obj" "./syscfg/ti_net_config.obj" "./syscfg/ti_drivers_net_wifi_config.obj" "./syscfg/ti_drivers_config.obj" "./main_tirtos.obj" "./platform.obj" "./uart_term.obj" "../CC3220SF_LAUNCHXL_TIRTOS.cmd" -l"ccs/Release/ota.a" -l"ccs/m4/json_release.a" -l"ti/display/lib/display.aem4" -l"ti/grlib/lib/ccs/m4/grlib.a" -l"third_party/spiffs/lib/ccs/m4/spiffs.a" -l"ti/drivers/lib/drivers_cc32xx.aem4" -l"third_party/fatfs/lib/ccs/m4/fatfs.a" -l"ccs/rtos/simplelink.a" -l"ti/dpl/lib/dpl_cc32xx.aem4" -l"C:/Users/noush/test/tirtos_builds_CC3220SF_LAUNCHXL_release_ccs/Debug/configPkg/linker.cmd"  -l"ti/devices/cc32xx/driverlib/ccs/Release/driverlib.a" -llibc.a 
    <Linking>
    error #10008-D: cannot find file "ccs/Release/ota.a"

    undefined first referenced
      symbol       in file     
    --------- ----------------
    OTA_get   ./cloud_ota.obj 
    OTA_init  ./cloud_ota.obj 
    OTA_run   ./cloud_ota.obj 
    OTA_set   ./cloud_ota.obj 

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "cloud_ota_CC3220SF_LAUNCHXL_tirtos_ccs.out" not built

    >> Compilation failure
    makefile:154: recipe for target 'cloud_ota_CC3220SF_LAUNCHXL_tirtos_ccs.out' failed
    gmake[1]: *** [cloud_ota_CC3220SF_LAUNCHXL_tirtos_ccs.out] Error 1
    makefile:147: recipe for target 'all' failed
    gmake: *** [all] Error 2

     

    **** Build Finished ****

  • You need to build the ota.a first. Then when building the application - make sure the linker uses the right path to it (in your case the ota.a was not found).

    The OTA_FILE_DOWNLOAD means that there the library skips the CDN Client negotiation with the cloud server and directly uses a given URL to download the OTA content from the a file server. Starting from SDK6.10 and the introduction of OTA_IF - the CDN negotiation is done by the application code (see our references of ota_vendor_github.c and ota_vendor_dropbox.c) and the library is only responsible for loading and parsing (mainly in oOtaArchive.c) the update content.

  • Hi,
    problem solved by creating OTA.a library. Now I can compile the Cloud OTA sample code. With OTA_FILE_DOWNLOAD, can I avoid CDN client negotiations since we are using Azure IoT Hub for cloud storage? Is it possible to use Azure IoT Blob storage similar to Dropbox? Currently, we have completed ESP HTTPS OTA; Its URL is as follows.
    https://onesensedeviceupdate.blob.core.windows.net/deviceupdate-5/PCB_V0_5_v1_2_17_1.bin?sv=2020-04-08&se=2024-01-16T06%3A04%3A15Z&sr=b&sp=r&sig=m1HjqDp0pUb2zAwLV3z2fkfFdGQD8Dr4wwyiVDbRvGM%3D

  • Please check the OTA_IF interface and the MQTTClient example's README.

    If you already have the file server URL for the image download, you can use: OTA_IF_downloadImageByFileURL (instead of the OTA_IF_downloadImageByCloudVendor). 

    FileServerParams_t params;
    memcpy(params.URL, "https://onesensedeviceupdate...")
    // update certificates info according to TLS requirements
    
    OTA_IF_downloadImageByFileURL(&params, 0);

    If you want to replace the Dropbox/Github code with a code that probes the download URL from Azure - you can implement your own "ota_vendor_azure" and provide a callback named OTA_Azure_getDownloadLink(), then you will be able to use the following:

     OTA_IF_downloadImageByCloudVendor(OTA_Azure_getDownloadLink, NULL, 0);

  • Hi,
    we are currently using simplelink_cc32xx_sdk_4_10_00_07. I believe it doesn't have OTA_IF option. In my SDK, otauser.h has three choices for OTA:

    # Define OTA_SERVER_TYPE OTA_SERVER_GITHUB
    # Define OTA_SERVER_TYPE OTA_SERVER_DROPBOX_V2
    #define OTA_SERVER_TYPE OTA_FILE_DOWNLOAD

    Can I use #define OTA_SERVER_TYPE OTA_FILE_DOWNLOAD to download OTA files from Azure IoT Blob storage?
    What changes are needed in the otauser.h file?
    Do I need Azure root certificate instead of DigCert_High_Assurance_CA.der?

  • Hi,
    Any update today?

  • yes, you should use OTA_FILE_DOWNLOAD.

    In the otauser.h (within the #elif OTA_SERVER_TYPE == OTA_FILE_DOWNLOAD) - define the server root CA cert.

    In the application use OTA_set(EXTLIB_OTA_SET_OPT_FILE_SERVER_URL, strlen(url), url, NULL) - to set the required URL before you start the ota processing (instead of EXTLIB_OTA_SET_OPT_SERVER_INFO).