Skip to content

Instantly share code, notes, and snippets.

@kevinmehall
Last active April 4, 2017 06:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kevinmehall/3eb4e87158dfc7a0fe64 to your computer and use it in GitHub Desktop.
Save kevinmehall/3eb4e87158dfc7a0fe64 to your computer and use it in GitHub Desktop.
Tessel 2 onboard SWD

Needs a more recent openocd than is currently available in openwrt/packages:

opkg update
wget https://kevinmehall.net/tmp/openocd_d3c2679bcb8e8ba25e7b6e443b39f57474afc099-2_ramips_24kec.ipk -O /tmp/openocd.ipk
opkg install /tmp/openocd.ipk
rm /tmp/openocd.ipk

In another terminal:

scp openocd.cfg root@192.168.128.116:
ssh root@192.168.128.116 openocd -f openocd.cfg

In a tessel/t2-firmware checkout:

arm-none-eabi-gdb build/firmware.elf -ex 'target remote 192.168.128.116:3333'
interface sysfsgpio
transport select swd
#RST 39
#SWCLK 41
#SWDIO 42
sysfsgpio_swd_nums 41 42
source [find target/at91samdXX.cfg]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment