From bd69f95fb19c185e0df737c74f55e34d47855a85 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 5 Sep 2012 14:45:57 -0400 Subject: unix-toolchain: Fix up JTAG section. Signed-off-by: Marti Bolivar --- source/unix-toolchain.rst | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'source/unix-toolchain.rst') diff --git a/source/unix-toolchain.rst b/source/unix-toolchain.rst index ffa6020..769b8ec 100644 --- a/source/unix-toolchain.rst +++ b/source/unix-toolchain.rst @@ -336,15 +336,21 @@ notifications about bleeding-edge development. Advanced users will wish to use a JTAG (or SWD) dongle for uploading and debugging their programs. A big advantage to this approach is that -it lets you use `GDB -`_ to single-step -through your code, inspect variables, etc. +it lets you use `GDB `_ to +single-step through your code, inspect variables, etc. You can build your projects for JTAG or SWD upload with the ``jtag`` -Makefile target. Instead of compiling with ``make``, compile with -``make jtag``. Then use your method of choice to upload the resulting -program, which will be in ``build/$BOARD.elf`` in the libmaple -directory. +Makefile target. That is, instead of compiling with ``make``, compile +with :: + + # (This is equivalent to $ MEMORY_TARGET=jtag make) + $ make jtag + +Then use your favorite JTAG/SWD dongle and driver software to upload +the resulting program. An `ELF +`_ +suitable for upload is in :file:`build/$BOARD.elf`; the raw binary you +can copy directly to address 0x0 is :file:`build/$BOARD.bin`. .. warning:: Uploading code built with the ``jtag`` target will overwrite the :ref:`bootloader `. This is a good thing -- cgit v1.2.3