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

4.3.  OpenRISC 1000 JTAG Remote Target Specification

4.3.1. Creating struct target_ops for OpenRISC 1000
4.3.2. OpenRISC 1000 Target Functions and Variables Providing Information
4.3.3. OpenRISC 1000 Target Functions Controlling the Connection
4.3.4. OpenRISC 1000 Target Functions to Access Memory and Registers
4.3.5. OpenRISC 1000 Target Functions to Handle Breakpoints and Watchpoints
4.3.6. OpenRISC 1000 Target Functions to Control Execution
4.3.7. OpenRISC 1000 Target Functions to Execute Commands
4.3.8. The Low Level JTAG Interface

The code for the remote target specification for the OpenRISC Remote JTAG protocol is found in the gdb sub-directory. remote-or1k.c contains the target definition. The low-level interface is found in or1k-jtag.c with a shared header in or1k-jtagh.

The low-level interface is abstracted to a set of OpenRISC 1000 specific functions relating to the behavior of the target. Two implementations are provided (in or1k-jtag.c), one for targets connected directly through the host's parallel port, and one for targets connected over TCP/IP using the OpenRISC 1000 Remote JTAG Protocol.

void      or1k_jtag_init (char *args);
void      or1k_jtag_close ();
ULONGEST  or1k_jtag_read_spr (unsigned int  sprnum);
void      or1k_jtag_write_spr (unsigned int  sprnum,
                               ULONGEST      data);
int       or1k_jtag_read_mem (CORE_ADDR  addr,
                              gdb_byte  *bdata,
                              int        len);
int       or1k_jtag_write_mem (CORE_ADDR       addr,
                               const gdb_byte *bdata,
                               int             len);
void      or1k_jtag_stall ();
void      or1k_jtag_unstall ();
void      or1k_jtag_wait (int  fast);

The choice of which implementation to use is determined by the argument to or1k_jtag_init.

The binaries for the remote target interface (remote-or1k.o and or1k-jtag.o) are added to the configure.tgt file for the OpenRISC targets. As noted in Section 4.2, this only specifies binaries, so dependencies on headers cannot be captured. To do this requires editing the


As a shortcut for a simple port, editing can be omitted. Instead, touch the target specific C source files before calling make to ensure they are rebuilt.

Embecosm divider strip