NOEL-ARTYA7-EX-QSG
December 2020, Version 1.2
17
www.cobhamaes.com/gaisler
5.7.2.1. Details
The following describes how to manually prepare GRMON and the processor for executing an RTEMS applica-
tion. It replicates the steps taken by the run command after it has been patched.
• The below procedure may change or may not be needed in future versions of GRMON or the RTEMS BSP.
1.
Use the device tree compiler (dtc) to generate a device tree blob (
.dtb
) from a device tree source file ().
$ dtc board.dts > board.dtb
2.
Tell GRMON about the the device tree blob
.dtb
file with the dtb command.
grmon3> dtb the.dtb
3.
Load the application ELF file.
grmon3> load hello.exe
4.
Start execution with the GRMON command run.
grmon3> run
5.8. Compiler options
The build examples above use Makefile fragments available in the tool chain installation directory and is provided
by the RTEMS kernel. An overview of this is given in the text file
rtems-noel-1.0.4/kernel/share/
rtems5/make/README
.
All GCC compiler options are described in the GCC User's Manual. Some of the commonly used options are
repeated below:
Table 5.1. Common GCC options for rtems-noel
-g
generate debugging information - must be used for debugging with GDB
-msoft-float
emulate floating-point - must be used if no FPU exists in the system
-march=rv64ima
generate code with mul/div and atomic instructions
-O2
or
-O3
optimize code maximum performance and minimal code size
5.9. Building the kernel
The source code for the RTEMS NOEL-V BSPs is available in the archive named
rtems-noel-1.0.4-
src.tar.bz2
.
To build the kernel, first extract the NOEL-V RTEMS kernel source archive, and then use the following commands:
Example 5.3.
export THE_KERNPREFIX=/opt/my-rtems-noel
cd <kernel-source-dir>
./bootstrap
mkdir -p build
cd build
../configure \
--prefix=$THE_KERNPREFIX \
--target=riscv-rtems5 \
--enable-smp \
--enable-tests \
--enable-posix=yes \
--enable-rtemsbsp="noel32imafd_smp noel64imafd_smp"
make -j 4
make install
5.9.1. RTEMS test suite
Giving the kernel configure option
--enable-tests
will build the RTEMS kernel test suite, consisting of over
600 tests, together with the kernel. Most tests run correctly on NOEL-V. Cobham Gaisler is currently analyzing