Flashing CC23xx via UniFlash Command Line

In a production environment, it is desireable to be able to flash the CC23xx via a command line. Command line flashing can be used to automate a portion of the production process. This flashing method can be used to flash the CC23xx devices.

To flash a device via the UniFlash command line, then UniFlash 8.2.0 or newer must be installed. The flashing procedure described in this section can be used to flash blank and non-blank devices.

In order to flash the CC23xx via command line, the following steps must be followed:

  1. Compile and generate the image that will be flashed on the device. The generated image should be a .bin or .out file.

  2. Prepare a target configuration:

    • The target configuration used in the project that generated the image may be used. By default, the target configuration of a project may be found in {PROJECT_DIR}/targetConfigs/CC2340R5.ccxml. The CC2340R5.ccxml is the target configuration file.

    • The target configuration file may also be generated via UniFlash. This can be done by selecting a CC23xx configuration in UniFlash, navigating to the “Standalone Command Line” menu in UniFlash and clicking on Generate Package. This will generate an archive which will contain the target configuration in {archiveDir}\user_files\configs\cc2340r5.ccxml`

  3. Open a command line shell and navigate to the UniFlash installation directory. By default, UniFlash will be installed to C:\ti\uniflash_8.x.x.

  4. Ensure the generated image file and the target configuration file are both located in directories that are visible and accessible to the command line.

    • If desired, the image file and the target configuration file may both be placed at the root of the UniFlash installation to ensure that the files are accessible.

  5. Connect the CC23xx device.

  6. Run the following command: dslite --mode noConnectFlash --config={targetConfigDir} {imageDir}

    • {targetConfigDir} is the location where your target configuration file is found.

    • {imageDir} is the location where your image is found.

The image below shows the expected output. The target configuration file and the image to be flashed were both located in the default UniFlash installation directory:

../_images/CommandLineFlashing_cc23xx.png

To learn more about UniFlash and the UniFlash command line functionality, please reference the UniFlash Quick Start Guide.