[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are two ways to connect to an OpenRISC 1000 target with GDB.
target jtag
.
target remote
or target extended-remote
.
target jtag
.
Note: This connection mechanism is deprecated. It remains for backward compatibility only.
Caution: If used with version 0.2.0 of the architectural simulator, Or1ksim, GDB version 6.8 requires a patch to be applied to the architectural simulator. This should be available on the OpenCores website, or contact the author directly. Only the legacy OpenRISC 1000 Remote JTAG Protocol interface is available for this version of the architectural simualtor.
The user is strongly recommended to use Or1ksim 0.3.0 or later, since this interfaces directly to GDB using the Remote Serial Protocol.
1.1 Direct connection via a JTAG JP1 Interface | Direct connection via a JTAG JP1 interface | |
1.2 Connection via the GDB Remote Serial Protocol | Connection via the GDB Remote Serial Protocol Interface | |
1.3 Connection via the OpenRISC 1000 Remote JTAG Interface |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In this case the the device to which the JP1 header is connected must be
specifed to the target jtag
command. Typically that will be the
parallel printer port, so the command would be:
|
Caution: The current author is not aware of anyone using the JP1 interface. As a result this code has not been tested in the port to GDB version 6.8. Modern hardware connections are usually via interfaces such as USB, for which the OpenRISC Remote Interface can be used (see section Remote JTAG Connection).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The usual mode of operation is through the GDB Remote Serial Protocol (RSP). This communicates to the target through a TCP/IP socket. The target must then implement the server side of the interface to drive either physical hardware (for example through a USB/JTAG connector) or a simulation of the hardware (such as the OpenRISC Architectural Simulator).
Although referred to as a remote interface, the target may actually be on the same machine, just running in a separate process, with its own terminal window.
For example, to connect to the OpenRISC 1000 Architectural simulator, which is running on machine “thomas” and has been configured to talk to GDB on port 51000, the following command would be used:
|
The target machine is specified as the machine name and port number. If the architectural simulator was running on the same machine, its name may be omitted, thus:
|
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Historically, GDB communicated with remote OpenRISC 1000 targets using a customer protocol, the OpenRISC 1000 Remote JTAG Interface.
This protocol is maintained for backwards compatibility, but is now deprecated. It communicates to the target through a TCP/IP socket. The target must then implement the client side of the interface to drive either physical hardware (for example through a USB/JTAG connector) or a simulation of the hardware (such as the OpenRISC Architectural Simulator).
Although referred to as the remote interface, the target may actually be on the same machine, just running in a separate process, with its own terminal window.
For example, to connect to the OpenRISC 1000 Architectural simulator, which is running on machine “thomas” and has been configured to talk to GDB on port 50000, I could use the command:
|
The target machine is specified after the jtag:// and separated from the target port by a colon. If the architectural simulator was running on the same machine, just locahost would suffice as the machine name, thus:
|
Unfortunately there are now two different flavours of the JTAG interface used with OpenRISC 1000. The original version was created for use with the OpenRISC 1000 System-on-Chip, ORPSoC. A new (smaller and simpler) JTAG interface was developed by Igor Mohor in 2004, which is used on some designs.
The default behavior of GDB is to use the original ORPSoC version of the interface for backwards compatibility. GDB can use the Igor Mohor version by specifying for example:
|
This interface is only available with remote connections using the legacy OpenRISC 1000 Remote JTAG Protocol (deprecated). The direct JP1 interface can support only the ORPSoC version of JTAG.
The recommended approach is to use the GDB Remote Serial Protocol which interfaces directly to the simulator, and is independent of the JTAG implementation used.
For completeness
|
is provided as a synonym for:
|
By default, establishing a connection does not reset the target. This
allows debugging to resume a partially complete program on connection. If a
reset is required, the keyworkd RESET
(case insensitive) may be
added at the end of the target
command. For example:
|
Warning: The OpenRISC remote JTAG interface is not particularly robust. In particular dropping and reconnecting sessions does not seem to work well. This was a key factor in its replacement by the generic GDB Remote Serial Interface.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Jeremy Bennett on November, 12 2008 using texi2html 1.78.