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.

LAUNCHCC3235MOD: Creating a terminal setup for flashing and building CC3235SF projects

Part Number: LAUNCHCC3235MOD
Other Parts Discussed in Thread: UNIFLASH, CC3235SF

Hello,

Greetings!

I am very new to using TI controller and I wanted to clarify my queries reagrding the flashing tool chain integration. I am using cc3235sf launchpad and gcc compiler toolchain for FreeRTOS kernel. I have installed the CCS, GCC toolchain and UniFlash tools for macOSX. 

I want to integrate the build tool chains and flash tool chains with my already existing git repository project to enable building and flashing via the command line.

As per the quick start guide, I have taken the "empty" project for FreeRTOS kernel, and the Simplelink SDK and copied it in my repository manually. I then modified the makefile and imports.mak to discard main_freertos.c and point to the main.c of my git project. After building the project by running make command, it is generating the .bin file and .out file. I have tried flashing the .bin file using Uniflash GUI tool and it reflects the changes. However, I want to make it a complete command line interface process and not use the GUI for flashing.

Therefore, I copied dslite.sh script and deskdb and simplelink folders from uniflash installation directory and pasted it in project repository. I then tried flashing the already created project, using uniflash GUI tool, through CLI using the command "./dslite.sh --mode cc32xx project program --name <project_name>" .It flashed successfully. However I am facing some issues as follows:

  1. As per my understanding, the project can be created only by using uniflash gui. I did not find commands to create it using command line. Are there ways to flash .bin using command line interface without creating a project in uniflash? Also, if not, can I create a new uniflash project using CLI?

         2. Every time I make changes to the code and generate a .bin file, it does not get automatically updated in the uniflash project.So I have used the following command,

              >>./dslite.sh --mode cc32xx project add_file --name <project_name> --file empty.bin --mcu --overwrite  (empty.bin is in the same folder as ./dslite.sh script). I have also tried adding the .bin file with                          complete path.

               However, it gives me " IOError: [Errno 2] No such file or directory:" error.

                How should I proceed for the same?

I would be of great help if you could suggest some measures for the queries. Also, any other suggestions regarding integrating flashing toolchain with my repository, for command line interface are most welcome.

