From 8b67c9135cb78abc394d43e449ccc6387c73f014 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sun, 20 May 2018 08:32:42 +1200 Subject: user: Add RTEMS executable and test documentation. --- user/testing/configuration.rst | 312 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 312 insertions(+) create mode 100644 user/testing/configuration.rst (limited to 'user/testing/configuration.rst') diff --git a/user/testing/configuration.rst b/user/testing/configuration.rst new file mode 100644 index 0000000..a58b373 --- /dev/null +++ b/user/testing/configuration.rst @@ -0,0 +1,312 @@ +.. comment SPDX-License-Identifier: CC-BY-SA-4.0 + +.. comment: Copyright (c) 2018 Chris Johns +.. comment: All rights reserved. + +Tester Configuration +-------------------- + +The RTEMS Tester and RTEMS Run are controlled by configuration data and +scripts. The user specifies a BSP on the command line using the ``--rtems-bsp`` +option as well as optionally specifying a user configuration file using +``--user-config``. + +The Figure :ref:`fig-tester-config-1` shows the various sources of +configuration data and their format. The ``ini`` files are the standard INI +format, the ``mc`` are the internal RTEMS Toolkit's Macro format, and ``cfg`` +is the RTEMS Toolkit's Configuration script format, the same format used by the +RTEMS Source Builder. + +.. _fig-tester-config-1: + +.. figure:: ../../images/user/test-cfg-1.png + :width: 50% + :alt: RTEMS Tester and Run Configuration Files + :figclass: align-center + + RTEMS Tester and Run Configuration Files + +Configuration data is held in a macro database keyed on the macro name. Macros +can be expanded in configuration scripts using the syntax ``%{name}``. The +macro database is layered using maps. The defaults and values created when a +configure script runs live the in the ``global`` map. Values read from the BSP +and User INI configuration files are loaded into maps based on the BSP +name. This lets a single User configuration file contain specialized +configuration values for a number of BSPs and the tester and run commands +select the values based on the selected BSP. Macros are expanded using the BSP +map first giving those values the highest priority. User defined values are +loaded after the BSP configuration values overwriting them letting a user +speckles a BSP's default configuration for their local needs. + +Figure :ref:`fig-tester-config-2` shows the configuration loading and script +execution order. + +.. _fig-tester-config-2: + +.. figure:: ../../images/user/test-cfg-2.png + :width: 50% + :alt: RTEMS Tester and Run Configuration Load and Execute Sequence + :figclass: align-center + + RTEMS Tester and Run Configuration Load and Execute Sequence + +Defaults +^^^^^^^^ + +The RTEMS Tester and RTEMS Run are primed using defaults from the file +``rtems/testing/testing.mc``. All default settings can be overridden in a BSP or +User configuration file. + +.. index:: BSP configuration, User configuration +BSP and User Configuration +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The BSP and User configuration files are INI format files. The BSP +configuration file has to have an INI section that is the name of the BSP +passed on the command line. The section has the following mandatory values: + +.. index:: bsp +``bsp`` + The name of the BSP. The BSP name is used to create a macro map to hold the + BSP's configuration data. Typically this is the same as the BSP name used on + the command line. + +.. index:: arch +``arch`` + The name of the BSP architecture. This is need for the GDB configuration + scripts where the architecture specific GDB needs to run. It is mandatory so + the *arch/bsp* standard RTEMS BSP string can be used. + +.. index:: tester +``tester`` + The tester or run configuration script. This is the name of the configuration + script the RTEMS Tester or RTEMS Run executes as a back end. The ``tester`` + value is typically of the form ``%{_rtscripts}/