NOEL-ARTYA7-EX-QSG
December 2020, Version 1.2
15
www.cobhamaes.com/gaisler
grmon3> reg
a0: 0000000040023128 t0: 7F7F7F7FFFFFFFFF s0: 0000000040021A48
a1: 0000000000000000 t1: 0000000040000118 s1: 0000000000000000
a2: 000000004001ECC8 t2: FFFFFFFFFFFFFFFF s2: 0000000000000000
a3: 000000000A010001 t3: 0000000000000000 s3: 0000000000000000
a4: 0000000000000000 t4: 0000000000000002 s4: 0000000000000000
a5: 0000000040007684 t5: 00000000000021ED s5: 0000000000000000
a6: 0000000021DAE500 t6: FFFFFFFFFFFFFFF0 s6: 0000000000000000
a7: 0000000021DAE500 s7: 0000000000000000
tp: 0000000000000000 s8: 0000000000000000
sp: 0000000000029D70 gp: 0000000000020800 s9: 0000000000000000
s10: 0000000000000000
mstatus: 0000000A00000008 mip: 000 mie: 800 s11: 0000000000000000
ra: 000000000000705C <_Thread_0x50>
pc: 000000000000011A sd s0, 0(sp) <Init+0x2>
grmon3> cont
hello, world
Forced into debug mode
0x0000c2ba: 9002 ebreak <_CPU_Fat36>
grmon3>
Alternatively you can run GRMON with the
-gdb
command line option and then attach a GDB session to it.
5.6. RISC-V and NOEL-V integration with RTEMS
5.6.1. CSRs
RTEMS RISC-V executes in machine privilege mode only. The following is the set of CSRs which are accessed
by the kernel:
•
mcause
•
mepc
•
mie
•
mstatus
•
mtvec
5.6.2. Clock tick
mtime
is used for the RTEMS kernel clock service. It relies on the core local interrupt controller (
clint
).
Note that an RTEMS application can chose to not use the kernel clock service, in which case the the
mtime
interrupt will not be enabled.
5.6.3. Exceptions
The only RISC-V exceptions handled by RTEMS is the
mtime
interrupt exception and external interrupts. All
other exceptions (interrupt and non-interrupt) will result in a kernel fatal. The fatal handler will print the current
processor state and then terminate execution.
Terminating execution is performed on NOEL-V by executing a
ebreak
.
5.6.4. NOEL-V BSP variants
The NOEL-V RTEMS BSP variants are similar to the RTEMS mainline BSP variants for RISC-V (
rv64imac
,
etc) available in the kernel source tree directory
bsps/riscv/riscv/config
.
The full list of BSP variants provided with the tool chain is:
•
noel32i
•
noel32im
•
noel32imafd
•
noel32imafd_smp