OpenOCD
Usage (2015-01-01):
Download the .zip file
$ cp Downloads/openocd-head-20150101-linux-64bit.zip /tmp (adjust for wherever you downloaded it to)
$ sudo -s
# cd /opt
# mkdir openocd
# cd openocd
# unzip /tmp/openocd-head-20150101-linux-64bit.zip
# chmod -R o+rX .
# ln -s head.20150101 default
Usage (2016-07-20):
Use similar commands as above.
NOTE: the tiva connected launchpad may be broken in this release. I have not tested and had bad experience with OpenOCD head before.
Using SWD for debugging/loading:
I have the Olimex ARM-USB-TINY-H programmer with JTAG port. With a simple wiring hack this can be used in SWD mode as follows:
- Use the 2016-07-20 version of openocd, downloadable here. (UPDATE: it also seems to work with the 20150101 version and consequently a production 0.9.0 version that you may have an official installer for from your distro.)
- SWCLK of the target to TCK of the debugger (this is a straight connection).
- The SWDIO (TMS) pin of the target side is connected to two pins on the JTAG emulator:
* Directly to the TDO pin of the emulator
* through a 470 ohm resistor to the TDI pin of the emulator.
(note that it is NOT connected "straight" to the TMS pin of the emulator).
Then use commandlines like this: (quoted from applications/blink_raw/targets/freertos.armv7m.ti-launchpad-cc3200/Makefile)
OPENOCDARGS = -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f interface/ftdi/swd-resistor-hack.cfg -f target/cc32xx.cfg
run: $(EXECUTABLE)$(EXTENTION) $(EXECUTABLE).lst
$(GDB) $< -ex "target remote | $(OPENOCDPATH)/openocd -c \"gdb_port pipe\" --search $(OPENOCDSCRIPTSPATH) $(OPENOCDARGS)" -ex "source $(OPENMRNPATH)/boards/ti-cc3200-generic/utils.gdb" -ex "monitor reset halt" -ex "load" -ex "reset"