Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
22
of
174
The toolchain (see chapter 3.3) provides RTEMS development tools with the or1k-aac-
rtems4.11-* prefix, and the BSP provides drivers with the *_rtems.h postfix for use with
RTEMS. The BSP also provides RTEMS application code examples in the
src/example/
directory.
The RTEMS drivers are documented in chapter 5 in this manual.
Bare-metal (or1k-aac-elf-*) toolchain development tools and bare-metal drivers in the BSP
are also provided, but these are currently not supported for general application
development, and documentation for these drivers is not included in this manual.
4.1. RTEMS step-by-step compilation
The BSP is supplied with an application example of how to write an application for RTEMS
and engage all the available drivers.
Please note that the toolchain described in chapter 3.3 needs to have been installed and the
BSP unpacked as described in chapter 3.4.
The following instructions detail how to build the RTEMS environment and a test application
1.
Enter the BSP
src
directory
cd path/to/bsp/aac-or1k-xxx-x-bsp/src/
2.
Type make to build the RTEMS target
make
3. Once the build is complete, the build target directory is
librtems
4. Set the RTEMS_MAKEFILE_PATH environment variable to point to the librtems
directory
export RTEMS_MAKEFILE_PATH=path/to/librtems/or1k-aac-
rtems4.11/or1k-aac
5.
Enter the
example
directory and build the test application by issuing
cd example
make
Load the resulting application using the debugger according to the instructions in chapter
3.5.
4.1.1. Compiling the BSP with debug output removed
During development, debug output from the RTEMS drivers can be very useful for detecting
errors. During flight, debug output is unlikely to be useful (it is expected that the debug
UART will be disconnected) and may decrease performance in case of large amounts of
warnings/errors.