Tools for debugging & flashing firmware
This is a collection of scripts and config files to flash & debug microcontrollers.
Supported platforms:
lpc43xx_m0 lpc43xx_m4 lpc11uxx
Supported debuggers:
- OpenOCD (tested in combination with the JTAG-lock-pick Tiny 2 programmer)
- Black Magic Probe
It is intended to be used as a dependency for a firmware CPM package. See the example_blinky_m4 repository for a simple example project that uses this package for flashing its firmware.
- gdb
- OpenOCD (optional)
- Python >= 3.5 (lower versions probably work fine as well)
Assuming a linux/unix os with udev, copy the the .rules file(s) from the install folder into /etc/udev/rules.d/ to make sure access to the JTAG programmer is allowed as non-root. Depending on the os / linux distro you may need to be member of the 'dialout' group for the Black Magic Probe to work.
Checkout a firmware package, for example example_blinky_m4. Create a build dir: mkdir build && cd build
.
- execute
make flash
to flash the firmware
For debugging via OpenOCD, you need to start the openocd server manually. For example, to debug lpc4337 M0 core, use "openocd -f lpc4337_m0.cfg"
Simply execute "make flash". If you have an existing openocd server running, it will be re-used, otherwise it will auto-start in the background. If flashing fails, make sure to close existing debug sessions.
For a jtag scan, execute "openocd -f jtag-scan.cfg"
Simply execute "make debug"
Simply execute "make flash"