From 6e1c7ba18424aa1bdf48be490afdbb57725efe32 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Sat, 25 Oct 2014 12:15:19 +0100 Subject: [PATCH] Adding some developer documentation, work-in-progress. --- docs/development/Hardware Debugging.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/development/Hardware Debugging.md diff --git a/docs/development/Hardware Debugging.md b/docs/development/Hardware Debugging.md new file mode 100644 index 000000000..48025f60d --- /dev/null +++ b/docs/development/Hardware Debugging.md @@ -0,0 +1,21 @@ +# Hardware debugging + +The code can be compiled with debugging information, you can then upload a debug version to a board via a JLink/St-Link debug adapter and step through the code in your IDE. + +## Compilation options + +use `DEBUG=GDB` make argument. + +You may find that if you compile all the files with debug information on that the program is too big to fit on the target device. If this happens you have some options: + +* Compile all files without debug information (`make clean`, `make ...`), then re-save or `touch` the files you want to be able to step though and then run `make DEBUG=GDB`. This will then re-compile the files you're interested in debugging with debugging symbols and you will get a smaller binary file which should then fit on the device. +* You could use a development board such as an Olimexino or an EUSTM32F103RB, development boards often have more flash rom. + +## OSX + +### Install OpenOCD via Brew + +ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + +brew install openocd +