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.

CCS/CC3220SF-LAUNCHXL: Do CC3200SF firmware update always requires .tar file ?

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hello All,

Working with CC3200SF firmware update got to know the constraint that it accepts in .tar format with all other certificate files.

Is there any way by which it can be done only via adding .bin file for update and may be certificates can already be stored and fetched?

Please feedback.

Thanks in advance.

  • Hi,

    The OTA library only accepts tar file, but you avoid using the library and run your own code that accepts a binary and installs it. Installation of a binary is basically just writing the content (file) to the file system. You can follow the "ota_archive.c" to see how the content of the tar file is being stored on the file system.

    After writing the binary to file system, you will need to call sl_Stop and reset the MCU so the new file will be used (commit will still be needed after you verify the update).

    Currently Uniflash adds the certificates to the MCU images when it creates the tar file (even when they are already installed).

    If you avoid the secure OTA mode, you can manually manipulate the content (i.e. open the tar on your machine, remove the certificate file from the tar and update the metadata file /0/ota.cmd - then create the tarball again).

    Saying that, the OTA library will save you a lot of development time and the secure mode is important. I would still recommend using the library even with the overhead of the certificate file. The requirement to add the certificate to the tar file may be fixed in the future.

    Br,

    Kobi

  • Hello Kobi,

    Thanks for valuable input.

    I have one some queries w.r.t flashing the image.

    1) What memory is it using for storing the image, internal or external?

    2) And I can see file system (bundle) for image update in the example code of local OTA, if so where is address specified to boot-loader for image update in code.

         If aware can you please share function names or specific code screenshot, it will be of great help.

    3) And for factory reset(default image) are they creating any copy of received ota file?

     

     

     

    Regards,

    Bharat

     

     

  • On the external flash) you can find the following:

    1. Factory reset (if defined by uniflash during programming) -this image will never be updated.

    2. Operation MCU image - on an SF device it will be called "/sys/mcuflashimg.bin".

    During OTA, when the MCU image file gets overwritten (all OTA content is written to the external flash) - the NWP will store a temporary copy of the old image (assuming fail-safe protection is enabled).

    The boot loader is in ROM. Upon boot it will compare the content of the Execution Image (on the internal Flash) to the MCU Image file on the external flash.

    If they are different (i.e. after OTA download), it will copy the external "/sys/mcuflashimg.bin" to the internal (XIP) flash and execute it.

    If the image works fine and gets committed - the temporary copy will be deleted from the file system. 

    Otherwise, the /sys/mcuflashimg.bin will revert to the stored copy (erasing the loaded OTA image). The image will be then copied to internal flash and be executed.

    If you trigger the Factory reset, this image will extracted and it will take the place of the "/sys/mcuflashimg". Then the bootloader will copy and run this content as explained above. 

    BR,

    Kobi

  • Hello Kobe,

    Thanks for answers.

    Got the flow of Image execution.

    Few more questions, sorry if these are too many.

    - I could not find any snip of code where they are storing/writing the new image to external flash.If any feedback(in terms of function name or Screenshot) will be helpful.

    - What is this file storage provided by NWP and what is its size?

    Thank You!

  • Look for sl_Fs commands (sl_FsOpen/sl_FsWrite/slFsClose) in the OtaArchive.c (which is an OTA lib file).

    The File System is implemented on the external serial flash.

    On the launchpad you have a 4MB (32Mbit) flash, but you can use a bigger one if needed (requirements and limitations are defined in the spec).

    Br,

    Kobi

  • Hello Kobi,

    Thank You Once again!

    As you mentioned the new ota image is first downloaded to external flash and then copied to internal flash if version changes.

    But is the copy of image from external to internal managed at bootloader or any specified function call which I was not able to get that.

    Thank You!

  • It should be handled automatically by the boot loader.