3
0
Fork
You've already forked redcuttle-hardware
2
JTAG/SWD/UART signal multiplexer and switcher
  • HTML 100%
2026年07月09日 19:33:21 -06:00
assets/images add readme notes about consistant LQFP stm32 target routing 2026年06月20日 21:28:38 -06:00
docs Added backplane address resistor calculation spreadsheet. 2025年01月19日 09:32:52 -08:00
hardware targets/breakout: routing of flash programming IC, regulator, and USB connector 2026年06月29日 20:52:56 -06:00
.gitignore hardware: colocate all hardware files in /hardware directory 2026年06月19日 21:36:58 -06:00
.gitmodules hardware: colocate all hardware files in /hardware directory 2026年06月19日 21:36:58 -06:00
LICENSE.CC-BY-SA-4.0 add explicit licences for existing hardware components 2026年06月19日 21:37:14 -06:00
LICENSE.CERN-OHL-S-2.0 add explicit licences for existing hardware components 2026年06月19日 21:37:14 -06:00
README.md readme: add note about backplane spacing 2026年07月09日 19:33:21 -06:00

RedCuttle - Hardware In The Loop Testbench

Welcome to RedCuttle.

This project is the hardware and software for a JTAG/SWD/UART port multiplexer and switcher.

This hardware allows the control of multiple debuggers and targets to be connected to one another for development and testing purposes. The original motivation for this is the Hardware In The Loop testing of the Black Magic Debug firmware on Black Magic Probe hardware.

Controller

The debug/controller board provides the interface between a host PC over USB, and the carriers and targets connected to the backplane.

The controller features an STM32 MCU that handles the interface between the computer and the CAN bus that communicates with the carriers over the backplane.

Current plans are to use the UVCAN standard for the CAN connection, specified here.

External CAN connections use a 4-pin JST-GH:

  1. Bus power (5V nominal)
  2. CAN high
  3. CAN low
  4. Ground

These connectors are described here.

Backplane

The backplane manages the bus that routes the connected carriers together.

An example backplane

