Difference between revisions of "Debug Probes"

From PaparazziUAV
Jump to navigation Jump to search
 
(20 intermediate revisions by 3 users not shown)
Line 2: Line 2:
__TOC__
__TOC__


These various debug probes can be used for flashing and debugging Paparazzi hardware, some can even as USB-UART adapters. <br/>
These various debug probes can be used for flashing and debugging Paparazzi hardware, some can even be used as USB-UART adapters. <br/>
Most are compatible with the currently used STM32 platform, some also with the older LPC 21xx.
Most are compatible with the current STM32 platform, some are also compatible with the older LPC 21xx.


Debug probes for Atmel/AVR and SiLabs (ESC Controller chips) are located on the [[ESC]] page since those Microcontrollers are note more used as main processors.
Debug probes for Atmel/AVR and SiLabs (ESC Controller chips) are located on the [[ESC]] page. Since those Microcontrollers are not used more as main processors.


==Debug Protocols / Interfaces==
==Debug Protocols / Interfaces==


There are two different relevant Protocolls / Interfaces for flashing and debugging for STM32:<br/>
There are two different relevant Protocols / Interfaces for flashing and debugging for STM32:<br/>


Note: Some STM32 MCUs can also be flashed via Serial and or USB DFU! But SWD and JTAG provide (much better) debugging capabilities.
Note: Some STM32 MCUs can also be flashed via Serial and or USB DFU! But SWD and JTAG provide much better debugging capabilities.


===SWD===
===SWD===


