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

4.2.  OpenRISC 1000 Architecture Specification

4.2.1. Creating struct gdbarch
4.2.2. OpenRISC 1000 Hardware Data Representation
4.2.3. Information Functions for the OpenRISC 1000 Architecture
4.2.4. OpenRISC 1000 Register Architecture
4.2.5. OpenRISC 1000 Frame Handling

The code resides in the gdb sub-directory. The main architectural specification is in or1k-tdep.c, with and OpenRISC 1000 wide header in or1k-tdep.h. Support for the OpenRISC 1000 Remote JTAG interface is in remote-or1k.c with the detailed protocol in or1k-jtag.c and a protocol header in or1k-jtag.h.

There are several targets which can use the OpenRISC 1000 architecture. These all begin or16, or32 or or32. The configure.tgt is edited to add patterns for these that will pick up the binaries generated from these source files.

or16* | or32* | or64*)
        # Target: OpenCores OpenRISC 1000 architecture
        gdb_target_obs="or1k-tdep.o remote-or1k.o or1k-jtag.o"

configure.tgt only specifies binaries, so cannot show dependencies on headers. To correct this, can be edited, so that automake and configure will generate a Makefile with the correct dependencies.

The architecture definition is created from the _initialize_or1k_tdep by a call to gdbarch_register. That function also initializes the disassembler (build_automata) and adds two new commands: a sub-command to the info command to read SPRs and a new top level support command, spr to set the value of SPRs.

Embecosm divider strip