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

2.5.3.  Implementing Server Code for Simulators

Simulators are commonly integrated separately into GDB, and accessed using the target sim command.

However it can also be useful to connect to them by using the RSP. This allows the GDB experience to be identical whether simulator or real silicon is used.

The general approach is the same as that for implementing code on a target (see Section 2.5.2). However the code forms part of the simulator, not the target. The RSP handler will be attached to the simulators handling of events, rather than the events themselves.

In general the simulator will use the same form of connection as when debugging real silicon. Where the RSP server for real silicon is implemented on the target, or gdbserver is used, connection via a serial device, TCP/IP or UDP/IP is appropriate. Where the RSP interface for real silicon is via a pipe to a program driving JTAG a pipe interface should be used to launch the simulator.

The example used in Chapter 4 is based on a simulator for the OpenRISC 1000.

Embecosm divider strip