Skip to content

How do I program devices with a firmware?

Once we have compiled the source code with the SDK we will have a binary file. This binary file needs to be programmed into the CPU on the hardware before we can run it. This post goes through how to perform this programming on two different hardware setups.

Generally speaking, we need a JTAG to program the devices. This is hardware made for programming and debugging purposes. You can find and use JTAG on TI Launchpad (cc1310, cc1350, cc2650) and TI SmartRF06EBK boards. These can be used to program other hardware targets (eg TI sensortag) by using the 10-pin small ARM JTAG cable.

Software installation

Install SmartRF Flash programmer 2 from Texas Instruments. Note, there are two Flash programmer applications, use Flash programmer 2. This installs the drivers for the Launchpad as well.

Program a CC13xx or CC26xx target

For this example, we will program a TI Launchpad. All the TI Launchpads with CC1310, CC1350, or CC2650 are flashed in the same way. To use the JTAG of a Launchpad to program a target on another PCBA, unmount the headers and connect as shown in the section below.

Programming

After installing Flash programmer 2, plug in a Launchpad with a USB cable.

It should show up in the Flash programmer 2 interface. In the pane on the left, there will be an item called XDS110, XDS-L20000QI. Direcly under that it will say CC1310. If not, try rebooting the computer and/or removing and re-inserting the Launchpad. Click on the CC1310.

If Flash programmer 2 says that the debug interface is locked, you need to run a force erase command. Click the large wrench-icon in the top right corner of the Flash programmer 2 interface. Click the Force erase corresponding to the device you have connected (cc13xx/cc26xx).

  1. Set the binary to program: click Browse and navigate to the binary file. It will have the extension .bin. For cc1310/cc1350/cc2650 it will be 128 kB.
  2. Set up the flash address: for cc1310/cc1350/cc2650 it should read 0x0.
  3. Set up actions: we want to erase, program, and verify the device. Make sure all three checkboxes are ticked and set according to the picture.
  4. Press the large Play button to start the process.

Troubleshooting.

Sometimes Flash programmer 2 fails, then simply try again. It may take a 2-3 tries.

If that doesn't help, try changing USB cable to the Launchpad.

If you are using a USB hub, try removing that and connect directly to the computer.

If you have peripherals connected to the Launchpad, such as external sensors or LEDs or such, try removing those since the extra power draw may make the flashing unstable. It takes a relatively large amount of power to erase and write to flash.

Ensure the JTAG cable, if used, is seated correctly and in the right orientation.

Ensure JTAG jumpers are mounted, or unmounted, depending on whether you are programming an external target or not.