From 79efe8f2139705b88759c8bf3053b454c142a853 Mon Sep 17 00:00:00 2001 From: neilh Date: Thu, 5 Nov 2015 15:28:09 -0800 Subject: [PATCH] New page on how to do symbolic debugging --- Symbolic-Debugging.md | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Symbolic-Debugging.md diff --git a/Symbolic-Debugging.md b/Symbolic-Debugging.md new file mode 100644 index 0000000..9233c05 --- /dev/null +++ b/Symbolic-Debugging.md @@ -0,0 +1,45 @@ +#How to on symbolic debugging +Symbolic debugging needs a wired link to the "SWD" pins on the PYBV10. On the pyboard these are shared with the Red and Green leds so they need to be not used when debugging. + +The steps for symbolic debugging + +* a) wire an ST-Link to the PYBV10. ST-links come with all the low cost ST NUCLEO & Discovery line of boards. The NUCLEO boards are setup to easly + +* b) build an image with symbolics and no code optomization (S0)and use an interface that drives the ST-Link (eg openStem32.org's AC6 Eclipse) + +##hardware wires from ST-LINK to pyboard +Nucleo-F401RE CN4----PYBV10 + +1-open + +2-JTCK/SWCLK ------- X20-2 (red) PA13-RED-P5/Led-Red + +3 GND ------------------- GND (blue) + +4 JTMS/SWDIO-------- X21-2 (White) PA14-GRN-P4/LED-Green + +5 NRST ------------------ X13 (red) + +6-open + +I used a 0.1" connector that I had lying around and wire-wrap to link the Nucleo-F401RE CN4 connector to wires soldered to the pyboard. (The Nucleo-F401RE was a could be interesting purchase 1yr ago) **Note:** I anchored the wires when soldering to the pyboard so that the stress of moving the boards didn't wiggle the wire. The wire is at its most vulnerable point where it is soldered to the board. + +{picture of board} + +##symbolic debugging +Symbolic debugging is useful for checking out the interface to hardware - single stepping through each line of code, and looking at the registers/variables. Symbolic debugging often relies on a toolchain that can be difficult to get right - so often its more pain to setup and debug the debugger than it is to use other methods. +Retrofitting symbolic debugging to a large project often doesn't work - so it may not work for the main python code but can be very useful for some integration testing. Your mileage may vary. +ST has developed and made widely available low cost ST-Link. (This is fantastic - other manufacturers let 3rd party's supply commercial debugging hardware) +ST is also supporting an freely downloadable symbolic debugger tool chain at OpenSTM32.org. +If you've used another symbolic debugger with the pyboard please list it here. +ST's documents +TN0072 -Software toolchains and STM32 features + +###OpenSTM32.org +This is an Eclipse Lunar based toolchain for both Linux and Windows. +I've used it to take a STM32cubeMX example and customize it for the pyboard. As of writing (2015Nov) it doesn't accept the stmhal/build-PYBV10/firmware.ELF. + +Download/install the " System Workbench for STM32" - http://www.openstm32.org/System+Workbench+for+STM32 + + +