mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
boards/cc1312-launchpad: add OpenOCD configuration
This enables OpenOCD for the CC1312 LaunchPad. All we need is: - The Texas Instruments version of OpenOCD (https://git.ti.com/cgit/sdo-emu/openocd) - Set the `PROGRAMMER` environment variable to `openocd`. - Connect a cc1312-launchpad and play with the commands. Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
This commit is contained in:
parent
8c202d5ac5
commit
ca2e2a4289
@ -8,4 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# configure the flash tool
|
||||
include $(RIOTMAKE)/tools/uniflash.inc.mk
|
||||
include $(RIOTBOARD)/common/cc26x2_cc13x2/Makefile.include
|
||||
|
@ -40,7 +40,9 @@ provides the default pinout for the board.
|
||||
The LAUNCHXL-CC1312R1 comes with an XDS110 on-board debug probe that provides
|
||||
programming, flashing and debugging capabilities.
|
||||
|
||||
### Installing CCS and Uniflash
|
||||
### Using TI tools
|
||||
|
||||
#### Installing CCS and Uniflash
|
||||
|
||||
The TI's Code Composer Studio provides the necessary tools to use the debug
|
||||
features of the XDS110; Uniflash provides flashing tools. Both programs can
|
||||
@ -53,7 +55,7 @@ Before using the XDS110 with the latest CCS/Uniflash versions the firmware for
|
||||
it needs to be updated. Texas Instruments has a guide to correctly update it
|
||||
[here](http://software-dl.ti.com/ccs/esd/documents/xdsdebugprobes/emu_xds110.html#updating-the-xds110-firmware).
|
||||
|
||||
### Setting up the environment
|
||||
#### Setting up the environment
|
||||
|
||||
In order to make use of the programming and debugging capabilities of the XDS110
|
||||
some environment variable needs to be set:
|
||||
@ -81,9 +83,40 @@ make debug
|
||||
|
||||
It will open GDB and connect to the debug server automatically.
|
||||
|
||||
### Reset
|
||||
#### Reset
|
||||
|
||||
The LAUNCHXL-CC1312R1 provides a reset button but it can also be reset from
|
||||
a computer using the `make reset` command.
|
||||
|
||||
### Using OpenOCD
|
||||
|
||||
To use OpenOCD with the XDS110 you need to use the an special version of
|
||||
OpenOCD made by TI (upstream version is not _yet_ compatible). You can
|
||||
clone and compile it from source:
|
||||
|
||||
```
|
||||
# Clone into the openocd-ti folder
|
||||
git clone https://git.ti.com/cgit/sdo-emu/openocd openocd-ti
|
||||
|
||||
# Change directory to the openocd source code
|
||||
cd openocd-ti/openocd
|
||||
|
||||
# Configure, build, install
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
#### Setting up the environment
|
||||
|
||||
Now that we have the TI version of OpenOCD we need to export the `PROGRAMMER`
|
||||
environment variable, this is to enable OpenOCD instead of Uniflash.
|
||||
|
||||
```
|
||||
export PROGRAMMER=openocd
|
||||
```
|
||||
|
||||
Now we can just do `make debug-server` and then `make debug`, this all using
|
||||
OpenOCD.
|
||||
|
||||
*/
|
||||
|
10
boards/common/cc26x2_cc13x2/Makefile.include
Normal file
10
boards/common/cc26x2_cc13x2/Makefile.include
Normal file
@ -0,0 +1,10 @@
|
||||
# configure the flash tool
|
||||
PROGRAMMER ?= uniflash
|
||||
|
||||
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/cc26x2_cc13x2/dist/openocd.cfg
|
||||
|
||||
ifeq ($(PROGRAMMER),uniflash)
|
||||
include $(RIOTMAKE)/tools/uniflash.inc.mk
|
||||
else ifeq ($(PROGRAMMER),openocd)
|
||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||
endif
|
11
boards/common/cc26x2_cc13x2/dist/openocd.cfg
vendored
Normal file
11
boards/common/cc26x2_cc13x2/dist/openocd.cfg
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
source [find interface/xds110.cfg]
|
||||
|
||||
transport select jtag
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program enable
|
||||
|
||||
source [find target/ti_cc26x2.cfg]
|
||||
|
||||
adapter_nsrst_assert_width 250
|
||||
adapter_nsrst_delay 400
|
||||
adapter_khz 1000
|
Loading…
Reference in New Issue
Block a user