There are different ways to flash TI based boards. In this example I am using the TI CC2538DK evaluation board. To get access to the needed UART ports you first need to install the ti emulation pack / drivers (on linux and windows), which I’ve described earlier (Link).
Windows
TI offers two different programs on windows to flash the CC2538DK: Flash Programmer 2 (note: Use version 2!) and CCS Uniflash.
Flash Programmer 2
Flash Programmer 2 is quite straight forward. Connect the CC2538DK to the computer and check that it shows up in the “Connected devices” table. You can try a right click and connect to check if the connection is working or you can just select a firmware .bin file, select “erase”, “program” and “verify” and flash it.
This is my preferred way of flashing TI boards using windows.
CCS Uniflash
CCS Uniflash is the newer tool for flashing TI devices. Its a fancy shiny node.js and HTML application which I am not a huge fan of. Its however quite straight forward to use. As the CC2538DK is not listed select the IC directly in the first step (e.g.
Linux
cc2538-bsl Python script
First make sure that you have python itself installed and also the python-serial module.
sudo apt-get install python-serial
Then get the script from github:
git clone https://github.com/JelmerT/cc2538-bsl.git
Reset the board in the so called “bootloader mode” by pressing “Select” and “Reset” at the same time when powering up. Select a baud rate if you like but the CC2538DK also support rates up to 400k. Start the script without handing in a firmware image to check if the IC is recognized correctly. This should like like this for the CC2538DK:
sudo ./cc2538-bsl.py -b 115200 -p /dev/ttyUSB1 Opening port /dev/ttyUSB1, baud 115200 Connecting to target... CC2538 PG2.0: 512KB Flash, 32KB SRAM, CCFG at 0x0027FFD4 Primary IEEE Address: 00:12:::FF
Now you also should be able to flash a new firmware.
CCS Uniflash
Uniflash is also available for linux environments. As recommended on the TI page you should check to have the following packages installed first:
sudo apt-get install libgtk2.0-0 libcanberra-gtk0 libdbus-glib-1-2 libgconf-2-4 liborbit-2-0 libusb-0.1-4 libgnomevfs2-0 libice6 libncurses5 libsm6 libxtst6 libxt6 libasound2
Then download Uniflash from the website:
wget http://software-dl.ti.com/ccs/esd/uniflash/uniflash_sl.4.1.1169.run chmod +x uniflash_sl.4.1.1169.run ./uniflash_sl.4.1.1169.run
If you get an error that libudev is missing, try first to find it (check that you’ve installed libudev):
find / -name libudev.so.1
And create a symlink, as recommended here:
sudo ln -siT /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0