OpenOCD Setup for AM13E230x
Note
Windows is not supported at this time. Use WSL2 with the Linux instructions below.
Installation Dependencies
Linux
Install the required build tools and libraries:
sudo apt update && sudo apt install libusb-1.0-0-dev libtool gdb-multiarch
Building a patched OpenOCD for AM13E230x
The following steps build OpenOCD with AM13E230x support on Linux:
Clone the OpenOCD repository:
git clone https://github.com/openocd-org/openocd
cd openocd
Initialize the submodules:
git submodule update --init
Apply the required AM13E230x patch:
curl -L -o am13e230x_support.patch \
https://raw.githubusercontent.com/TexasInstruments/asm-hal_ti/refs/heads/master/am13/openocd_am13e230x_support.patch
patch -p1 < am13e230x_support.patch
Prepare the build system and configure OpenOCD with XDS110 support:
./bootstrap && ./configure --enable-internal-jimtcl --enable-xds110
Build OpenOCD:
make -j$(nproc)
Notes
The
--enable-internal-jimtcloption builds the bundled Tcl interpreter.The
--enable-xds110option adds support for the TI XDS110 debug probe.If you need to troubleshoot build dependencies, install standard autotools and development libraries for your platform.
Debugging with OpenOCD and GDB
Once OpenOCD is running, you can debug your application using gdb-multiarch:
Start OpenOCD in one terminal:
src/openocd -s tcl -f tcl/board/ti/am13e230x-launchpad.cfg
In another terminal, launch the debugger with your compiled ELF binary:
gdb-multiarch <path-to-your-elf-file>
Connect to the OpenOCD debug server:
target extended-remote :3333
Perform typical debug operations:
monitor reset halt
load
break main
continue
Semihosting and Printf Output
To enable semihosting and capture printf output on the OpenOCD terminal:
monitor arm semihosting enable
Important
Semihosting for printf output works correctly with GCC-compiled binaries.
If your code is compiled with TI ARM Clang, semihosting printf statements will not be captured.
Additional Resources
For a comprehensive list of OpenOCD commands and debugging options, refer to the OpenOCD documentation.