Go to file
Paul Fertser e0fc21a2a7 adiv5_swdp: allow to connect to a sleeping target by pulling SRST
This patch introduces a new command, "connect_srst [enable|disable]"
which allows to enable special mode in which SRST would be pulled low
before the SWD scan till attaching to a target.

Since on Cortex-Mx the SRST signal doesn't gate JTAG and SWD, it's
possible to connect to a target while holding reset, ask it to stop at
reset vector and only then deassert reset, thus allowing to attach to
the kind of firmware that goes immediately to sleep or disables
debugging by other means early on start.

Tested on an STM32VLDiscovery board with STM32F100 configured to go to
STOP mode and executing WFI in the very beginning of main().

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2013-05-14 12:32:44 +12:00
driver Update Windows drivers to use new USB IDs. 2012-05-26 15:33:16 +12:00
flashstub Added support for STM32F0. 2012-10-24 18:08:01 +02:00
hardware Modified BMP Mini with extra connectors 2013-03-17 15:03:20 -07:00
libopencm3@20bfcaeb1c Update to current libopencm3 usb api. 2013-01-10 22:01:21 -08:00
scripts Update python scripts to find user's preferred python binary through env. 2013-05-02 11:32:24 -07:00
src adiv5_swdp: allow to connect to a sleeping target by pulling SRST 2013-05-14 12:32:44 +12:00
upgrade Corrected upgrade tool to use our new usb ids. 2012-07-27 21:59:03 +12:00
.gitignore More Files to ignore 2013-01-21 11:02:43 +01:00
.gitmodules Changed libopencm3 url to https. 2012-10-24 07:34:30 +13:00
COPYING Added README and COPYING 2011-02-07 11:01:10 +13:00
HACKING Add note about -mfloat-abi=hard versus -mfloat-abi=soft 2013-01-21 13:52:02 +01:00
Makefile Add toplevel Makefile to build blackmagic with libopencm3. 2012-10-22 18:50:06 +13:00
README Updated project README. 2013-03-17 10:33:19 +13:00

README

=======================================
The Black Magic Debug Project -- README
=======================================

The Black Magic Debug Probe is gadget providing an in-application
debug capability for ARM Cortex-M microcontrollers.  It interfaces
with the GDB, the GNU source level debugger over the USB bus, and
communicates with the target microcontroller over either a JTAG or
Serial Wire debug port.

Currently supported microcontrollers:

 - ST STM32 Family
 - TI/LMI Stellaris Family
 - NXP LPC11xx Family
 - Atmel SAM3X


Getting started
===============
The Black Magic Probe is available as a built-up product form Black
Sphere Technologies.  Contact <sales@blacksphere.co.nz> should
you wish to order one.  If you would like to work on the project see
the file HACKING for developer's info.

When connected via USB, the Black Magic probe will enumerate as a CDC-ACM
device which the OS should present as a tty device or serial port.  The
GDB remote debugging protocol is implemented over this virtual character
stream.  To connect your ARM GDB to the target device use the following
commands:

(gdb) target extended-remote /dev/ttyACM0
(gdb) mon jtag_scan
(gdb) attach 1

The command 'mon swdp_scan' may be used to use the Serial-Wire Debug Protocol
instead of JTAG to connect to the target.

Once attached, all the standard GDB commands may be used to start and control
the execution of the embedded application.

The peripheral registers are not included in the memory map provided to GDB.
I suggest you add the command "set mem inaccessible-by-default off' to
your '.gdbinit'.  That will allow you to access addresses outside of
the memory map.  It will treat anything outside of the memory map as
RAM.

Project layout
==============
driver/ - Windows drivers for the Black Magic probe hardware.
flashstub/ - Source code for flash programming stubs in target drivers.
hardware/ - Schematic (gschem) and PCB layout for the Black Magic Probe
hardware/contrib/ - User contributed hardware variants.
libopencm3/ - Submodule for the libopencm3 library needed for stm32 platforms.
scripts/ - Python scripts useful for programming devices.
src/ - Firmware source code for the Black Magic debug probe.
upgrade/ - Alternate firmware upgrade tool written in C.