Skip to content

OpenOCD

Tristan edited this page Jul 15, 2020 · 6 revisions

Making OpenOCD

sudo apt-get update
sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev
git clone http://openocd.zylin.com/openocd
cd openocd
./bootstrap
./configure --enable-sysfsgpio --enable-bcm2835gpio
make
sudo make install

(thanks to https://iosoft.blog/2019/01/28/raspberry-pi-openocd/ )

Via Segger J-Link

With the Segger J-Link (also see https://medium.com/@urish/back-from-the-dead-how-i-revived-a-fried-espruino-board-cf70bdb008e8): openocd -d2 -f interface/jlink.cfg -c "transport select swd" -f target/nrf52.cfg -c "init; halt; nrf5 mass_erase; program bootloader_espruino_1v99.261_pixljs.hex; reset; exit"

Via ST-Link

These adapters can be used using hla_swd however you won't be able to remove access protection for the nrf52. You can replace the firmware with https://mvdlande.wordpress.com/2015/10/05/cmsis-dap-on-a-cheap-st-link-v2-mini-adapter/ and that would allow removal of access protection.

Clone this wiki locally