[http://www.arm.com/products/system-ip/debug-trace/coresight-soc-components/serial-wire-debug.php ARM Serial Wire Debug (SWD)] is a program and debug protocol for ARM processors. It's a low pin count and high-performance alternative and replacement to JTAG.
[http://www.arm.com/products/system-ip/debug-trace/coresight-soc-components/serial-wire-debug.php ARM Serial Wire Debug (SWD)] is a program and debug protocol for ARM processors. It's a low pin count and high-performance alternative to JTAG.


===JTAG===
===JTAG===


JTAG is a industry standard on-chip debugging protocoll. It can be used for one or more chips (daisy chained), for interfacing with the chip as well as flashing software.
JTAG is an industry standard on-chip debugging protocol. It can be used for one or more chips (daisy chained), for interfacing with the chip as well as flashing software.


[[DevGuide/OpenOCD]] can be used for interfacing with JTAG hardware (e.g. FTDI chips).
[[DevGuide/OpenOCD]] can be used for interfacing with JTAG hardware (e.g. FTDI chips).
=JTAG Hardware=
==Black Magic Probe==
[[Image:BMPM_1_top.jpg|500x500px]][[Image:BMPM_1_bottom.jpg|500x500px]]
This is the original [http://www.blacksphere.co.nz/main/blackmagic Black Magic Probe] from [http://www.blacksphere.co.nz Black Sphere Technologies], a JTAG and SWD Adapter used for programming and debugging ARM Cortex MCUs.
The Black Magic Probe is available for purchase in the [http://1bitsquared.com/products/black-magic-probe 1BitSquared Store].
<br style="clear:both">
===Black Magic Probe 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
===Black Magic Probe usage===
In the wiki (under [[Developer_Guide]]) is some helpful information:
* Use Black Magic Probe with Eclipse [[RT_Paparazzi#Debugging_with_an_Eclipse_IDE]].
* General OpenOCD/GDB commands in reagards of the BMP, also about SWD [[DevGuide/GDB_OpenOCD_Debug#Debugging_with_GDB_over_JTAG]] [[DevGuide/GDB_OpenOCD_Debug#Black_Magic_Probe]].
===Upgrade BMP firmware===
Check firmware version:
$ arm-none-eabi-gdb
(gdb)  target extended-remote /dev/ttyACM0
(gdb)  monitor version
Download source from git, compile:
$ git clone https://github.com/blacksphere/blackmagic
$ cd blackmagic
$ git submodule init
$ git submodule update
$ make
$ cd src
$ make clean
$ make PROBE_HOST=native
$ cd ../scripts
Connect the Black Magic Probe to USB while holding down the button for firmware update, then start "stm32_mem.py".
$ ./stm32_mem.py ../src/blackmagic.bin
You can build different targets (Hardware Platforms), default value is;
$ make PROBE_HOST=native
===Documentation===
For more information visit [http://www.blacksphere.co.nz/main/index.php/blackmagic Black Sphere Technologies]
or visit the [https://github.com/blacksphere/blackmagic Black Magic Probe Git Code Reposoitory].
===Where to Purchase===
Black Magic Probe Mini is available through the [[File:1bitsquared_logo.png|50px|link=http://1bitsquared.com/products/black-magic-probe]] [http://1bitsquared.com/products/black-magic-probe 1BitSquared Store].
For $65


==[[CricketProbe/v1.00 | CricketProbe v1.00]]==
==[[CricketProbe/v1.00 | CricketProbe v1.00]]==
Line 27: Line 87:
[[Image:CricketProbe_v100.jpg|300px|left|link=CricketProbe/v1.00 |CricketProbe v1.00 page]]
[[Image:CricketProbe_v100.jpg|300px|left|link=CricketProbe/v1.00 |CricketProbe v1.00 page]]


The CricketProbe is a programming and debugging tool for ARM Cortex MCU, based on [http://www.blacksphere.co.nz Black Sphere Technologies] [http://www.blacksphere.co.nz/main/blackmagic Black Magic Probe].
The CricketProbe is a programming and debugging tool for ARM Cortex MCU, based on the [http://www.blacksphere.co.nz Black Sphere Technologies] [http://www.blacksphere.co.nz/main/blackmagic Black Magic Probe].


<br style="clear:both">
<br style="clear:both">
Line 45: Line 105:
[https://github.com/molnarkares/blackmagic/tree/master/hardware/contrib/lyorak molnarkares/blackmagic git repo (fork from blackmagic)]
[https://github.com/molnarkares/blackmagic/tree/master/hardware/contrib/lyorak molnarkares/blackmagic git repo (fork from blackmagic)]


=Black Magic Probe=
==[[STLink]]==
 
[[Image:BMPM_1_top.jpg|300px|Black Magic Probe]]
[[Image:BMPM_1_bottom.jpg|300px|Black Magic Probe]]
 
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.
 
<br style="clear:both">
 
===Documentation===
 
[https://github.com/blacksphere/blackmagic blacksphere/blackmagic git repo]
[http://www.blacksphere.co.nz/main/index.php/blackmagic]
[http://1bitsquared.com/collections/supporting-hardware/products/black-magic-probe Buy at 1bitsquared for 65$]
 
=[[STLink]]=


[[Image:St-link.jpg|300px]]
[[Image:St-link.jpg|300px]]
Line 70: Line 115:
<br style="clear:both">
<br style="clear:both">


==Clones==
===Clones===


There are some variations of the STLink available. Some with the same STM32F103C8T6 MCU, some with one below.<br/>
There are some variations of the STLink available. Some with the same STM32F103C8T6 MCU, some with a STM32F101C8T6.<br/>
More informations on the [[STLink#Clones]] page.<br/>
More informations on the [[STLink#Clones]] page.<br/>
Again, these can be used with (texanes) STLink or Blackmagic software.
Likely possible to use them with (texanes) STLink or Blackmagic software.


=FLOSS JTAG=
==FLOSS JTAG==


[[Image:Jtag-up.jpg|300px|FLOSS JTAG top]]
[[Image:Jtag-up.jpg|400px|FLOSS JTAG top]]
[[Image:Jtag-down.jpg|300px|FLOSS JTAG bottom]]
[[Image:Jtag-down.jpg|400px|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 simultaneously.<br/>
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 connections simultaneously.<br/>


The upper side contains the JTAG connector and two sets of RX/TX LEDs for JTAG and UART/COM interface separately. The JTAG connector is 2x5 pins, 0.05-inch pitch, and is compatible with the Samtec FFSD-05-D-06.00-01-N-RW-R ribbon cable.
The upper side contains the JTAG connector and two sets of RX/TX LEDs for JTAG and UART/COM interface separately. The JTAG connector is 2x5 pins, 0.05-inch pitch, and is compatible with the Samtec FFSD-05-D-06.00-01-N-RW-R ribbon cable.
Line 89: Line 134:
<br style="clear:both">
<br style="clear:both">


Can be used with [[DevGuide/OpenOCD]] software.
It can be used with [[DevGuide/OpenOCD]] software.
 
===Documentation===
===Documentation===


[http://randomprojects.org/wiki/Floss-JTAG randomprojects.org/wiki/Floss-JTAG]
[http://randomprojects.org/wiki/Floss-JTAG randomprojects.org/wiki/Floss-JTAG]


=FT2232H Mini Module=
=== Availability ===
 
Floss JTAG is currently discontinued and not in production. We recommend buying the [http://1bitsquared.com/products/black-magic-probe Black Magic Probe Mini] instead.
 
==FT2232H Mini Module==


[[Image:AlternativeFlossJtag.png|300px|FT2232H Mini Modules as JTAG adapter]]
[[Image:AlternativeFlossJtag.png|300px|FT2232H Mini Modules as JTAG adapter]]
Line 114: Line 164:


'''Pinout'''
'''Pinout'''
{|border="1"  cellspacing="0" style="text-align:center" cellpadding="6"
|+'''Power'''
!''Use''!!''Pin''
|-
|3V3||CN2-1
|-
|3V3||CN2-3
|-
|3V3||CN2-5
|-
|GND||CN2-2
|-
|GND||CN2-4
|-
|GND||CN2-6
|-
|GND||CN3-2
|-
|GND||CN3-4
|}


{|border="1"  cellspacing="0" style="text-align:center" cellpadding="6"
{|border="1"  cellspacing="0" style="text-align:center" cellpadding="6"
Line 149: Line 220:
|}
|}


===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


===Use as FLOSS-JTAG===
===Use as FLOSS-JTAG===
Line 167: Line 231:
[http://at.mouser.com/ProductDetail/FTDI/FT2232H-MINI-MODULE/?qs=sGAEpiMZZMvOu2nvEqRMlAhGRrWaSCdm Mouser shop 22€]
[http://at.mouser.com/ProductDetail/FTDI/FT2232H-MINI-MODULE/?qs=sGAEpiMZZMvOu2nvEqRMlAhGRrWaSCdm Mouser shop 22€]


=Blackmagic Probe usage=
In the wiki (under [Developer_Guide]) is already some helpful information:
* 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_OpenOCD_Debug#Debugging_with_GDB_over_JTAG]] [[DevGuide/GDB_OpenOCD_Debug#Black_Magic_Probe]].
===Upgrade BMP firmware===
Check firmware version:
$ arm-none-eabi-gdb
(gdb)  target extended-remote /dev/ttyACM0
(gdb)  monitor version
Download source from git, compile:
$ git clone https://github.com/blacksphere/blackmagic
$ cd blackmagic
$ git submodule init
$ git submodule update
$ make
$ cd src
$ make clean
$ make PROBE_HOST=naive
$ cd ../scripts
Connect the Blackmagic Probe to USB while holding down the button for firmware update, then start "stm32_mem.py".
$ stm32_mem.py ../src/blackmagic.bin
You can build different targets (Hardware Platforms), default value is;
$ make PROBE_HOST=naive
   
   
[[Category:Hardware]]
[[Category:Hardware]]

Latest revision as of 04:32, 28 November 2017

These various debug probes can be used for flashing and debugging Paparazzi hardware, some can even be used as USB-UART adapters.
Most are compatible with the current STM32 platform, some are also compatible with the older LPC 21xx.

Debug probes for Atmel/AVR and SiLabs (ESC Controller chips) are located on the ESC page. Since those Microcontrollers are not used more as main processors.

Debug Protocols / Interfaces

There are two different relevant Protocols / Interfaces for flashing and debugging for STM32:

Note: Some STM32 MCUs can also be flashed via Serial and or USB DFU! But SWD and JTAG provide much better debugging capabilities.

SWD

ARM Serial Wire Debug (SWD) is a program and debug protocol for ARM processors. It's a low pin count and high-performance alternative to JTAG.

JTAG

JTAG is an industry standard on-chip debugging protocol. It can be used for one or more chips (daisy chained), for interfacing with the chip as well as flashing software.

DevGuide/OpenOCD can be used for interfacing with JTAG hardware (e.g. FTDI chips).

JTAG Hardware

Black Magic Probe

BMPM 1 top.jpgBMPM 1 bottom.jpg

This is the original Black Magic Probe from Black Sphere Technologies, a JTAG and SWD Adapter used for programming and debugging ARM Cortex MCUs. The Black Magic Probe is available for purchase in the 1BitSquared Store.


Black Magic Probe 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

Black Magic Probe usage

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

Upgrade BMP firmware

Check firmware version:

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

Download source from git, compile:

$ git clone https://github.com/blacksphere/blackmagic
$ cd blackmagic
$ git submodule init
$ git submodule update
$ make
$ cd src
$ make clean
$ make PROBE_HOST=native
$ cd ../scripts

Connect the Black Magic Probe to USB while holding down the button for firmware update, then start "stm32_mem.py".

$ ./stm32_mem.py ../src/blackmagic.bin

You can build different targets (Hardware Platforms), default value is;

$ make PROBE_HOST=native

Documentation

For more information visit Black Sphere Technologies or visit the Black Magic Probe Git Code Reposoitory.


Where to Purchase

Black Magic Probe Mini is available through the 1bitsquared logo.png 1BitSquared Store. For $65

CricketProbe v1.00

CricketProbe v1.00 page

The CricketProbe is a programming and debugging tool for ARM Cortex MCU, based on the 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)

STLink

St-link.jpg

Most STM discovery / eval boards 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 tools, or reflashed with the blackmagic firmware.


Clones

There are some variations of the STLink available. Some with the same STM32F103C8T6 MCU, some with a STM32F101C8T6.
More informations on the STLink#Clones page.
Likely possible to use them with (texanes) STLink or Blackmagic software.

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 connections simultaneously.

The upper side contains the JTAG connector and two sets of RX/TX LEDs for JTAG and UART/COM interface separately. The JTAG connector is 2x5 pins, 0.05-inch pitch, and is compatible with the Samtec FFSD-05-D-06.00-01-N-RW-R ribbon cable.

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


It can be used with DevGuide/OpenOCD software.

Documentation

randomprojects.org/wiki/Floss-JTAG

Availability

Floss JTAG is currently discontinued and not in production. We recommend buying the Black Magic Probe Mini instead.

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.

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

Power
Use Pin
3V3 CN2-1
3V3 CN2-3
3V3 CN2-5
GND CN2-2
GND CN2-4
GND CN2-6
GND CN3-2
GND CN3-4
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


Use as 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€