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

2.4.  Application Layer: Remote Serial Protocol

RSP commands from the client to the server are textual strings, optionally followed by arguments. Each command is sent in its own packet. The packets fall into four groups:

  1. Packets requiring no acknowledgment. These commands are: f, i, I, k, R, t and vFlashDone.

  2. Packets requiring a simple acknowledgment packet. The acknowledgment is either OK, Enn (where nn is an error number) or for some commands an empty packet (meaning "unsupported"). These commands are: !, A, D, G, H, M, P, Qxxxx, T, vFlashErase, vFlashWrite, X, z and Z.

  3. Packets that return result data or an error code.. These commands are: ?, c, C, g, m, p, qxxxx, s, S and most vxxxx.

  4. Deprecated packets which should no longer be used. These commands are b, B, d and r.

This application note does not document all these commands, except where clarification is needed, since thy are all documented in Appendix D of the main GDB user guide ([3]).

[Tip]Tip

Many commands come in pairs: for example g and G. In general the lower case is used for the command to read or delete data, or the command in its simpler form. The upper case is used to write or install data, or for a more complex form of the command.

The RSP was developed over several years, and represents an evolved standard, but one which had to keep backward compatibility. As a consequence the detailed syntax can be inconsistent. For example most commands are separated from their arguments by ':', but some use ',' for this purpose.

Embecosm divider strip