The gdb server protocol is used in a debug setup between gdb and the gdbserver. The gdbserver is the driver/software interface of the JATG/SWD probe. This allows the user to use an(optional) IDE with gdb to debug firmware running on a MCU.
+------------------+
| User |
+------------------+
|
+------------------+
| IDE |
+------------------+
|
+------------------+
| gdb |
+------------------+
|
| <-- gdb server protocol is used here
|
+------------------+
| gdb server |
+------------------+
|
+------------------+
| JTAG / SWD probe |
+------------------+
|
+------------------+
| MCU |
+------------------+
The remote protocol is specified in Appendix E of the gdb documentation. Wherever appropriate large parts of that documentation have been copied here.
The protocol is used over a serial byte data stream. Examples are a serial port (UART/COM Port) or a TCP port. The data is exchanged over this channel in packets. In this communication the gdb sends commands and the gdb server sends replies.
In the documentation format strings everything [inside of square brackets] is optional and can be missing.
| Word / Abbreviation | Explanation |
|---|---|
| IDE | Integrated Development environment |
| MCU | Micro Controller Unit |
| addressable memory units | TODO |