NOEL-ARTYA7-EX-QSG
December 2020, Version 1.2
8
www.cobhamaes.com/gaisler
4. GRMON hardware debugger
4.1. Overview
GRMON is a debug monitor used to develop and debug GRLIB systems with NOEL and LEON processors. The
target system, including the processor and peripherals, is accessed on the AHB bus through a debug-link connected
to the host computer. GRMON has GDB support which makes C/C++ level debugging possible by connecting
GDB to the GRMON's GDB socket.
With GRMON one can for example:
• Inspect NOEL-V and peripheral registers
• Upload applications to RAM with the load command.
• Program the FLASH with the flash command.
• Control execution flow by starting applications (run), continue execution (cont), single-stepping (step), in-
serting breakpoints/watchpoints (bp) etc.
• Inspect the current CPU state listing the back-trace, instruction trace and disassemble machine code.
The first step is to set up a debug link in order to connect to the board. The following section outlines which
debug interfaces are available and how to use them on the NOEL-ARTYA7-EX design. After that, a basic first
inspection of the board is exemplified.
GRMON is described on the homepage [https://www.gaisler.com/index.php/products/debug-tools] and in detail
in the GRMON User Manual [RD-2].
4.2. NOEL-V support
Most of the GRMON commands available for LEON are also available for NOEL-V. GRMON commands avail-
able for NOEL-V include:
• load: RISC-V ELF file support. Symbols are loaded from the ELF file and can be used instead of addresses
for most commands.
• run, cont, go, step: execution control
• mem, wmem: read/write any on-chip address.
• disassemble: RISC-V instruction disassembly
• inst: CPU instruction trace
• bp: Hardware and software breakpoint
• bt: call tree backtrace, based on dwarf debug information
• reg: read and write all RISC-V CPU general purpose registers and CSR registers. CSR registers can be
specified by name or address.
• mmu: inspect and walk MMU tables
• forward: UART forwarding to the GRMON console
• info reg, info sys: Supports the NOEL-V related GRLIB devices.
• gdb: Creates a GDB server for connecting with a GDB compiled with RISC-V as target.
4.3. NOEL-V limitations
• GRMON can report only the following reasons for termination of execution:
• An
ebreak
instruction was executed.
• The signal
haltreq
was asserted by the debug module. Typically as a consequence of the user hitting
ctrl+c
in the GRMON terminal.
In the current NOEL-V release, execution can not be aborted at an arbitrary exception or hardware breakpoint.
• CPU local AHB trace is not available. The NOEL-ARTYA7-EX design includes an AHBTRACE which can
be controlled with the GRMON command at.
The limitations listed above are present in the current release of NOEL-V. The features mentioned are part of the
schedule for future releases.