Andres Sabas
Published © CERN-OHL

How to Debug Hardware with OpenOCD or PyOCD

If you are having problems in the development of firmware for hardware, it is recommended to use a debugger to see the problem.

IntermediateFull instructions provided1 hour4,493
How to Debug Hardware with OpenOCD or PyOCD

Things used in this project

Hardware components

DapCat
Electronic Cats DapCat
×1
Bast BLE
×1
USB-A to USB-C
×1

Software apps and online services

openOCD
arm GDB
pyOCD

Story

Read more

Code

openocd.cfg

C/C++
File required for openOCD configuration when loading into console
source [find interface/cmsis-dap.cfg]
transport select swd
 
set CHIPNAME nrf52840
source [find target/nrf52.cfg]
 
# did not yet manage to make a working setup using srst
#reset_config srst_only
#reset_config  srst_nogate
 
adapter srst delay 100
adapter srst pulse_width 100
 
init
targets
reset halt

Credits

Andres Sabas

Andres Sabas

45 projects • 45 followers
Co-Founder of The Inventor's House Hackerspace, DIY, Workaholic

Comments