It has a CAN bus that ties all the carriers together, and exposes them to a debugging controller that then links the entire backplane to the computer managing the targets.

  • 4HP (0.8" / 20.32mm) between carrier slots
    • Anything lower and there isn't sufficiant room for some targets.
  • 3U height (5.25" / 133mm)
  • M2.5 ground-plated mounting holes
  • Designed to be chainable next to each-other in a larger rack.

Carrier

The carrier boards slot into a backplane and contain slots for several targets. The carriers interface over the backplane with the controller to connect the targets to the bus. Each carrier has an STM32 that communicates over CANBUS to the debugging to select which target is enabled and powerd.

Example of a PCIe-based carrier board

The interface from the carriers to the targets is described in the Connector section of the Target section.

The backplane slots for carriers are 4HP (0.8" or 20.32 mm) spaced, with the PCIe connector falling within the first HP of each slot, aligned with the card slide - about 0.73mm or 0.0287" to the right from the HP's center.

Carrier Connector x1

The carrier interfaces with the backplane through a PCIe x1 socket. Best effort is made to keep the pinout backwards-compatible with older hardware.

Even if the size of the PCIe connector is expanded in the future, it will still be backwards-compatible following this pinout.

Suggested parts:

  • Lian Xin Technology XDMP-052-0360
    • PCIe x1 - 36 positions
    • Surface Mount
Signal A Side B Side Signal
VREF A1 B1 +5V
GND A2 B2 ADDR
USB+ A3 B3 MGMT_SDA
USB- A4 B4 MGMT_SCL
GND A5 B5 GND
TRACECLK A6 B6 JTMS
TRACED0 A7 B7 JTCK
TRACED1 A8 B8 JTDO
TRACED2 A9 B9 JTDI
TRACED3 A10 B10 NRST
GND A11 B11 GND
- KEY KEY -
GND A12 B12 GND
GPIO4 A13 B13 GPIO0
GPIO5 A14 B14 GPIO1
GPIO6 A15 B15 GPIO2
GPIO7 A16 B16 GPIO3
GND A17 B17 GND
NC A18 B18 NC

Carrier Connector Changelog

  • 19/06/2026 - Documented reference connector layout designed by @zyp.

Targets

Each hardware target to test against is implemented as 42x38mm board (including edge connector) with an M.2 B-key card edge.

An example M.2 target board

GPIO

While the GPIO connections for targets can vary a bit depending on the requirements for a particular target, following this peripheral mapping will allow interfacing with the standard pinout on things like the breakout boards:

GPIO PERI
GPIO0 UART_TX
GPIO1 UART_RX
GPIO2 SPI_CS
GPIO3 SPI_CLK
GPIO4 SPI_MISO
GPIO5 SPI_MOSI
GPIO6 I2C_SCL
GPIO7 I2C_SDA

STM32

Genrally, LQFP STM32 targets follow the same pin to peripheral mappings. When possible, place pin 1 facing the top left corner of the board, and then you following GPIO can be cleanly routed straight up and over:

GPIO PIN PERI
GPIO0 PA2 USART2_TX
GPIO1 PA3 USART2_RX
GPIO2 PA4 SPI1_NSS
GPIO3 PA5 SPI1_CLK
GPIO4 PA6 SPI1_MISO
GPIO5 PA7 SPI1_MOSI
GPIO6 PB10 I2C2_SCL
GPIO7 PB11/12 I2C2_SDA
Routing example

Routing of STM32 targets

Identification

Each carrier has an I2C bus that gets connected to the target. Each target contains a small I2C EEPROM, typically a Microchip 24AA01 that is on a known bus address. This EEPROM contains identification and configuration information for the connected target in question.

The bus address used for targets is 1010000 or 0x50, from all address lines tied to ground.

Mechanical

Target boards are M.2 B-key cards, with a thickness of 0.8mm and edge contact beveling of 30-45 degrees. They are slightly shorter then the M.2_3042-xx-B specification at 41.3mm high (from bottom of card edge to top edge) instead of 42mm to allow clearance for fastening mounting two cards to the same mounting stud. The cards are also 38mm wide instead of 30mm to allow for more routing room for wider target MCUs. This makes the working area of the target board (excluding the M.2 card edge) 38x37.3mm.

The target boards are retained by an M3 bolt, going into a threaded SMD standoff, an Amphenol MDT420STD001. These can be retained using a matching Amphenol MDTSCW001 bolt. These M3 standoffs are more cost-effective then the typical M.2 standoffs, and are still used widely on motherboards.

While the M.2 spec calls for a 20 degree bevel with a 0.3mm edge clearance, PCB fabs are usually equipped for 30 or 45 degree bevels. Due to this being common, the majority of M.2 sockets will accept a 45 degree bevel with a 0.47mm edge clearance with no issues.

Note that JLCPCB will not bevel boards smaller them 50x50mm. To get around this, targets need to edge rail added along the top-side where the mounting hole is located, and panelized vertically.

Target Connector

The targets use custom-sized card sporting an M.2 B-key card-edge to connect to carriers. Best effort is made to keep the pinout backwards-compatible with older hardware.

Suggested connector parts:

A shorter M.2 connector could be used, but I would stick with 4.2mm because it's fairly standardized, and gives enough clearance for SOIC components on the underside of the board if required.

M.2 B-key Pinout

Signal Pin Pin Signal
GND 1 2 GND
+3V3 3 4 +5V
MGMT_SCL 5 6 +5V
MGMT_SDA 7 8 VREF1
+3V3 9 10 GND
GND 11 -
- -
- -
- -
- 20 GND
GND 21 22 TRACECLK
JTMS 23 24 TRACED0
JTCK 25 26 TRACED1
JTDO 27 28 TRACED2
JTDI 29 30 TRACED3
NRST 31 32 GND
GND 33 34 USB_D+
TARGET_RX 35 36 USB_D-
TARGET_TX 37 38 GND
GND 39 40 GPIO0
41 42 GPIO1
43 44 GPIO2
45 46 GPIO3
47 48 GPIO4
49 50 GPIO5
51 52 GPIO6
53 54 GPIO7
55 56 GND
GND 57 58 VGPIO
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74 GND
GND 75

Connector Changelog

  • 19/06/2026 - Documented reference connector layout designed by @zyp.
  • 28/06/2026 - Change pin 3 from MGMT_3V3 to constant +3V3 supply, add second +3V3 supply on pin 9. I2C EEPROM will always use 3.3v logic with STM32 controllers, so doesn't make sense to have a dedicated supply for it. A universal +3.3v supply is better suited, also making unused pin 9 a +3.3v supply as well for larger current capabilities.
  • 29/06/2026 - Add dedicated RX/TX pins on 35/37 for debugger UART connection without sacrificing GPIO pins.
  • 09/07/2026 - Add VGPIO on pin 58 so the target can inform the logic analyzer of the GPIO pin HIGH voltage.

Enclosures

SCHROFF RatiopacPRO

The backplanes fit nicely in Schroff RatiopacPRO cases, tested with the first iteration of the hardware designed by @zyp.

RatiopacPro case

A quarter rack (28HP) backplane fits nicely into the RatiopacPRO #24571-005, a 3U, 28HP, 315mm deep case.

SCHROFF Racks

The SCHROFF racks are easily adaptable to the backplane and cards. For racks, you want sizes that can be configured to at least 175mm long, which in the SCHROFF system allows for card depths of ~160mm + connector.

Theroretical shopping list for bare-bones 42HP half-rack:

  • x2 Front Rails 34560-142
  • x2 Back Rails 34560-642
  • x4 Screw Inserts 34561-342
  • x2 Side Panel 34560-185
  • x1 Board Guides 24568-361

About CA200ドル in total.

License

The majority hardware and CAD components of this project are licensed under the CERN Open Hardware License v2.0. Check the LICENSE file closest to the hardware in question to see what license it is under.

Some hardware components, and the software components of this project are licensed under CC-BY-SA-4.0.

SPDX-License-Identifier: CERN-OHL-S-2.0 AND CC-BY-SA-4.0


  1. Vref connected to Black Magic Probe. Either detects the target voltage, or powers the target via the ptobe depending on probe settings. ↩︎