Difference between revisions of "Debug Probes"

From PaparazziUAV
Jump to navigation Jump to search
Line 32: Line 32:
This is the original [http://www.blacksphere.co.nz/main/blackmagic Black Magic Probe] from [http://www.blacksphere.co.nz Black Sphere Technologies], a programming and debugging tool for ARM Cortex MCU.
This is the original [http://www.blacksphere.co.nz/main/blackmagic Black Magic Probe] from [http://www.blacksphere.co.nz Black Sphere Technologies], a programming and debugging tool for ARM Cortex MCU.


=== Benefits===
<br style="clear:both">
 
===Documentation===
 
[https://github.com/blacksphere/blackmagic blacksphere/blackmagic git repo]
 


There are good reasons to use the Black Magic Probe Mini instead of FLOSS-JTAG:
==[[STLink]]==


*Lower cost
[[Image:St-link.jpg|300px]]
*No need for OpenOCD as BMPM has a built in GDB server
*Orders of magnitude faster as all the high speed protocol logic happens on the built-in STM32
*Supports Serial Wire Debug (SWD)
*Supports tracing using the SWD trace pin
*No need for loading and unloading of FTDI drivers on Mac OS X


===UART port===
Every STM discovery / eval board comes with a [http://www.st.com/web/catalog/tools/FM146/CL1984/SC724/SS1677/PF251168 ST-Link V2] on board, with one exception; the STM32VL version, that board comes with ST-Link V1.
The pinout for the UART port on the back side of the BMP as seen on the image above and starting from the top is ground,rx,tx,3.3v.
<br style="clear:both">


===Documentation===
These can be used with [https://github.com/texane/stlink texane’s] utilities, or reflashed with [[STLink#Update_the_ST-Link_to_blackmagic_probe| the blackmagic firmware]].


[https://github.com/blacksphere/blackmagic blacksphere/blackmagic git repo]
<br style="clear:both">


==FLOSS JTAG==
==FLOSS JTAG==
Line 146: Line 144:
* Use Blackmagic Probe with Eclipse [[RT_Paparazzi#Debugging_with_an_Eclipse_IDE]].
* Use Blackmagic Probe with Eclipse [[RT_Paparazzi#Debugging_with_an_Eclipse_IDE]].
* General OpenOCD/GDB commands in reagards of the BMP, also about SWD [[DevGuide/GDB-Debug#Debugging_with_GDB_over_JTAG]].
* General OpenOCD/GDB commands in reagards of the BMP, also about SWD [[DevGuide/GDB-Debug#Debugging_with_GDB_over_JTAG]].
===Upgrade BMP firmware===
TODO: rewrite, this is just copied from the JTAG page.
Check firmware version:
$ sudo /usr/bin/arm-none-eabi-gdb
(gdb)  target extended-remote /dev/ttyACM0
(gdb)  monitor version
To upgrade the brain of your Black Magic Probe, a.k.a. its firmware:
- Download the compiled firmware from http://blacksphere.co.nz/builds/  (more info at https://github.com/blacksphere/blackmagic/wiki/Frequently-Asked-Questions)
- Download and run the stm32_mem.py script:
  $ git clone git://blackmagicdebug.git.sourceforge.net/gitroot/blackmagicdebug/blackmagicdebug
  $ cd blackmagicdebug/src/scripts
  $ ./stm32_mem.py blackmagic-XXXX.bin  (this is the .bin file you downloaded in previous step)


[[Category:Hardware]]
[[Category:Hardware]]

Revision as of 14:32, 30 March 2015

These various programming adapters and probes can be used for flashing, debugging and some also as serial adapters.

CricketProbe v1.00

CricketProbe v1.00 page

The CricketProbe is a programming and debugging tool for ARM Cortex MCU, based on Black Sphere Technologies Black Magic Probe.


Lyorak Probe

Lyorak probe Lyorak probe pinout

The Lyorak probe is a programming and debugging tool for ARM Cortex MCU, based on the Black Magic Probe.
Designed with 1206 SMD components for easy assmbly and a CAN interface.


Documentation

molnarkares/blackmagic git repo (fork from blackmagic)

Black Magic Probe

Black Magic Probe Black Magic Probe

This is the original Black Magic Probe from Black Sphere Technologies, a programming and debugging tool for ARM Cortex MCU.


Documentation

blacksphere/blackmagic git repo


STLink

St-link.jpg

Every STM discovery / eval board comes with a ST-Link V2 on board, with one exception; the STM32VL version, that board comes with ST-Link V1.

These can be used with texane’s utilities, or reflashed with the blackmagic firmware.


FLOSS JTAG

FLOSS JTAG top FLOSS JTAG bottom

The FLOSS JTAG is based on an FTDI 2232HL chip that allows two simultaneous USB connections, which means that FLOSS JTAG allows JTAG and UART/COM connections.
The FT2232H Mini Module can also be used since this has the same chip.

On the bottom side there is 4 pin UART/COM connector, which contains (from top to bottom on the image, or color dots): Ground (black), RX (orange), TX (yellow), and +5V (red)


Documentation

randomprojects.org/wiki/Floss-JTAG

FT2232H Mini Module

FT2232H Mini Modules as JTAG adapter Top with all necessary connections Bottom with pin headers


The FT2232H Mini modules can be used with blackmagic firmware or as FLOSS-JTAG device.
More Information can be found at the FT2232H Mini Module Serial Adapter page.

Important

Out of the box, there is NO power supply for the FT2232H because this can either done with USB or external 5V.
The pictures above show two different PCB versions. The suggested connections only apply to the right (latest) layout.

Connect: (for power supply over USB)

  • CN3 pin 1 to CN3 pin 3
  • CN2 pin group 1,3,5 to CN2 pin group 11,21 and to CN3 pin group 12,22

Pinout

UART
Use Pin Name
UART1 RX CN2-10 ADBUS1
UART1 TX CN2-7 ADBUS0
UART2 RX CN3-25 BDBUS1
UART2 TX CN3-26 BDBUS0
JTAG
Use Pin Name
JTAG1 TCK CN2-7 ADBUS0
JTAG1 TDI CN2-10 ADBUS1
JTAG1 TDO CN2-9 ADBUS2
JTAG1 TMS CN2-12 ADBUS3
JTAG2 TCK CN3-26 BDBUS0
JTAG2 TDI CN3-25 BDBUS1
JTAG2 TDO CN3-24 BDBUS2
JTAG2 TMS CN3-23 BDBUS3

Blackmagic firmware

First, get the VID/PID for your FT2232 device using 'lsusb'. Edit the file 'src/libftdi/platform.h' and change the VID/PID to match your hardware. Compile the application with the command:

make PROBE_HOST=libftdi

FLOSS-JTAG

With the tool "FT_Prog" change the description the FT2232H to "FLOSS-JTAG".

Documentation

FT2232H Datasheet
FT2232H Mini Module Datatsheet
Mouser shop 22€

Blackmagic Probe usage

In the wiki (under [Developer_Guide]) is already some helpful information:

Upgrade BMP firmware

TODO: rewrite, this is just copied from the JTAG page.

Check firmware version:

$ sudo /usr/bin/arm-none-eabi-gdb
(gdb)  target extended-remote /dev/ttyACM0
(gdb)  monitor version

To upgrade the brain of your Black Magic Probe, a.k.a. its firmware:

- Download the compiled firmware from http://blacksphere.co.nz/builds/  (more info at https://github.com/blacksphere/blackmagic/wiki/Frequently-Asked-Questions)
- Download and run the stm32_mem.py script:
  $ git clone git://blackmagicdebug.git.sourceforge.net/gitroot/blackmagicdebug/blackmagicdebug
  $ cd blackmagicdebug/src/scripts
  $ ./stm32_mem.py blackmagic-XXXX.bin   (this is the .bin file you downloaded in previous step)