Thank you.

  • Hi,

    You should be able to use the Uniflash Imagecreator CLI for all programming steps, from new project creation to flashing the finalized project without needing to use the GUI.

    The full list of commands can be found in section 7 of the Uniflash Imagecreator user guide here: www.ti.com/lit/swru469

    To answer your questions in detail:

    1. Referencing the guide linked above, you can use the 'new' command to create a new project. From there, you can then run the appropriate commands to set the servicepack, add your MCU file, and then program as normal.

    2. Yes, you will need to provide the newly-generated .bin to Imagecreator whenever you rebuild your project, using the 'add_file' interaction. Are you ensuing to provide the private key and cert to sign the MCU image in your command? It doesn't look like that is the case from the sample code you provided above.

    Regards,

    Michael

  • Hello Michael,

    Thank you for your reply.

    I tried creating new project and programming the .bin file using CLI. I followed the steps as below:

    1. Created a new project using command 

      ./dslite.sh --mode cc32xx project new --name cli_flash --device CC3235SF

    2. Added files and certificates to this project as follows: ./dslite.sh --mode cc32xx project add_file --name cli_flash --file /<path>/empty.bin --mcu --overwrite --priv <SDK_INSTALL_DIR>/simplelink_cc32xx_sdk_5_10_00_02/tools/cc32xx_tools/certificate-playground/dummy-root-ca-cert-key --cert <SDK_INSTALL_DIR>/simplelink_cc32xx_sdk_5_10_00_02/tools/cc32xx_tools/certificate-playground/dummy-root-ca-cert
    3. Added service pack .bin to the project : ./dslite.sh --mode cc32xx project set_sp --name cli_flash --file <SDK_INSTALL_DIR>/simplelink_cc32xx_sdk_5_10_00_02/tools/cc32xx_tools/servicepack-cc3x35/sp_4.10.0.1_3.7.0.1_3.1.0.26.bin
    4. Then run the project program command: ./dslite.sh --mode cc32xx project program --name cli_flash

    However, after following the above steps the image programming is giving the below error when it reaches at 98% completion.

    Received storage list

    Image Programming: 98% (118784/120768)INFO:slbootloader.slbootloader:Received error : error number = -10341 , extended error = 2694

    Traceback (most recent call last):

      File "SLImageCreator.py", line 5191, in <module>

      File "SLImageCreator.py", line 5187, in main

      File "SLImageCreator.py", line 5159, in cmdline

      File "SLImageCreator.py", line 4015, in command_project_program

      File "SLImageCreator.py", line 2743, in program_image_from_project

      File "SLImageCreator.py", line 2884, in program_image

      File "slbootloader/slbootloader.py", line 793, in fs_programming

    slbootloader.slbootloader.BootLoaderError:

    Error: SLImageCreator.exe: fs_programming error: ret: -10341, ex_err: 2694 - FS_ERR_FILE_NOT_EXISTS

    [4021] Failed to execute script SLImageCreator

    I tried giving different certificate references in the above however the same error is  getting displayed. 

    It would be of great help if you could please let me know what is missing in the above configurations. 

    Thank you.

  • Hi,

    The error you're seeing, FS_ERR_FILE_NOT_EXISTS is returned because the certificate used to validate the MCU binary, dummy-root-ca-cert, is not present on the filesystem.

    In addition to adding in the MCU binary and the servicepack, you will also need to add_file the dummy-root-ca-cert. You can add it as an unsecured file. Please add that file to the filesystem and try flashing again.

    Regards,

    Michael

  • Hello Michael,

    • I have added "dummy-root-ca-cert" in the project. I used the below command to add the certificate

     ./dslite.sh --mode cc32xx project add_file --name cli_flash --file /<path>/empty.bin --mcu --overwrite --priv <SDK_INSTALL_DIR>/simplelink_cc32xx_sdk_5_10_00_02/tools/cc32xx_tools/certificate-playground/dummy-root-ca-cert-key

    --cert <SDK_INSTALL_DIR>/simplelink_cc32xx_sdk_5_10_00_02/tools/cc32xx_tools/certificate-playground/dummy-root-ca-cert

    However, after opening the project in GUI, I cannot see the certificate added.

    I have also added the certificate catalog using the below command

    ./dslite.sh --mode cc32xx project set_certstore --name obniz_os --project_path /<project_path>/projects --file /<SDK_INSTALL_DIR>/tools/cc32xx_tools/certificate-playground/certcatalogPlayGround20160911.lst --sign /<SDK_INSTALL_DIR>/tools/cc32xx_tools/certificate-playground/certcatalogPlayGround20160911.lst.signed_3235.bin

    I tried it with --flags "nosignaturetest" but it gives me error.

    • Also, according to the UniFlash user guide, the following sequence can be followed by user for flashing

     The host_file, without the SHA1, is set by the user:

    1. The ImageCreator calculates the SHA1 and the host_final.

    2. The file signature of the host_final file is calculated by the ImageCreator, using the private key in DER format as an input.

    -- Is this the sequence to be followed for flashing the .bin file?

    -- Also how to get the private key in .der format?

    It would be really helpful if you could please clarify the above doubts.

  • Hi,

    The command you are using only adds the MCU file - you also need to perform add_file to add the actual "dummy-root-ca-cert" file to the filesystem.

    Please take at this older version of the CC32xx getting started guide, section 2.4, for a visual representation of exactly what is needed.

    /cfs-file/__key/communityserver-discussions-components-files/968/swru461a.pdf

    The instructions are for the GUI version of Uniflash, but for every step in the GUI there is a CLI command you can call for the equivalent functionality. You will need to follow that guide and ensure all needed files are added.

    For the private key, it looks like you're using the dummy cert files provided by the SDK. In that case dummy-root-ca-cert-key is correct, and no change is required.

    Regards,

    Michael

  • Hello Michael,

    Thank you for the reference to the above document. 

    The stepwise guide actually helped to understand the flash project creation process. 

    My flashing process through CLI is working now!