summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-07-12 07:10:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-07-12 07:10:18 +0200
commit5ed435f33dc6a31cd93b6f38a14dd775977cf1cc (patch)
treea5679efee0260214cece15ba83938e4c6f007f11 /Documentation
parent05f49fa0edb6166f80b8a37a172d6b83db2d92d1 (diff)
parentba927c778091295310fdb105e10c257a0cfc61a3 (diff)
downloadbarebox-5ed435f33dc6a31cd93b6f38a14dd775977cf1cc.tar.gz
barebox-5ed435f33dc6a31cd93b6f38a14dd775977cf1cc.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/user/debugging.rst21
-rw-r--r--Documentation/user/user-manual.rst1
2 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/user/debugging.rst b/Documentation/user/debugging.rst
new file mode 100644
index 0000000000..15cb439043
--- /dev/null
+++ b/Documentation/user/debugging.rst
@@ -0,0 +1,21 @@
+Debugging with OpenOCD
+======================
+
+Barebox can be configured to break on prebootloader and main barebox entry. This
+breakpoint can not be resumed and will stop the board to allow the user to
+attach a JTAG debugger with OpenOCD. Additionally, barebox provides helper
+scripts to load the symbols from the ELF binaries.
+The python scripts require `pyelftools`.
+To load the scripts into your gdb session, run the following command in the
+barebox directory:
+
+.. code-block:: none
+
+ (gdb) source scripts/gdb/helper.py
+
+This makes two new commands available in gdb, `bb-load-symbols` and
+`bb-skip-break`. `bb-load-symbols` can load either the main `barebox` file or
+one of the .pbl files in the image directories. The board needs to be stopped in
+either the prebootloader or main barebox breakpoint, and gdb needs to be
+connected to OpenOCD. To continue booting the board, `bb-skip-break` jumps over
+the breakpoint and continues the barebox execution.
diff --git a/Documentation/user/user-manual.rst b/Documentation/user/user-manual.rst
index 516b760b1b..f04981c3f0 100644
--- a/Documentation/user/user-manual.rst
+++ b/Documentation/user/user-manual.rst
@@ -33,6 +33,7 @@ Contents:
system-reset
state
random
+ debugging
* :ref:`search`
* :ref:`genindex`