debug-mips

CLI reference

glasgow run debug-mips

Debug MIPS processors via the EJTAG interface.

This applet supports dumping CPU state, which is also useful to check if the CPU is recognized correctly, and running a GDB remote protocol server for a debugger. The supported debugger features are:

  • Starting, stopping and single-stepping.

  • Hardware and software breakpoints.

  • Register and memory reads and writes.

Notable omissions include:

  • Floating point.

  • Tracepoints and watchpoints.

The applet has been written with 32- and 64-bit CPUs with EJTAG 1.x-5.x in mind, but has only been tested with the following configurations:

  • MIPS32 R1 big endian with EJTAG 1.x/2.0 (Broadcom BCM6358);

  • MIPS32 R1 big endian with EJTAG 2.6 (Infineon ADM5120).

Other configurations might or might not work. In particular, it certainly does not currently work on little-endian CPUs. Sorry about that.

usage: glasgow run debug-mips [-h] [-V SPEC] [--tck PIN] [--tms PIN]
                              [--tdi PIN] [--tdo PIN] [--trst PIN] [-f FREQ]
                              [--scan-ir-max-length LENGTH]
                              [--scan-dr-max-length LENGTH]
                              [--ir-lengths IR-LENGTH,...] [--tap-index INDEX]
                              OPERATION ...
-h, --help

show this help message and exit

-V <spec>, --voltage <spec>

configure I/O port voltage to SPEC (e.g.: ‘3.3’, ‘A=5.0,B=3.3’, ‘A=SA’)

--tck <pin>

bind the applet I/O line ‘tck’ to PIN (default: ‘A0’, optional)

--tms <pin>

bind the applet I/O line ‘tms’ to PIN (default: ‘A1’, optional)

--tdi <pin>

bind the applet I/O line ‘tdi’ to PIN (default: ‘A2’, optional)

--tdo <pin>

bind the applet I/O line ‘tdo’ to PIN (default: ‘A3’, optional)

--trst <pin>

bind the applet I/O line ‘trst’ to PIN (optional)

-f <freq>, --frequency <freq>

set TCK frequency to FREQ kHz (default: 100)

--scan-ir-max-length <length>

give up scanning IRs longer than LENGTH bits (default: 128)

--scan-dr-max-length <length>

give up scanning DRs longer than LENGTH bits (default: 1024)

--ir-lengths <ir-length,...>

set IR lengths of each TAP to corresponding IR-LENGTH (default: autodetect)

--tap-index <index>

select TAP #INDEX for communication (default: select only TAP)

glasgow run debug-mips dump-state

usage: glasgow run debug-mips dump-state [-h]
-h, --help

show this help message and exit

glasgow run debug-mips gdb

usage: glasgow run debug-mips gdb [-h] [GDB-ENDPOINT]
gdb-endpoint

listen at GDB-ENDPOINT, either unix:PATH or tcp:HOST:PORT (default: tcp::1234)

-h, --help

show this help message and exit