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

3.3.  GNU Debugger Version 6.8

3.3.1. Generating the GDB Source Code
3.3.2. Configuring GDB
3.3.3. Building and Installing GDB

GDB is not essential to getting a working Linux environment for OpenRISC, so this step may be omitted initially.

This section documents release 2.0 of the GDB version 6.8 for the OpenRISC 1000. This implements the GDB Remote Serial Protocol (RSP) for OpenRISC 1000, thereby enabling the GDB target remote and target extended-remote commands.

[Important]Important

This is now the recommended protocol for connecting GDB to OpenRISC 1000 targets.

Previously, the OpenRISC 1000 port of GDB only worked through the JTAG port of the processor, which had to incorporate a working debug unit. The connection to the target could either be through the parallel port to physical hardware connected via a JP1 header, or via TCP/IP to a remote target. Communication to the remote target was via the proprietary OpenRISC 1000 Remote JTAG Protocol.

[Important]Important

The OpenRISC 1000 Remote JTAG Protocol is still supported for backward compatibility, but now deprecated. All remote connection should be through the GDB Remote Serial Protocol.

A remote target should implement the server side of either or both of the GDB Remote Serial Protocol and the OpenRISC 1000 Remote JTAG Protocol. The target may be the Or1ksim architectural simulator or a driver for physical hardware, such as the USB JTAG connector made by ORSoC AB.

There are two variants of the Debug Unit for the OpenRISC 1000, with slightly different JTAG interfaces.

  1. The original JTAG interface was created as part of the OpenRISC SoC project, ORPSoC [4]. It provides three scan chains: one to access all the Special Purpose Registers, one to access external memory and one providing control of the CPU. The control scan chain can reset, stall or trace the processor.

  2. A new JTAG interface was provided by Igor Mohor in 2004 [5]. It provides the same access to Special Purpose Registers and external memory, but offers a simpler control interface offering only the ability to stall or reset the processor.

When connecting via the GDB Remote Serial Protocol, the version of JTAG implemented does not matter—the RSP server will resolve the issue automatically. However for direct connection, or remote connection via the OpenRISC 1000 Remote JTAG Protocol, the type of JTAG interface must be specified.

A detailed description of the OpenRISC 1000 port of GDB is provided in the GDB "howto" from Embecosm [2]. An explanation of the RSP server implementation is provided in the RSP "howto" from Embecosm [3].

This version of GDB has been tested with version 0.3.0 release candidate 2 of Or1ksim as described in Section 3.7. This implements the original ORPSoC version of the Debug Unit. The OpenRISC 1000 port of GDB is designed to support either interface, controlled by GDB commands described in the User Guide.

[Note]Note

To date there has been limited testing of GDB 6.8 with real hardware. User feedback on experience with real hardware is welcomed.

Embecosm divider strip