Services - tools - models - for embedded software development
Embecosm divider strip
Prev  Next

Chapter 2.  Overview of the Remote Serial Protocol

2.1. Client-Server Relationship
2.2. Session Layer: The Serial Connection
2.3. Presentation Layer: Packet Transfer
2.3.1. Packet Acknowledgment
2.3.2. Interrupt
2.4. Application Layer: Remote Serial Protocol
2.5. Putting it All Together to Build a Server
2.5.1. Using gdbserver
2.5.2. Implementing Server Code on the Target
2.5.3. Implementing Server Code for Simulators
2.5.4. Implementing a Custom Server for JTAG

The GDB Remote Serial Protocol (RSP) provides a high level protocol allowing GDB to connect to any target remotely. If a target's architecture is defined in GDB and the target implements the server side of the RSP protocol, then the debugger will be able to connect remotely to that target.

The protocol supports a wide range of connection types: direct serial devices, UDP/IP, TCP/IP and POSIX pipes. Historically RSP has only required 7-bit clean connections. However more recent commands added to the protocol assume an 8-bit clean connection. It is also worth noting, that although UDP/IP is supported, lost packets with unreliable transport methods such as this may lead to GDB reporting errors.

RSP is most commonly of value in embedded environments, where it is not possible to run GDB natively on the target.

The protocol is layered, approximately following the OSI model as shown in Figure 2.1.

OSI Layers in the Remote Serial Protocol

Figure 2.1.  OSI Layers in the Remote Serial Protocol


Embecosm divider strip