🛠 Console série et JTAG du CM5 : l'empreinte de debug JST-SH et les points de test

Raspberry Pi Compute Module 5 (compute-module-5) · avance · Schéma : IMG-compute-module-5-avance-3-debug-uart-jtag-cm5.svg — CM5 vu de dessus avec l'empreinte de debug JST-SH 3 broches 1 mm (BM03B-SRSS-TB) surlignée, les points de test TP35/TP36 (TX/RX), les pastilles JTAG et les pads d'alimentation/boot USB sur points de test ; un convertisseur USB-série 3,3 V y est branché, un terminal affichant le log de boot.

Objectives

The CM5 is the first Compute Module designed for debugging without a full carrier board: the datasheet (Appendix A) describes a 3-pin JST-SH debug UART footprint with a 1 mm pitch (connector reference BM03B-SRSS-TB), repeated TX/RX test points (TP35/TP36), JTAG test points, and power and USB boot pads on test points to flash a module without using the 2 × 100-pin connectors. This tutorial covers outputting the kernel console to this UART, capturing the full boot log, and laying the groundwork for JTAG debugging.

Hardware

Complete code

# --- Côté CM5 : activer la console série ---
sudo tee -a /boot/firmware/config.txt >/dev/null <<'EOF'
enable_uart=1
cmdline=console=serial0,115200 console=tty1
EOF
sudo reboot

# --- Côté hôte : capturer le boot complet ---
sudo apt install -y picocom
picocom -b 115200 /dev/ttyUSB0          # log de boot puis shell
# (sous minicom : minicom -D /dev/ttyUSB0 -b 115200)

# --- Vérifier le console déclarée par le noyau ---
cat /proc/cmdline
cat /sys/class/tty/ttyAMA0/device/driver/driver 2>/dev/null || true

# --- Base JTAG (points de test de l'Annexe A) avec un adaptateur CMSIS-DAP ---
cat > /tmp/jtag.cfg <<'EOF'
adapter driver cmsis-dap
transport select jtag
target extended-memory-access enabled
EOF
sudo openocd -f /tmp/jtag.cfg -c 'init; halt; reg pc; resume; shutdown'

Expected verification

On the terminal at 115200 baud, the firmware scrolls by followed by kernel messages (console=serial0,115200 in /proc/cmdline), and a login prompt appears — the serial console works even when HDMI/SSH are down. OpenOCD halts the Cortex-A76 and then resumes without errors, proving the JTAG chain is functional.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials