Introduction
PEmicro's GDB Server, pegdbserver_console, connects the GNU Debugger (GDB) to embedded target devices through PEmicro debug hardware. It is the component that allows Eclipse-based IDEs such as NXP's MCUXpresso IDE and S32 Design Studio, as well as stand-alone GDB clients, to debug and program devices using a PEmicro Multilink, Cyclone, TraceLink, or OpenSDA interface.
What Is A GDB Server?
GDB itself runs on the host PC and understands the application being debugged: its symbols, source files, breakpoints, and expressions. GDB does not, however, know how to talk to a particular debug probe or silicon vendor's debug interface. To bridge that gap, GDB defines the GDB Remote Serial Protocol: a simple packet protocol, normally carried over a TCP/IP connection, through which a GDB server (sometimes called a GDB stub) carries out low-level operations on GDB's behalf.
PEmicro's GDB Server implements the target side of this protocol. When a debug session starts:
- The GDB server is launched (by the IDE or by the user) and connects to the target device through PEmicro debug hardware.
- The server begins listening on a TCP/IP port (7224 by default).
- The GDB client connects to that port and issues remote protocol requests: read/write memory, read/write registers, set breakpoints, run, step, halt, and load (flash) the application.
- The server translates each request into the appropriate debug-interface operations (SWD, JTAG, etc.) on the target processor and returns the results.
+------------+ GDB Remote Protocol +--------------------+ USB/Ethernet +-------------+ SWD/JTAG +--------+
| GDB client | <----- TCP/IP -------> | pegdbserver_console| <--------------> | PEmicro | <---------> | Target |
| (IDE) | | (GDB server) | | probe | | device |
+------------+ +--------------------+ +-------------+ +--------+
Because the interface between client and server is a standard protocol, the PEmicro GDB Server works with any IDE or tool that can drive a GDB client, including Eclipse-based IDEs, Visual Studio Code, and plain command-line GDB.
Supported Hardware Interfaces
The GDB Server supports the full line of PEmicro debug hardware:
- Multilink and Multilink FX debug probes (USB)
- Cyclone and Cyclone FX programmers (USB, Ethernet, or serial)
- TraceLink trace and debug interface (USB or Ethernet)
- OpenSDA / embedded OpenSDA circuits found on many evaluation boards
The Cyclone and Multilink FX interfaces can additionally supply power to the target through software-controlled relays; see the power control parameters in the Command-Line Parameters chapter.
Supported Architectures
PEmicro provides GDB server builds for:
- Arm Cortex devices - distributed in the
com.pemicro.debug.gdbjtag.pneEclipse plugin - NXP Power Architecture (MPC5xxx / Qorivva) devices - distributed in the
com.pemicro.debug.gdbjtag.ppcEclipse plugin
Both builds share the same executable name, command-line parameter set, and monitor commands; a small number of parameters only apply to one architecture (for example, SWD selection on Arm).
How This Manual Is Organized
- Getting Started describes how to obtain and launch the GDB server, and how to connect a GDB client to it.
- Command-Line Parameters documents every launch parameter, grouped by functionality.
- Monitor Commands documents the commands which can be issued to the server from within a running debug session.
- Troubleshooting lists common problems and their solutions.