Install and Use pyOCD + J-Link on Ubuntu 24.04

Step-by-step setup for pyOCD with J-Link on Ubuntu 24.04.

This setup uses low-cost J-Link OB compatible debug probes (SWD).

Installation

Download Linux .deb package from: https://www.segger.com/downloads/jlink/

2. Install Python runtime helpers

1
2
3
sudo apt install python-is-python3
sudo apt install pipx
pipx ensurepath

3. Install pyOCD

1
pipx install pyocd

4. Verify probe detection

1
pyocd list

Common Usage

List targets

1
pyocd list --targets

Flash firmware

1
pyocd load firmware.elf

Open GDB server

1
pyocd gdbserver

Troubleshooting

  • If pyocd list shows no probe, check USB permission/udev rules.
  • If J-Link appears but target connection fails, verify SWD wiring and target power.
  • Try lower SWD clock when signal quality is poor.
记录并分享
Built with Hugo
Theme Stack designed by Jimmy