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: Uniflash FS_ERR_FILE_NOT_EXISTS

Part Number: LAUNCHCC3220MODASF

hi all, I'm setting up a production fixture to program my CC3220MODFS using uniflash.  This is using a bash script under ubuntu linux.

I issue the following command:
> ./SLImageCreator project program --name working_project

Everything seems ok until the end:

 fs_programming error: ret: -10341, ex_err: 2633 - FS_ERR_FILE_NOT_EXISTS

Here are my steps:

I clone my project from one I created in uniflash:

> ./SLImageCreator project clone --overwrite --name CC3220SF_03-19-2019 --new working_project

I then add my cert:

> ./SLImageCreator project add_file --name working_project --fs_path certificate-SHA2.pem --file certificate-SHA2.pem

I added the FW code signing cert via:

> ./SLImageCreator project add_file --name working_project --file my_fw_image.bin --mcu --priv my_fw.key --cert certificate-SHA2.pem

When I open the project in uniflash GUI, and I look at the properties of the mcu image, I see that the "Certification File Name" dropdown is empty (although the certificate-SHA2.pem file is present under user files).  If I select it from the dropdown, then try to program, I then get:

-10287, ex_err: 2633 - FS_ERR_ROOT_CA_IS_UNKNOWN

Which  I assume I'm getting the FS_ERR_ROOT_CA_IS_UNKNOWN since I don't have the CA cert included in my certificate-SHA2.pem file, yet.  But this tells me that the cert isn't getting associated with the mcu image in my add-file --mcu command, above.

*** my question is this:  how do I associate the cert to the mcu image via uniflash CLI?

 

Thanks,

Chris

> ./SLImageCreator project add_file --name working_project --file /home/houseoffire/Dropbox/wifi_100-00746_1/scripts/../hof/wifire_proto.bin --mcu --priv /home/houseoffire/Dropbox/wifi_100-00746_1/scripts/../hof/wifire_fw.key --cert /home/houseoffire/Dropbox/wifi_100-00746_1/scripts/../hof/b8348c13d8b350f3-SHA2.pem

  • Hi Chris,

    As the FS_ERR_ROOT_CA_IS_UNKNOWN error suggests, the problem is most likely due to the cert you are trying to use with your MCU image. PEM formatted keys and certificates are not supported as MCU signing keys+certificates. You'll need to convert your key and certificate to DER format first.

    Another debug step you could try is to run your script, but use the dummy certificate files in simplelink_cc32xx_sdk_3_10_00_04/tools/cc32xx_tools/certificate-playground/. You'll need to of course switch your project to development mode and also include the playground cert catalog files instead of the production root CA catalog, but by running your script with those known-good files you can rule out your CLI commands being the cause of your issue. I don't see anything wrong with the commands you're running, and for reference I can successfully program using the Uniflash CLI with these commands:

    dslite.bat --mode cc32xx project clone --overwrite --name cc3220sf_local_ota_tirtos --new cli_test_project
    dslite.bat --mode cc32xx project add_file --name cli_test_project --fs_path dummy-root-ca-cert --file "C:\ti\simplelink_cc32xx_sdk_3_10_00_04\tools\cc32xx_tools\certificate-playground\dummy-root-ca-cert" --overwrite
    dslite.bat --mode cc32xx project add_file --name cli_test_project --file "C:\Users\a0232058\workspace_v9_fae_summit\at_commands_CC3220SF_LAUNCHXL_tirtos_ccs\Debug\at_commands_CC3220SF_LAUNCHXL_tirtos_ccs.bin" --mcu --priv "C:\ti\simplelink_cc32xx_sdk_2_10_00_04\tools\cc32xx_tools\certificate-playground\dummy-root-ca-cert-key" --cert dummy-root-ca-cert --overwrite
    dslite.bat --mode cc32xx project program --name cli_test_project --port COM3

    They're a bit different as I'm running the CLI on windows, but the commands should work across all platforms.

    Let me know the results of those debug steps, and we can debug from there.

    Regards,

    Michael

  • Hi Michael, I confirmed that those steps work.

    I think the issue is that I don't have my certificates properly configured/converted. I'm going to close this one and create a new question.

    That is to say, Uniflash will confusingly complain about a missing file if the certificates aren't correct.

    Thanks!
    Chris
  • by the way, this question really addressed the issue:
    e2e.ti.com/.../787108

    turns out, the name of the root ca and trusted ca certs *on the simplelink device* need to have the file name match the certificate name (all lowercase and spaces are ok). to find the name of your cert, use
    openssl x509 -text -noout -in name_of_cert

    and look for CN in the subject field.

    when adding the mcu image, the -cert option points to the simplelink filename.

    So, if you upload your code signing cert with SL_filename 'my cool cert', then the --cert option would look like
    --cert "my cool cert"

    Chris