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.


Part Number: CC3235MODASF
Other Parts Discussed in Thread: UNIFLASH, CC3235S, CC3235MODAS, , CC3235SF


Due to the chip shortage, we are thinking about switching one of our product from CC3235MODASF to CC3235MODAS. With some optimization we can do without the 1MB internal flash. 

To avoid having to maintain two differents firmwares, I would like to use the same binary on both variants. I have made a firmware for  CC3235MODAS which properly runs on CC3235MODASF. Now I'm trying to make an OTA from the SF to the S firmware.

What I expect shall be done:

- Delete /sys/mcuflashimg.bin with tag SL_FS_WRITE_BUNDLE_FILE.

- Write /sys/mcuimg.bin  with tag SL_FS_WRITE_BUNDLE_FILE

- Check new firmware and if successful commit with sl_FsCtl( (SlFsCtl_e)SL_FS_CTL_BUNDLE_COMMIT, ...)

My issues are: 

1: Is there a way to set the flag SL_FS_WRITE_BUNDLE_FILE with sl_FsDel? 

2: /sys/mcuflashimg.bin is set to be secure with public write. I left the default token in uniflash which I understand means it's unrecoverable. When trying to delete the file without token I get the error SL_ERROR_FS_INVALID_TOKEN_SECURITY_ALERT. Is there any way to delete the file without reflashing through uniflash?

Best regards,


  • Hi Cedric, 

    I'm not sure what exactly are you trying to do. What do you mean by "set the flag SL_FS_WRITE_BUNDLE_FILE with sl_FsDel"?

    SL_FS_WRITE_BUNDLE_FILE is a flag used in the OTA image to mark the files that must be replaced together (or to revert if one of the files could not be update). How is sl_FsDel relevant?

    Assuming you are using the Uniflash to create the OTA image - you can make 2 projects one for S and one for SF, both will contain the same files, but for the SF device image will be called "mcuflashimg.bin" and for the S device - the same code will be written as "mcuimg.bin". 

    I'm probably missing something so please describe the process of the update.



  • Hi Kobi,

    I'm trying to do an OTA from a mcuflashimg.bin image executed from flash to an mcuimg.bin image executed from RAM. 

    Which I suppose shall be done with the following sequence

    1: erase (or mark for deletion) mcuflashimg.bin 

    2: write mcuimg.bin

    3: reboot on mcuimg.bin and commit bundle

    However I can't seem to delete mcuflashimg.bin nor do it in a revertable way.

    I hope it's clearer. 

  • no. you can't delete mcuflashimg.bin (if it was added without the vendor token).

    Is it CC3235S (CC3235MODAS) or SF device?

    How (and why) did you write mcuflashimg.bin originally to the flash?

  • Currently I'm testing on a CC3235MODASF. 

     mcuflashimg.bin has been written throught uart programming with a uniflash cc3235sf project output.

    On our main product we were using the sf variant because we needed the extra space, that's why we did not think about an eventual switch to the S variant on this other product.

    Ok then I understand that because of the missing token, if we want to have only one firmware for S and SF variant it's possible, but only if upgrading the whole thing through uart programming.

    Now I will test with the token, whether it is possible to switch from mcuflashimg to mcuimg in a revertable manner. I suppose the switch is feasible but not the revert.

  • i'm still not sure what you are trying to do.

    The S device will require different image (code (.text) section in RAM sits in different addresses then the FLASH text section).

    Why don't you build another image for the S devices? How does you method simplify the process?

  • By having the S firmware running on the SF device, my method simplify the maintenance by having only one firmware for both the S and SF device. Otherwise I will have to maintain two different firmware branches in the future.

  • Ok, so you are running S code on the SF device (without using the flash).

    You can just add the file "sys/mucimg.bin" as a user file (with same flag as used in the MCU image) to uniflash CC3235SF project (you will need 2 projects in uniflash one per device because the type is being verified) and the FW will be loaded to the RAM instead of the Flash.  

  • Yes that's what I've done. It's running fine in RAM on a cc3235SF when flashed with uniflash. 

    Now I'm trying to do an OTA from mcuflashimag.bin to mcuimg.bin.

    I've just tested to delete mcuflashimag and write mcuimg but it does not seem to boot on mcuimg. I suspect that the bootloader keeps using the code in the internal executable flash.

  • This is very tricky.

    I don't think you can remove the internal flash unless you format and reprogram the flash (e.g. using sl_FsProgramming).