summaryrefslogtreecommitdiffstats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/bld/index.rst26
-rw-r--r--user/bsps/aarch64/raspberrypi4.rst109
-rw-r--r--user/bsps/aarch64/xilinx-zynqmp.rst48
-rw-r--r--user/bsps/arm/imxrt.rst2
-rw-r--r--user/bsps/arm/stm32h7.rst2
-rw-r--r--user/bsps/bsps-aarch64.rst1
-rw-r--r--user/bsps/bsps-riscv.rst204
-rw-r--r--user/bsps/bsps-sparc.rst74
-rw-r--r--user/deployment/index.rst426
-rw-r--r--user/hosts/posix.rst15
-rw-r--r--user/hosts/windows.rst3
-rw-r--r--user/index.rst3
-rw-r--r--user/installation/kernel.rst308
-rw-r--r--user/tracing/eventrecording.rst65
-rw-r--r--user/tracing/examples.rst4
15 files changed, 956 insertions, 334 deletions
diff --git a/user/bld/index.rst b/user/bld/index.rst
index 411b3a2..18092d2 100644
--- a/user/bld/index.rst
+++ b/user/bld/index.rst
@@ -54,7 +54,7 @@ Work Flow
There are five steps necessary to build and install one or more BSPs.
1. Select which BSPs you want to build. See also :ref:`BSPs` and
- ``./waf bsp_list``.
+ ``./waf bsplist``.
2. Write a BSP build configuration file (e.g. ``config.ini``) which determines
which BSPs are built and how they are configured.
@@ -93,7 +93,7 @@ Use ``./waf --help`` to get a list of commands and options.
BSP List
--------
-The BSP list command ``./waf bsp_list`` loads the build specification items and
+The BSP list command ``./waf bsplist`` loads the build specification items and
generates a list of base BSPs from it. The list is sorted by architecture and
base BSP name. Which base BSPs are listed can be controlled by the
``--rtems-bsps`` command line option. It expects a comma-separated list of
@@ -103,7 +103,7 @@ items can be specified by the ``--rtems-specs`` command line option.
.. code-block:: none
- $ ./waf bsp_list --rtems-bsps=sparc/
+ $ ./waf bsplist --rtems-bsps=sparc/
sparc/at697f
sparc/erc32
sparc/gr712rc
@@ -115,7 +115,7 @@ items can be specified by the ``--rtems-specs`` command line option.
.. code-block:: none
- $ ./waf bsp_list --rtems-bsps='/leon,/rv64imac$'
+ $ ./waf bsplist --rtems-bsps='/leon,/rv64imac$'
riscv/rv64imac
sparc/leon2
sparc/leon3
@@ -123,7 +123,7 @@ items can be specified by the ``--rtems-specs`` command line option.
BSP Defaults
------------
-The BSP defaults command ``./waf bsp_defaults`` loads the build specification
+The BSP defaults command ``./waf bspdefaults`` loads the build specification
items and generates a list options with default values for each base BSP from
it. The list is sorted by architecture and base BSP name. Which base BSPs are
listed can be controlled by the ``--rtems-bsps`` command line option. Default
@@ -134,12 +134,12 @@ option.
.. code-block:: none
- $ ./waf bsp_defaults --rtems-bsps=gr712rc --rtems-compiler=gcc | grep ABI_FLAGS
+ $ ./waf bspdefaults --rtems-bsps=gr712rc --rtems-compiler=gcc | grep ABI_FLAGS
ABI_FLAGS = -mcpu=leon3 -mfix-gr712rc
.. code-block:: none
- $ ./waf bsp_defaults --rtems-bsps=gr712rc --rtems-compiler=clang | grep ABI_FLAGS
+ $ ./waf bspdefaults --rtems-bsps=gr712rc --rtems-compiler=clang | grep ABI_FLAGS
ABI_FLAGS = -mcpu=gr712rc
Configure
@@ -186,7 +186,7 @@ name.
This one line configuration file is sufficient to build the base BSP
`sparc/erc32` with default values for all options. The base BSPs are determined
-by the build specification. The ``./waf bsp_list`` command lists all base BSPs.
+by the build specification. The ``./waf bsplist`` command lists all base BSPs.
You can create your own BSP names. However, in this case you have to inherit
from a base BSP. The inheritance works only within an architecture, e.g. a
`riscv` BSP cannot inherit options from an `arm` BSP.
@@ -222,12 +222,12 @@ option.
INHERIT = gr740
COMPILER = clang
-Use the ``./waf bsp_defaults`` command to get a list of all configuration
+Use the ``./waf bspdefaults`` command to get a list of all configuration
options with default values.
.. code-block:: none
- $ ./waf bsp_defaults --rtems-bsps=sparc/erc32
+ $ ./waf bspdefaults --rtems-bsps=sparc/erc32
[sparc/erc32]
# Flags passed to the library archiver
ARFLAGS = crD
@@ -246,7 +246,7 @@ options with default values.
INSTALL_LEGACY_MAKEFILES = True
It is not recommended to blindly add all the options obtained through the
-``./waf bsp_defaults`` command to custom configuration files. The specified
+``./waf bspdefaults`` command to custom configuration files. The specified
options should be kept at the necessary minimum to get the desired build.
Some projects may still want to specify all options in a configuration file to
@@ -255,9 +255,9 @@ the user and base BSP values with the ``diff`` command.
.. code-block:: none
- $ ./waf bsp_defaults --rtems-bsps=sparc/erc32 > config.ini
+ $ ./waf bspdefaults --rtems-bsps=sparc/erc32 > config.ini
$ sed -i 's/BUILD_TESTS = False/BUILD_TESTS = True/' config.ini
- $ ./waf bsp_defaults --rtems-bsps=sparc/erc32 | diff -u - config.ini
+ $ ./waf bspdefaults --rtems-bsps=sparc/erc32 | diff -u - config.ini
--- config.ini 2019-12-04 08:21:36.049335872 +0100
+++ - 2019-12-04 08:21:41.187432405 +0100
@@ -31,7 +31,7 @@
diff --git a/user/bsps/aarch64/raspberrypi4.rst b/user/bsps/aarch64/raspberrypi4.rst
new file mode 100644
index 0000000..efb09b6
--- /dev/null
+++ b/user/bsps/aarch64/raspberrypi4.rst
@@ -0,0 +1,109 @@
+.. SPDX-License-Identifier: CC-BY-SA-4.0
+
+.. Copyright (C) 2022 Mohd Noor Aman
+
+.. _BSP_aarch64_Raspberrypi_4:
+
+Raspberry Pi 4B
+===============
+
+The 'raspberrypi4b' BSP currently supports only the LP64 ABI. ILP32 is not
+supported. Raspberry pi 4B all variants and Raspberry Pi 400 are supported. The
+default bootloader which is used by the Raspbian OS or other OS can be used to
+boot RTEMS. SMP is currently not supported.
+
+Raspberry Pi 4B has 2 types of interrupt controller, GIC-400 (GICv2) and ARM
+legacy generic controller. Both are supported. By default, raspberrypi 4B uses
+ARM legacy generic controller. Set ``enable_gic=1`` in the ``config.txt`` file
+to enable GIC.
+
+Clock Driver
+------------
+
+The clock driver uses the `ARM Generic Timer`.
+
+Console Driver
+--------------
+
+Raspberry pi 4B has 2 types of UARTs, ARM PL011 and Mini-uart. The PL011 is a
+capable, broadly 16550-compatible UART, while the mini UART has a reduced
+feature set. The console driver supports the default Qemu emulated ARM PL011
+PrimeCell UART as well as the physical ARM PL011 PrimeCell UART in the
+raspberrypi hardware. Mini-uart is not supported.
+
+Preparing to boot
+------------------
+
+Raspberry Pi uses a different mechanism to boot when compared with any ARM SoC.
+First the GPU initializes, loads the bootloader (Raspberry pi firmware) and then
+looks for the kernel img. This whole process is done by the GPU (VideoCore IV)
+till the kernel is loaded. More information can be found on the `Raspberry pi
+documentation page
+<https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#boot-sequence>`_.
+By default the arm64 mode looks for the ``kernel8.img``. Any other kernel can be
+loaded by adding ``kernel=<img_name>`` to the ``config.txt`` file.
+
+The Firmware files are required in order to boot RTEMS. The latest firmware can
+be downloaded from the `Raspberry Pi Firmware Repository
+<https://github.com/raspberrypi/firmware/>`_. USB boot is supported. All the
+files (Firmwares and kernel) must be place in the FAT32 partition only. Add
+``arm_64bit=1`` in the ``config.txt`` file in order to boot the BSP in 64bit
+kernel mode.
+
+
+UART Setup
+^^^^^^^^^^
+
+Connect your serial device to the GPIO15 and GPIO14. Add the following to the
+``config.txt`` file in order to use the PL011 UART0 and thus disabling the
+default Mini-uart.
+
+.. code-block:: none
+
+ # if user wants to enable GIC, uncomment the next line
+ # enable_gic=1
+ arm_64bit=1
+ dtoverlay = disable-bt
+ enable_uart=1
+
+.. note::
+ The Raspberry Pi 4B and 400 have an additional four PL011 UARTs. They are not
+ supported.
+
+Generating kernel image
+^^^^^^^^^^^^^^^^^^^^^^^
+
+The following steps show how to run ``hello.exe`` on the BSP. Other executables
+can be processed in a similar way.
+
+To create the kernel image:
+
+.. code-block:: shell
+
+ $ aarch64-rtems@rtems-ver-major@-objcopy -Obinary hello.exe kernel8.img
+
+Copy the kernel image to the SD card.
+
+JTAG Setup
+----------
+
+The Raspberry Pi 4 doesn't have dedicated JTAG pins. Instead, you must configure
+the GPIO pins (GPIO22-GPIO27) to activate the JTAG functionality. The RPi 4
+documentation refers to this as Alt4 functions of those pins. Alt5 does exist
+too, which goes from GPIO4, 5, 6, 12 and 13. you can check this out from
+`pinout.xyz <https://pinout.xyz/pinout/jtag#>`_ or `eLinux
+<https://elinux.org/RPi_BCM2835_GPIOs>`_
+
+One more thing to note on JTAG with Raspberry pi 4B is that, by default, All the
+GPIO pins are pulled down, according to the `BCM2711 documentation
+<https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf>`_. This
+wasn't the case in the earlier models. So in order to let the data flow freely,
+we will have to disable them.
+
+.. code-block:: none
+
+ # Disable pull downs
+ gpio=22-27=np
+
+ # Enable jtag pins (i.e. GPIO22-GPIO27)
+ enable_jtag_gpio=1
diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst b/user/bsps/aarch64/xilinx-zynqmp.rst
index 2b28132..1fef7a4 100644
--- a/user/bsps/aarch64/xilinx-zynqmp.rst
+++ b/user/bsps/aarch64/xilinx-zynqmp.rst
@@ -6,19 +6,39 @@
.. _BSP_aarch64_qemu_xilinx_zynqmp_lp64_qemu:
.. _BSP_aarch64_qemu_xilinx_zynqmp_ilp32_zu3eg:
.. _BSP_aarch64_qemu_xilinx_zynqmp_lp64_zu3eg:
+.. _BSP_aarch64_qemu_xilinx_zynqmp_lp64_cfc400x:
Qemu Xilinx ZynqMP
==================
-This BSP supports four variants: `xilinx-zynqmp-ilp32-qemu`,
-`xilinx-zynqmp-lp64-qemu`, `xilinx-zynqmp-ilp32-zu3eg`, and
-`xilinx-zynqmp-lp64-zu3eg`. Platform-specific hardware initialization is
-performed by ARM Trusted Firmware (ATF). Other basic hardware initialization is
-performed by the BSP. These BSPs support the GICv2 interrupt controller present
-in all ZynqMP systems. The zu3eg BSPs have also been tested to be fully
-functional on zu2cg boards and should also work on any other ZynqMP chip variant
-since the Processing Subsystem (PS) does not vary among chip variants other than
-the number of CPU cores available.
+This BSP family supports the following variants:
+
+* `xilinx-zynqmp-ilp32-qemu`
+
+* `xilinx-zynqmp-lp64-qemu`
+
+* `xilinx-zynqmp-ilp32-zu3eg`
+
+* `xilinx-zynqmp-lp64-zu3eg`
+
+* `xilinx-zynqmp-lp64-cfc400x`
+
+Platform-specific hardware initialization is performed by ARM Trusted Firmware
+(ATF). Other basic hardware initialization is performed by the BSP. These BSPs
+support the GICv2 interrupt controller present in all ZynqMP systems. The zu3eg
+BSPs have also been tested to be fully functional on zu2cg boards and should
+also work on any other ZynqMP chip variant since the Processing Subsystem (PS)
+does not vary among chip variants other than the number of CPU cores available.
+
+This BSP family has been tested on the following hardware:
+
+* `Avnet UltraZed-EG SOM`
+
+* `Innoflight CFC-400X`
+
+* `Trenz TE0802`
+
+* `Xilinx ZCU102`
Boot on QEMU
------------
@@ -33,6 +53,14 @@ will drop to EL1 for execution. For quick turnaround during testing, it is
recommended to use the u-boot BOOT.bin that comes with the PetaLinux prebuilts
for the board in question.
+Some systems such as the CFC-400X may require a bitstream to be loaded into the
+FPGA portion of the chip to operate as expected. This bitstream must be loaded
+before RTEMS begins operation since accesses to programmable logic (PL) memory
+space can cause the CPU to hang if the FPGA is not initialized. This can be
+performed as part of BOOT.bin or by a bootloader such as u-boot. Loading
+bitstreams from RTEMS has not been tested on the ZynqMP platform and requires
+additional libraries from Xilinx.
+
Hardware Boot Image Generation
------------------------------
@@ -242,7 +270,7 @@ Network Configuration
When used with LibBSD, these BSP variants support networking via the four
Cadence GEM instances present on all ZynqMP hardware variants. All interfaces
are enabled by default, but only interfaces with operational MII busses will be
-recognized and usable in RTEMS. Most ZynqMP dev boards use CGEM3.
+recognized and usable in RTEMS. Most ZynqMP dev boards use RGMII with CGEM3.
When used with lwIP from the rtems-lwip integration repository, these BSP
variants support networking via CGEM0 and one of the other CGEM* instances
diff --git a/user/bsps/arm/imxrt.rst b/user/bsps/arm/imxrt.rst
index e185823..b4f37fd 100644
--- a/user/bsps/arm/imxrt.rst
+++ b/user/bsps/arm/imxrt.rst
@@ -20,7 +20,7 @@ Build Configuration Options
Please see the documentation of the `IMXRT_*` and `BSP_*` configuration options
for that. You can generate a default set of options with::
- ./waf bsp_defaults --rtems-bsps=arm/imxrt1052 > config.ini
+ ./waf bspdefaults --rtems-bsps=arm/imxrt1052 > config.ini
Boot Process
------------
diff --git a/user/bsps/arm/stm32h7.rst b/user/bsps/arm/stm32h7.rst
index ec7440f..9f1f082 100644
--- a/user/bsps/arm/stm32h7.rst
+++ b/user/bsps/arm/stm32h7.rst
@@ -332,7 +332,7 @@ Generate default configuration for the board:
.. code-block:: shell
- $ ./waf bsp_defaults --rtems-bsps=arm/stm32h747i-disco > stm32h747i-disco.ini
+ $ ./waf bspdefaults --rtems-bsps=arm/stm32h747i-disco > stm32h747i-disco.ini
Regenerate build specification cache (needs a couple of seconds)...
To run basic hello world or ticker samples you do not need to modify
diff --git a/user/bsps/bsps-aarch64.rst b/user/bsps/bsps-aarch64.rst
index 933370f..f3aa15c 100644
--- a/user/bsps/bsps-aarch64.rst
+++ b/user/bsps/bsps-aarch64.rst
@@ -9,3 +9,4 @@ aarch64 (AArch64)
.. include:: aarch64/a72.rst
.. include:: aarch64/xilinx-versal.rst
.. include:: aarch64/xilinx-zynqmp.rst
+.. include:: aarch64/raspberrypi4.rst \ No newline at end of file
diff --git a/user/bsps/bsps-riscv.rst b/user/bsps/bsps-riscv.rst
index 5faa87b..2ef8327 100644
--- a/user/bsps/bsps-riscv.rst
+++ b/user/bsps/bsps-riscv.rst
@@ -8,7 +8,7 @@ riscv (RISC-V)
riscv
=====
-This BSP offers 13 variants:
+This BSP offers 15 variants:
* rv32i
@@ -38,14 +38,17 @@ This BSP offers 13 variants:
* frdme310arty
+* mpfs64imafdc
+
Each variant corresponds to a GCC multilib. A particular variant reflects an
ISA with ABI and code model choice.
-The basic hardware initialization is not performed by the BSP. A boot loader
-with device tree support must be used to start the BSP, e.g. BBL. The BSP must
-be started im machine mode.
+The BSP must be started im machine mode.
+
+The reference platform for this BSP is the QEMU `virt` machine.
-The reference platform for this BSP is the Qemu `virt` machine.
+The reference platform for the mpfs64imafdc BSP variant is the Microchip
+PolarFire SoC Icicle Kit.
Build Configuration Options
---------------------------
@@ -68,6 +71,13 @@ configuration INI file. The ``waf`` defaults can be used to inspect the values.
``BSP_FDT_BLOB_SIZE_MAX``
The maximum size of the device tree blob in bytes (default is 65536).
+``BSP_DTB_IS_SUPPORTED``
+ If defined to a non-zero value, then the device tree blob is embedded in
+ the BSP.
+
+``BSP_DTB_HEADER_PATH``
+ The path to the header file containing the device tree blob.
+
``BSP_CONSOLE_BAUD``
The default baud for console driver devices (default 115200).
@@ -94,6 +104,13 @@ configuration INI file. The ``waf`` defaults can be used to inspect the values.
Enables support sifive Freedom E310 Arty board if defined to a non-zero
value,otherwise it is disabled (disabled by default)
+``RISCV_ENABLE_MPFS_SUPPORT``
+ Enables support Microchip PolarFire SoC if defined to a non-zero
+ value, otherwise it is disabled (disabled by default).
+
+``RISCV_BOOT_HARTID``
+ The boot hartid (processor number) of risc-v cpu by default 0.
+
Interrupt Controller
--------------------
@@ -124,6 +141,183 @@ They are initialized according to the device tree. The console driver does not
configure the pins or peripheral clocks. The console device is selected
according to the device tree "/chosen/stdout-path" property value.
+QEMU
+----
+
+All of the BSP variants that start with rv can be run on QEMU's virt machine.
+For instance, to run the ``rv64imafdc_medany`` BSP with the following
+"config.ini" file:
+
+.. code-block:: none
+ [riscv/rv64imafdc_medany]
+
+Run the following QEMU command:
+
+.. code-block:: shell
+ $ qemu-system-riscv64 -M virt -nographic -bios $RTEMS_EXE
+
+Microchip PolarFire SoC
+-----------------------
+
+The PolarFire SoC is the 4x 64-bit RISC-V U54 cores and a 64-bit RISC-V
+E51 monitor core SoC from the Microchip.
+
+The ``mpfs64imafdc`` BSP variant supports the U54 cores but not the E51 because
+the E51 monitor core is reserved for the first stage bootloader
+(Hart Software Services). In order to boot from the first U54 core,
+``RISCV_BOOT_HARTID`` is set to 1 by default.
+
+The device tree blob is embedded in the ``mpfs64imafdc`` BSP variant by default
+with the ``BSP_DTB_IS_SUPPORTED`` enabled and the DTB header path
+``BSP_DTB_HEADER_PATH`` is set to bsp/mpfs-dtb.h.
+
+**SMP test procedure for the Microchip PolarFire Icicle Kit:**
+
+The "config.ini" file.
+
+.. code-block:: none
+
+ [riscv/mpfs64imafdc]
+ BUILD_TESTS = True
+ RTEMS_POSIX_API=True
+ RTEMS_SMP = True
+ BSP_START_COPY_FDT_FROM_U_BOOT=False
+ BSP_VERBOSE_FATAL_EXTENSION = False
+
+Build RTEMS.
+
+.. code-block:: shell
+
+ $ ./waf configure --prefix=$HOME/rtems-start/rtems/6
+ $ ./waf
+
+Convert .exe to .elf file.
+
+.. code-block:: shell
+
+ $ riscv-rtems6-objcopy build/riscv/mpfs64imafdc/testsuites/smptests/smp01.exe build/riscv/mpfs64imafdc/testsuites/smptests/smp01.elf
+
+Generate a payload for the `smp01.elf` using the `hss-payload-generator <https://github.com/polarfire-soc/hart-software-services/blob/master/tools/hss-payload-generator>`_.
+
+* Copy `smp01.elf` file to the HSS/tools/hss-payload-generator/test directory.
+
+* Go to hss-payload-generator source directory.
+
+.. code-block:: shell
+
+ $ cd hart-software-services/tools/hss-payload-generator
+
+* Edit test/uboot.yaml file for the hart entry points and correct name of the
+ binary file.
+
+.. code-block:: none
+
+ set-name: 'PolarFire-SoC-HSS::RTEMS'
+ hart-entry-points: {u54_1: '0x1000000000', u54_2: '0x1000000000', u54_3: '0x1000000000', u54_4: '0x1000000000'}
+ payloads:
+ test/smp01.elf: {exec-addr: '0x1000000000', owner-hart: u54_1, secondary-hart: u54_2, secondary-hart: u54_3, secondary-hart: u54_4, priv-mode: prv_m, skip-opensbi: true}
+
+* Generate payload
+
+.. code-block:: shell
+
+ $ ./hss-payload-generator -c test/uboot.yaml payload.bin
+
+Once the payload binary is generated, it should be copied to the eMMC/SD.
+
+`FPGA design with HSS programming file <https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/boards/mpfs-icicle-kit-es/updating-icicle-kit/updating-icicle-kit-design-and-linux.md>`_.
+
+Program the eMMC/SD with the payload binary.
+
+* Power Cycle the Microchip PolarFire Icicle Kit and stop at the HSS.
+
+* type "mmc" and then "usbdmsc" on the HSS terminal(UART0).
+
+* Load the payload.bin from the Host PC.
+
+.. code-block:: shell
+
+ $ sudo dd if=payload.bin of=/dev/sdb bs=512
+
+Reset the Microchip PolarFire SoC Icicle Kit.
+
+Serial terminal UART1 displays the SMP example messages
+
+.. code-block:: none
+
+ *** BEGIN OF TEST SMP 1 ***
+ *** TEST VERSION: 6.0.0.ef33f861e16de9bf4190a36e4d18062c7300986c
+ *** TEST STATE: EXPECTED_PASS
+ *** TEST BUILD: RTEMS_POSIX_API RTEMS_SMP
+ *** TEST TOOLS: 12.1.1 20220622 (RTEMS 6, RSB 3cb78b0b815ba05d17f5c6
+ 5865d246a8333aa087, Newlib ea99f21)
+
+ CPU 3 start task TA0
+ CPU 2 running Task TA0
+ CPU 3 start task TA1
+ CPU 1 running Task TA1
+ CPU 3 start task TA2
+ CPU 0 running Task TA2
+
+ *** END OF TEST SMP 1 ***
+
+noel
+====
+
+This BSP supports the `NOEL-V <https://gaisler.com/noel-v>`_ systems from Cobham
+Gaisler. The NOEL-V is a synthesizable VHDL model of a processor that
+implements the RISC-V architecture. It is part of the open source
+`GRLIB <https://gaisler.com/grlib>`_ IP Library. The following BSP
+variants correspond to common NOEL-V configurations:
+
+* noel32im
+
+* noel32imafd
+
+* noel64imac
+
+* noel64imafd
+
+* noel64imafdc
+
+The start of the memory is set to 0x0 to match a standard NOEL-V system,
+but can be changed using the ``RISCV_RAM_REGION_BEGIN`` configuration
+option. The size of the memory is taken from the information available
+in the device tree.
+
+Reference Designs
+-----------------
+
+The BSP has been tested with NOEL-V reference designs for
+`Digilent Arty A7 <https://gaisler.com/noel-artya7>`_,
+`Microchip PolarFire Splash Kit <https://gaisler.com/noel-pf>`_,
+and `Xilinx KCU105 <https://gaisler.com/noel-xcku>`_.
+See the accompanying quickstart guide for each reference design
+to determine which BSP configuration to use.
+
+Build Configuration Options
+---------------------------
+
+The following options can be used in the BSP section of the ``waf``
+configuration INI file. The ``waf`` defaults can be used to inspect the values.
+
+``BSP_CONSOLE_USE_INTERRUPTS``
+ Use the Termios interrupt mode in the console driver (true by default).
+
+``BSP_FDT_BLOB_SIZE_MAX``
+ The maximum size of the device tree blob in bytes (262144 by default).
+
+``RISCV_CONSOLE_MAX_APBUART_DEVICES``
+ The maximum number of APBUART devices supported by the console driver
+ (2 by default).
+
+``RISCV_RAM_REGION_BEGIN``
+ The begin of the RAM region for linker command file (0x0 by default).
+
+``RISCV_MAXIMUM_EXTERNAL_INTERRUPTS``
+ The maximum number of external interrupts supported by the BSP (64 by
+ default).
+
griscv
======
diff --git a/user/bsps/bsps-sparc.rst b/user/bsps/bsps-sparc.rst
index d0316a9..3ffd079 100644
--- a/user/bsps/bsps-sparc.rst
+++ b/user/bsps/bsps-sparc.rst
@@ -20,11 +20,81 @@ TODO.
leon2
=====
-TODO.
+This BSP supports LEON2 systems, in particular the `Microchip AT697F
+<https://www.microchip.com/en-us/product/AT697F>`_. The following
+default build configurations are provided:
+
+* leon2 - A generic LEON2 system with memory at 0x4000000.
+
+* at697f - For the AT697F. Built with ``-mcpu=leon -mfix-at697f``.
+
+The BSP contains UART, timer, and interrupt controller drivers.
+Drivers for PCI are available through the :ref:`driver manager <BSP_sparc_leon3_drv_mgr>`.
.. _BSP_sparc_leon3:
leon3
=====
-TODO.
+This BSP supports the LEON3/4/5 systems from Cobham Gaisler.
+The following default build configurations are provided:
+
+* leon3 - A generic `LEON3/4/5 <https://www.gaisler.com/leon5>`_ system with memory at 0x4000000.
+
+* ut700 - For the `UT700 <https://caes.com/product/ut700>`_. Built with ``-mcpu=leon3 -mfix-ut700``.
+
+* ut699 - For the `UT699 <https://caes.com/product/ut699>`_. Built with ``-mcpu=leon -mfix-ut699``.
+
+* gr712rc - For the `GR712RC <https://www.gaisler.com/gr712rc>`_. Built with ``-mcpu=leon3 -mfix-gr712rc``.
+
+* gr740 - For the `GR740 <https://www.gaisler.com/gr740>`_. Memory located at address 0x0.
+
+The BSP contains UART, timer, and interrupt controller drivers. Drivers for additional
+peripherals are available through the driver manager.
+
+.. _BSP_sparc_leon3_drv_mgr:
+
+Driver Manager
+--------------
+
+The leon3 BSP includes an optional driver manager that handles drivers and
+devices on the AMBA and PCI Plug & Play buses. The driver manager can either
+be initialized manually by the user, or started automatically on startup by
+setting the ``RTEMS_DRVMGR_STARTUP`` option. It can be configured to
+automatically instantiate a driver for each hardware device found.
+
+Drivers for the following devices are provided and handled via the driver manager:
+
+* SpaceWire (GRSPW, GRSPW2, GRSPW2_DMA)
+* SpaceWire Router (GRSPWROUTER)
+* SpaceWire Time Distribution Protocol (SPWTDP)
+* CAN - non-DMA (OCCAN) and DMA (GRCAN, GRCANFD)
+- GPIO (GRGPIO)
+- L2 Cache (L2CACHE)
+- IOMMU (GRIOMMU)
+- ADC/DAC (GRADCDAC)
+- Timers (GPTIMER, GRTIMER)
+- 1553 BC, RT and BM support (GR1553B)
+- I2C Master (I2CMST)
+- PCI (GRPCI2, GRPCI, PCIF)
+- Memory Controller (MCTRL)
+- Memory Scrubber (MEMSCRUB)
+- Pulse Width Modulation Generator (GRPWM)
+- CCSDS/ECSS Telemetry Encoder/Decoder (GRTM/GRTC)
+- CSDS Time Manager (GRCTM)
+- Ethernet (GRETH 10/100/1000) (requires network stack)
+- Performance counters (L4STAT)
+- Serial Peripheral Interface (AHBSTAT)
+- AHB Status (AHBSTAT)
+
+Build Configuration Options
+---------------------------
+
+The following options can be used in the BSP section of the ``waf``
+configuration INI file. The ``waf`` defaults can be used to inspect the values.
+
+``CONSOLE_USE_INTERRUPTS``
+ Use the Termios interrupt mode in the console driver (false by default).
+
+``RTEMS_DRVMGR_STARTUP``
+ Enable the Driver Manager at startup (false by default).
diff --git a/user/deployment/index.rst b/user/deployment/index.rst
new file mode 100644
index 0000000..d1315af
--- /dev/null
+++ b/user/deployment/index.rst
@@ -0,0 +1,426 @@
+.. SPDX-License-Identifier: CC-BY-SA-4.0
+
+.. Copyright (C) 2022 Chris Johns
+
+.. _BSPs:
+
+Deployment
+**********
+.. index:: Deployment
+.. index:: packages
+
+Deployment is a process companies, organizations or teams use to
+control and manage delivery of RTEMS tools, kernels and third party
+libraries. Deployed tools, kernels and libraries are packaged and
+controlled so the same tools and libraries are used in all phases of a
+project.
+
+The Quick Start guide details how tools are built using the RSB. The
+tools are installed on your development computer and available for you
+to build applications. That build can be viewed as the simplest form
+of deployment because it is simple and easy however it does not
+scale. Building the tools and kernel on each development machine in a
+project or company is time consuming, difficult to get right and
+costly to audit.
+
+This section covers the building of tools, kernels and third party
+libraries using the RSB for deployment. Custom RSB buildset files are
+supported across releases giving you an easy update path. The RSB can
+generate a single tarfile for any prefix without needing to install
+the pieces built helping ease integration with packaging systems and
+continuous integration (CI) for automated workflows.
+
+RSB Deployment
+--------------
+
+The RSB provides support for deployment using custom buildset files. A
+custom buildset file resides outside the RSB and can build tools for a
+number of architectures and kernels for BSPs. Deployment can include
+third party libraries if a single BSP is being built.
+
+The RSB ``--no-install`` option builds the tools and kernel without
+the final installation phase. A prefix that is not accessible when
+running the RSB can be used. This is important if a CI flow is being
+used.
+
+The buildset tar file option ``--bset-tar-file`` packages the build's
+staging directory tree into a single tar file. The tar file can be
+used as the input source to a packaging system.
+
+Buildset configuration files can be tested by adding the ``--dry-run``
+option to the ``sb-set-builder`` command line.
+
+The buildset examples that follow assume the prefix path used does not
+exist or is not writable and the environment path does not include any
+RTEMS tools.
+
+Deployment Repository
+^^^^^^^^^^^^^^^^^^^^^
+
+Create a repository to hold a project's buildset configuration
+files:
+
+.. code-block:: none
+
+ $ mkdir a-project
+ $ cd a-project
+ $ git init
+
+Add the RSB as a sub-module:
+
+.. code-block:: none
+
+ $ git submodule add git://git.rtems.org/rtems-source-builder.git
+
+Create a configuration directory:
+
+.. code-block:: none
+
+ $ mkdir config
+ $ git add config
+
+Tools Configuration
+^^^^^^^^^^^^^^^^^^^
+
+This example will build a single tool set with a local configuration
+file.
+
+Create a configuration file for the ``project``:
+
+.. code-block:: none
+
+ $ vi config/project-tools.bset
+
+Add the following to the buildset configuration file:
+
+.. code-block:: none
+
+ #
+ # Project Tools
+ #
+ @rtems-ver-major@/rtems-aarch64
+
+Commit the changes to the repository:
+
+.. code-block:: none
+
+ $ git add config/project-tools.bset
+ $ git commit -m "Add project aarch64 tools buildset"
+
+Build a tarfile containing the tools using the RSB submodule:
+
+.. code-block:: none
+
+ $ ./rtems-source-builder/source-builder/sb-set-builder \
+ --prefix=/opt/project --log=project.txt \
+ --bset-tar-file --no-install \
+ project-tools
+
+Once the build has finished the ``tar`` directory will contain the
+``project`` tools in a tarfile:
+
+.. code-block:: none
+
+ $ ls tar
+ project-tools.tar.bz2
+
+Inspect the tarfile to check the path matches the prefix used to build
+the tools (sizes may vary):
+
+.. code-block:: none
+
+ $ tar Jtvf tar/project-tools.tar.bz2 | less
+ drwxr-xr-x 0 chris eng 0 Sep 6 14:27 opt/project/bin/
+ -rwxr-xr-x 0 chris eng 1320888 Sep 6 14:20 opt/project/bin/aarch64-rtems@rtems-ver-major@-addr2line
+ -rwxr-xr-x 0 chris eng 1358688 Sep 6 14:20 opt/project/bin/aarch64-rtems@rtems-ver-major@-ar
+ -rwxr-xr-x 0 chris eng 2381976 Sep 6 14:20 opt/project/bin/aarch64-rtems@rtems-ver-major@-as
+ -rwxr-xr-x 0 chris eng 1328440 Sep 6 14:27 opt/project/bin/aarch64-rtems@rtems-ver-major@-c++
+ -rwxr-xr-x 0 chris eng 1316240 Sep 6 14:20 opt/project/bin/aarch64-rtems@rtems-ver-major@-c++filt
+ -rwxr-xr-x 0 chris eng 1328440 Sep 6 14:27 opt/project/bin/aarch64-rtems@rtems-ver-major@-cpp
+ -rwxr-xr-x 0 chris eng 60792 Sep 6 14:20 opt/project/bin/aarch64-rtems@rtems-ver-major@-elfedit
+ -rwxr-xr-x 0 chris eng 1328440 Sep 6 14:27 opt/project/bin/aarch64-rtems@rtems-ver-major@-g++
+ -rwxr-xr-x 0 chris eng 1328440 Sep 6 14:27 opt/project/bin/aarch64-rtems@rtems-ver-major@-gcc
+ -rwxr-xr-x 0 chris eng 1328440 Sep 6 14:27 opt/project/bin/aarch64-rtems@rtems-ver-major@-gcc-12.1.1
+ -rwxr-xr-x 0 chris eng 48568 Sep 6 14:27 opt/project/bin/aarch64-rtems@rtems-ver-major@-gcc-ar
+ -rwxr-xr-x 0 chris eng 48568 Sep 6 14:27 opt/project/bin/aarch64-rtems@rtems-ver-major@-gcc-nm
+ -rwxr-xr-x 0 chris eng 48576 Sep 6 14:27 opt/project/bin/aarch64-rtems@rtems-ver-major@-gcc-ranlib
+ .....
+
+Tools and Kernel
+^^^^^^^^^^^^^^^^
+
+This example builds a single tool set and an RTEMS kernel for a BSP
+using a buildset defined BSP settings.
+
+We use the same ``a-project`` repository from the previous example and
+add a new configuration. Add a configuration file to build the tools
+and a BSP:
+
+.. code-block:: none
+
+ $ vi config/project-tools-bsp.bset
+
+Add the following to the buildset configuration file and save:
+
+.. code-block:: none
+
+ #
+ # Project Tools and BSP
+ #
+ %define with_rtems_bsp aarch64/xilinx_versal_aiedge
+ %define with_rtems_bspopts BSP_XILINX_VERSAL_NOCACHE_LENGTH=0x4000000 \
+ BSP_XILINX_VERSAL_RAM_LENGTH=0x200000000
+ @rtems-ver-major@/rtems-aarch64
+ @rtems-ver-major@/rtems-kernel
+
+The configuration provides BSP options. Commit the changes to the
+repository:
+
+.. code-block:: none
+
+ $ git add config/project-tools-bsp.bset
+ $ git commit -m "Add project tools and BSP buildset"
+
+Build a tarfile of the tools and BSP using the RSB submodule:
+
+.. code-block:: none
+
+ $ ./rtems-source-builder/source-builder/sb-set-builder \
+ --prefix=/opt/project --log=project.txt \
+ --bset-tar-file --no-install \
+ project-tools-bsp
+
+A buildset configuration file that uses buildset BSP defines is
+limited to a single architecture and the tools built need to match the
+architecture of the BSP.
+
+You can specify more than one BSP to be built. An updated
+configuration could be:
+
+.. code-block:: none
+
+ %define with_rtems_bsp aarch64/xilinx_versal_aiedge \
+ aarch64/xilinx_zynqmp_lp64_zu3eg
+
+This is useful when deploying more than one BSP. If you need multiple
+architectures and BSPs consider the Tools and Kernel With Config
+example.
+
+Buildset BSP options are applied to all BSPs in the BSP list. If they
+are specific to a BSP only specify a single BSP in the BSP define.
+
+RTEMS 5 supports this type of buildset file.
+
+Tools and Kernel with Config
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This example builds tool sets for different architectures and multiple
+BSPs for the architectures using a kernel configuration INI file.
+
+Tools for the ``arch64`` and ``arm`` architectures are built and three
+BSPs each with different options.
+
+We use the same ``a-project`` repository from the previous example and
+add the new configurations. Add a configuration file to build the
+tools and BSPs:
+
+.. code-block:: none
+
+ $ vi config/project-tools-bsp-config.bset
+
+Add the following to the buildset configuration file and save:
+
+.. code-block:: none
+
+ #
+ # Project Tools and BSPs
+ #
+ %define with_rtems_bsp_config config/project-bsps.ini
+ @rtems-ver-major@/rtems-aarch64
+ @rtems-ver-major@/rtems-arm
+ @rtems-ver-major@/rtems-kernel
+
+Add a kernel configuration INI file:
+
+.. code-block:: none
+
+ $ vi config/project-bsps.bset
+
+Add the following to the kernel configuration INI file and save:
+
+.. code-block:: none
+
+ #
+ # Project BSPs
+ #
+ [DEFAULT]
+ RTEMS_POSIX_API = True
+ BUILD_SAMPLES = True
+ BUILD_TESTS = False
+
+ [aarch64/xilinx_versal_aiedge]
+ BSP_XILINX_VERSAL_NOCACHE_LENGTH = 0x4000000
+ BSP_XILINX_VERSAL_RAM_LENGTH = 0x200000000
+
+ [aarch64/xilinx_zynqmp_lp64_zu3eg]
+ RTEMS_SMP = True
+
+ [arm/xilinx_zynq_zc706]
+ RTEMS_SMP = True
+ BSP_XILINX_VERSAL_NOCACHE_LENGTH = 0x4000000
+ BSP_XILINX_VERSAL_RAM_LENGTH = 0x200000000
+
+Commit the changes to the repository:
+
+.. code-block:: none
+
+ $ git add config/project-tools-bsp-config.bset
+ $ git add config/project-bsps.ini
+ $ git commit -m "Add project tools and BSPs buildset and kernel config"
+
+Build a tarfile of the tools and BSPs using the RSB submodule:
+
+.. code-block:: none
+
+ $ ./rtems-source-builder/source-builder/sb-set-builder \
+ --prefix=/opt/project --log=project.txt \
+ --bset-tar-file --no-install \
+ project-tools-bsp-config
+
+Tools, Kernel and Packages
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Third party libraries can be built as part of a single RSB
+configuration if only one BSP is built at a time. The RSB support for
+building packages does not support building for multiple BSPs.
+
+We use the same ``a-project`` repository from the previous example and
+add a new configuration. Add a configuration file to build the tools,
+BSPs and LibBSD:
+
+.. code-block:: none
+
+ $ vi config/project-aarch64-tools-bsp-libbsd.bset
+
+Add the following to the buildset configuration file and save:
+
+.. code-block:: none
+
+ #
+ # Project Tools, BSP and LibBSD
+ #
+ %define with_rtems_bsp aarch64/xilinx_versal_aiedge
+ %define with_rtems_bspopts BSP_XILINX_VERSAL_NOCACHE_LENGTH=0x4000000 \
+ BSP_XILINX_VERSAL_RAM_LENGTH=0x200000000
+ 6/rtems-aarch64
+ 6/rtems-kernel
+ 6/rtems-libbsd
+
+Commit the changes to the repository:
+
+.. code-block:: none
+
+ $ git add config/project-aarch64-tools-bsp-libbsd.bset
+ $ git commit -m "Add project aarch64 tools, BSP and libbsd"
+
+Build a tarfile of the tools, BSP and LibBSD using the RSB
+submodule:
+
+.. code-block:: none
+
+ $ ./rtems-source-builder/source-builder/sb-set-builder \
+ --prefix=/opt/project --log=project.txt \
+ --bset-tar-file --no-install \
+ project-aarch64-tools-bsp-libbsd
+
+The tarfile can be reviewed to see the BSP libraries built (sizes may vary):
+
+.. code-block:: none
+
+ $ tar jtvf tar/project-aarch64-tools-bsp-libbsd.tar.bz2 | \
+ grep -e '\.a$' | grep -e 'xilinx_versal_aiedge'
+ -rw-r--r-- 0 chris eng 138936312 Sep 7 14:58 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libbsd.a
+ -rw-r--r-- 0 chris eng 686190 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libdebugger.a
+ -rw-r--r-- 0 chris eng 164086 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libftpd.a
+ -rw-r--r-- 0 chris eng 107560 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libftpfs.a
+ -rw-r--r-- 0 chris eng 978812 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libjffs2.a
+ -rw-r--r-- 0 chris eng 412354 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libmghttpd.a
+ -rw-r--r-- 0 chris eng 2099962 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/librtemsbsp.a
+ -rw-r--r-- 0 chris eng 29693496 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/librtemscpu.a
+ -rw-r--r-- 0 chris eng 435236 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/librtemscxx.a
+ -rw-r--r-- 0 chris eng 141234 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/librtemsdefaultconfig.a
+ -rw-r--r-- 0 chris eng 856514 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/librtemstest.a
+ -rw-r--r-- 0 chris eng 159004 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libtelnetd.a
+ -rw-r--r-- 0 chris eng 137386 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libtftpfs.a
+ -rw-r--r-- 0 chris eng 476692 Sep 7 14:56 opt/project/aarch64-rtems@rtems-ver-major@/xilinx_versal_aiedge/lib/libz.a
+
+Tools, Kernel with Config and Packages
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This example builds the tools, kernel and LibBSD using an RSB
+configuration file and a kernel configuration file. The kernel
+configuration provides easier kernel and BSP option management.
+
+Third party libraries can be built as part of a single RSB
+configuration if only one BSP is built at a time. The RSB support for
+building packages does not support building for multiple BSPs.
+
+We use the same ``a-project`` repository from the previous example and
+add a new configuration. Add a configuration file to build the tools,
+BSPs and LibBSD:
+
+.. code-block:: none
+
+ $ vi config/project-aarch-tools-bsp-libbsd-config.bset
+
+Add the following to the buildset configuration file and save:
+
+.. code-block:: none
+
+ #
+ # Project Tools, BSP and LibBSD
+ #
+ %define with_rtems_bsp_config config/project-aarch64-bsp.ini
+ 6/rtems-aarch64
+ 6/rtems-kernel
+ 6/rtems-libbsd
+
+Add a kernel configuration INI file:
+
+.. code-block:: none
+
+ $ vi config/project-aarch64-bsp.bset
+
+Add the following kernel configuration INI file and save:
+
+.. code-block:: none
+
+ #
+ # Project Versal AI Edge BSP
+ #
+ [DEFAULT]
+ RTEMS_POSIX_API = True
+ BUILD_SAMPLES = True
+ BUILD_TESTS = False
+
+ [aarch64/xilinx_versal_aiedge]
+ BSP_XILINX_VERSAL_NOCACHE_LENGTH = 0x4000000
+ BSP_XILINX_VERSAL_RAM_LENGTH = 0x200000000
+
+Commit the changes to the repository:
+
+.. code-block:: none
+
+ $ git add config/project-aarch64-tools-bsp-libbsd-config.bset
+ $ git add config/project-aarch64-bsp.ini
+ $ git commit -m "Add project aarch64 tools, BSP (with config) and libbsd"
+
+Build the tarfile of the tools, BSP and LibBSD using the RSB
+submodule:
+
+.. code-block:: none
+
+ $ ./rtems-source-builder/source-builder/sb-set-builder \
+ --prefix=/opt/project --log=project.txt \
+ --bset-tar-file --no-install \
+ project-aarch64-tools-bsp-libbsd-config
diff --git a/user/hosts/posix.rst b/user/hosts/posix.rst
index 9769e07..d263247 100644
--- a/user/hosts/posix.rst
+++ b/user/hosts/posix.rst
@@ -179,8 +179,19 @@ than the usual zlib-dev):
openSUSE
~~~~~~~~
-This has been reported to work but no instructions were provided. This is an
-opportunity to contribute. Please submit any guidance you can provide.
+The RTEMS Source Builder has been tested on openSUSE Leap 15.4 64bit.
+Starting with a clean install with source repositories enabled, the following
+zypper command installs the required packages:
+
+.. code-block:: none
+
+ # sudo zypper in -t pattern devel_C_C++ devel_python3
+
+In addition, the following command can set python3 as the default python interpreter:
+
+.. code-block:: none
+
+ # sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
.. _FreeBSD:
diff --git a/user/hosts/windows.rst b/user/hosts/windows.rst
index fac1366..fd7ff55 100644
--- a/user/hosts/windows.rst
+++ b/user/hosts/windows.rst
@@ -156,6 +156,7 @@ The packages we require are:
* python
* mingw-w64-x86_64-python2
* mingw-w64-x86_64-gcc
+* flex
* git
* bison
* cvs
@@ -176,7 +177,7 @@ Install the packages using ``pacman``:
.. code-block:: none
$ pacman -S python mingw-w64-x86_64-python2 mingw-w64-x86_64-gcc \
- bison cvs diffutils git make patch tar texinfo unzip
+ bison flex cvs diffutils git make patch tar texinfo unzip
resolving dependencies...
looking for conflicting packages...
.... output shortened for brevity ....
diff --git a/user/index.rst b/user/index.rst
index a91aa55..38ade81 100644
--- a/user/index.rst
+++ b/user/index.rst
@@ -20,7 +20,7 @@ RTEMS User Manual (|version|).
| |copy| 2017 Tanu Hari Dixit
| |copy| 2016, 2019 embedded brains GmbH
| |copy| 2016, 2019 Sebastian Huber
- | |copy| 2012, 2020 Chris Johns
+ | |copy| 2012, 2022 Chris Johns
| |copy| 2012, 2020 Gedare Bloom
| |copy| 1988, 2018 On-Line Applications Research Corporation (OAR)
@@ -37,6 +37,7 @@ RTEMS User Manual (|version|).
support/index
hosts/index
installation/index
+ deployment/index
hardware/index
bld/index
diff --git a/user/installation/kernel.rst b/user/installation/kernel.rst
index fca4ed7..d61f17f 100644
--- a/user/installation/kernel.rst
+++ b/user/installation/kernel.rst
@@ -18,10 +18,9 @@ Create a new location to build the RTEMS kernel:
.. code-block:: none
- $ cd
- $ cd development/rtems
- $ mkdir kernel
- $ cd kernel
+ $ cd $HOME/development/rtems
+ $ mkdir src
+ $ cd src
Clone the RTEMS respository:
@@ -36,209 +35,72 @@ Clone the RTEMS respository:
Resolving deltas: 100% (390053/390053), done.
Checking connectivity... done.
-Tools Path Set Up
------------------
-
-We need to set our path to include the RTEMS tools we built in the previous
-section. The RTEMS tools needs to be first in your path because RTEMS provides
-specific versions of the ``autoconf`` and ``automake`` tools. We want to use
-the RTEMS version and not your host's versions:
-
-.. code-block:: none
-
- $ export PATH=$HOME/development/rtems/5/bin:$PATH
-
-.. _bootstrapping:
-
-Bootstrapping
--------------
-
-The developers version of the code from git requires we ``bootstrap`` the
-source code. This is an ``autoconf`` and ``automake`` bootstrap to create the
-various files generated by ``autoconf`` and ``automake``. RTEMS does not keep
-these generated files under version control. The bootstrap process is slow so
-to speed it up we provide a command that can perform the bootstrap in
-parallel using your available cores. We need to enter the cloned source
-directory then run the bootstrap commands:
-
-.. code-block:: none
-
- $ cd rtems
- $ ./bootstrap -c && ./rtems-bootstrap
- removing automake generated Makefile.in files
- removing configure files
- removing aclocal.m4 files
- RTEMS Bootstrap, 5 (089327b5dcf9)
- 1/139: autoreconf: configure.ac
- 2/139: autoreconf: cpukit/configure.ac
- 3/139: autoreconf: tools/cpu/configure.ac
- 4/139: autoreconf: tools/cpu/generic/configure.ac
- 5/139: autoreconf: tools/cpu/sh/configure.ac
- 6/139: autoreconf: tools/cpu/nios2/configure.ac
- 7/139: autoreconf: tools/build/configure.ac
- 8/139: autoreconf: doc/configure.ac
- ......
- 124/139: autoreconf: c/src/make/configure.ac
- 125/139: autoreconf: c/src/librtems++/configure.ac
- 126/139: autoreconf: c/src/ada-tests/configure.ac
- 127/139: autoreconf: testsuites/configure.ac
- 128/139: autoreconf: testsuites/libtests/configure.ac
- 129/139: autoreconf: testsuites/mptests/configure.ac
- 130/139: autoreconf: testsuites/fstests/configure.ac
- 131/139: autoreconf: testsuites/sptests/configure.ac
- 132/139: autoreconf: testsuites/tmtests/configure.ac
- 133/139: autoreconf: testsuites/smptests/configure.ac
- 134/139: autoreconf: testsuites/tools/configure.ac
- 135/139: autoreconf: testsuites/tools/generic/configure.ac
- 136/139: autoreconf: testsuites/psxtests/configure.ac
- 137/139: autoreconf: testsuites/psxtmtests/configure.ac
- 138/139: autoreconf: testsuites/rhealstone/configure.ac
- 139/139: autoreconf: testsuites/samples/configure.ac
- Bootstrap time: 0:02:47.398824
-
Building a BSP
--------------
-We build RTEMS in a directory outside of the source tree we have just cloned
-and ``bootstrapped``. You cannot build RTEMS while in the source tree. Lets
-create a suitable directory using the name of the BSP we are going to build:
+We build RTEMS in a directory within the source tree we have just cloned. For
+the details, see the :ref:`BSPBuildSystem`. We will build for the ``erc32``
+BSP with POSIX enabled. Firstly, create the file :file:`config.ini` in the
+source tree root directory with the BSP build configuration, for example:
-.. code-block:: none
+.. code-block:: ini
- $ cd ..
- $ mkdir erc32
- $ cd erc32
+ [sparc/erc32]
+ RTEMS_POSIX_API = True
-Configure RTEMS using the ``configure`` command. We use a full path to
-``configure`` so the object files built contain the absolute path of the source
-files. If you are source level debugging you will be able to access the source
-code to RTEMS from the debugger. We will build for the ``erc32`` BSP with POSIX
-enabled and the networking stack disabled:
+Configure RTEMS using the ``waf configure`` command:
.. code-block:: none
- $ $HOME/development/rtems/kernel/rtems/configure --prefix=$HOME/development/rtems/5 \
- --target=sparc-rtems5 --enable-rtemsbsp=erc32 --enable-posix \
- --disable-networking
- checking for gmake... no
- checking for make... make
- checking for RTEMS Version... 4.11.99.0
- checking build system type... x86_64-pc-linux-gnu
- checking host system type... x86_64-pc-linux-gnu
- checking target system type... sparc-unknown-rtems5
- checking for a BSD-compatible install... /usr/bin/install -c
- checking whether build environment is sane... yes
- checking for a thread-safe mkdir -p... /bin/mkdir -p
- checking for gawk... no
- checking for mawk... mawk
- checking whether make sets $(MAKE)... yes
- checking whether to enable maintainer-specific portions of Makefiles... no
- checking that generated files are newer than configure... done
- ......
- checking target system type... sparc-unknown-rtems5
- checking rtems target cpu... sparc
- checking for a BSD-compatible install... /usr/bin/install -c
- checking whether build environment is sane... yes
- checking for sparc-rtems5-strip... sparc-rtems5-strip
- checking for a thread-safe mkdir -p... /bin/mkdir -p
- checking for gawk... no
- checking for mawk... mawk
- checking whether make sets $(MAKE)... yes
- checking whether to enable maintainer-specific portions of Makefiles... no
- checking that generated files are newer than configure... done
- configure: creating ./config.status
- config.status: creating Makefile
-
- target architecture: sparc.
- available BSPs: erc32.
- 'make all' will build the following BSPs: erc32.
- other BSPs can be built with 'make RTEMS_BSP="bsp1 bsp2 ..."'
-
- config.status: creating Makefile
-
-Build RTEMS using two cores:
+ $ cd $HOME/development/rtems/src/rtems
+ $ ./waf configure --prefix=$HOME/development/rtems/6
+ Setting top to : $HOME/development/rtems/src/rtems
+ Setting out to : $HOME/development/rtems/src/rtems/build
+ Regenerate build specification cache (needs a couple of seconds)...
+ Configure board support package (BSP) : sparc/erc32
+ Checking for program 'sparc-rtems6-gcc' : $HOME/development/rtems/6/bin/sparc-rtems6-gcc
+ Checking for program 'sparc-rtems6-g++' : $HOME/development/rtems/6/bin/sparc-rtems6-g++
+ Checking for program 'sparc-rtems6-ar' : $HOME/development/rtems/6/bin/sparc-rtems6-ar
+ Checking for program 'sparc-rtems6-ld' : $HOME/development/rtems/6/bin/sparc-rtems6-ld
+ Checking for program 'ar' : $HOME/development/rtems/6/bin/sparc-rtems6-ar
+ Checking for program 'g++, c++' : $HOME/development/rtems/6/bin/sparc-rtems6-g++
+ Checking for program 'ar' : $HOME/development/rtems/6/bin/sparc-rtems6-ar
+ Checking for program 'gas, gcc' : $HOME/development/rtems/6/bin/sparc-rtems6-gcc
+ Checking for program 'ar' : $HOME/development/rtems/6/bin/sparc-rtems6-ar
+ Checking for program 'gcc, cc' : $HOME/development/rtems/6/bin/sparc-rtems6-gcc
+ Checking for program 'ar' : $HOME/development/rtems/6/bin/sparc-rtems6-ar
+ Checking for asm flags '-MMD' : yes
+ Checking for c flags '-MMD' : yes
+ Checking for cxx flags '-MMD' : yes
+ Checking for program 'rtems-bin2c' : $HOME/development/rtems/6/bin/rtems-bin2c
+ Checking for program 'gzip' : /usr/bin/gzip
+ Checking for program 'xz' : /usr/bin/xz
+ Checking for program 'rtems-ld' : $HOME/development/rtems/6/bin/rtems-ld
+ Checking for program 'rtems-syms' : $HOME/development/rtems/6/bin/rtems-syms
+ Checking for program 'rtems-bin2c' : $HOME/development/rtems/6/bin/rtems-bin2c
+ Checking for program 'gzip' : /usr/bin/gzip
+ Checking for program 'xz' : /usr/bin/xz
+ 'configure' finished successfully (7.996s)
+
+Build RTEMS:
.. code-block:: none
- $ make -j 2
- Making all in tools/build
- make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
- make all-am
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
- gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build -g -O2 -MT cklength.o -MD -MP -MF .deps/cklength.Tpo -c -o cklength.o /home/chris/development/rtems/kernel/rtems/tools/build/cklength.c
- gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build -g -O2 -MT eolstrip.o -MD -MP -MF .deps/eolstrip.Tpo -c -o eolstrip.o /home/chris/development/rtems/kernel/rtems/tools/build/eolstrip.c
- mv -f .deps/cklength.Tpo .deps/cklength.Po
- mv -f .deps/eolstrip.Tpo .deps/eolstrip.Po
- gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build -g -O2 -MT compat.o -MD -MP -MF .deps/compat.Tpo -c -o compat.o /home/chris/development/rtems/kernel/rtems/tools/build/compat.c
- gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build -g -O2 -MT packhex.o -MD -MP -MF .deps/packhex.Tpo -c -o packhex.o /home/chris/development/rtems/kernel/rtems/tools/build/packhex.c
- mv -f .deps/compat.Tpo .deps/compat.Po
- gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build -g -O2 -MT unhex.o -MD -MP -MF .deps/unhex.Tpo -c -o unhex.o /home/chris/development/rtems/kernel/rtems/tools/build/unhex.c
- mv -f .deps/packhex.Tpo .deps/packhex.Po
- gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build -g -O2 -MT rtems-bin2c.o -MD -MP -MF .deps/rtems-bin2c.Tpo -c -o rtems-bin2c.o /home/chris/development/rtems/kernel/rtems/tools/build/rtems-bin2c.c
- mv -f .deps/unhex.Tpo .deps/unhex.Po
- gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build -g -O2 -MT binpatch.o -MD -MP -MF .deps/binpatch.Tpo -c -o binpatch.o /home/chris/development/rtems/kernel/rtems/tools/build/binpatch.c
- mv -f .deps/rtems-bin2c.Tpo .deps/rtems-bin2c.Po
- gcc -g -O2 -o cklength cklength.o
- mv -f .deps/binpatch.Tpo .deps/binpatch.Po
- gcc -g -O2 -o eolstrip eolstrip.o compat.o
- gcc -g -O2 -o packhex packhex.o
- gcc -g -O2 -o rtems-bin2c rtems-bin2c.o compat.o
- gcc -g -O2 -o unhex unhex.o compat.o
- gcc -g -O2 -o binpatch binpatch.o
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
- Making all in tools/cpu
- make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- Making all in generic
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
- make[2]: Nothing to be done for 'all'.
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- make[2]: Nothing to be done for 'all-am'.
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- Making all in testsuites/tools
- make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
- Making all in generic
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools/generic'
- make[2]: Nothing to be done for 'all'.
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools/generic'
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
- make[2]: Nothing to be done for 'all-am'.
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
- Making all in sparc-rtems5/c
- make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/c'
- Making all in .
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/c'
- Configuring RTEMS_BSP=erc32
- checking for gmake... no
- checking for make... make
- checking build system type... x86_64-pc-linux-gnu
- checking host system type... sparc-unknown-rtems5
- ......
- sparc-rtems5-gcc -B../../../../../erc32/lib/ -specs bsp_specs -qrtems -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/nsecs -I.. -I/home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT init.o -MD -MP -MF .deps/init.Tpo -c -o init.o /home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/nsecs/init.c
- sparc-rtems5-gcc -B../../../../../erc32/lib/ -specs bsp_specs -qrtems -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/nsecs -I.. -I/home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT empty.o -MD -MP -MF .deps/empty.Tpo -c -o empty.o /home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/nsecs/empty.c
- mv -f .deps/empty.Tpo .deps/empty.Po
- mv -f .deps/init.Tpo .deps/init.Po
- sparc-rtems5-gcc -B../../../../../erc32/lib/ -specs bsp_specs -qrtems -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -Wl,--gc-sections -mcpu=cypress -o nsecs.exe init.o empty.o
- sparc-rtems5-nm -g -n nsecs.exe > nsecs.num
- sparc-rtems5-size nsecs.exe
- text data bss dec hex filename
- 121392 1888 6624 129904 1fb70 nsecs.exe
- cp nsecs.exe nsecs.ralf
- make[6]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/ c/erc32/testsuites/samples/nsecs'
- make[5]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/ c/erc32/testsuites/samples'
- make[4]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/ c/erc32/testsuites/samples'
- make[4]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/ c/erc32/testsuites'
- make[4]: Nothing to be done for 'all-am'.
- make[4]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/ c/erc32/testsuites'
- make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/ c/erc32/testsuites'
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/ c/erc32'
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/c'
- make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32'
- make[1]: Nothing to be done for 'all-am'.
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
+ $ ./waf
+ Waf: Entering directory `$HOME/development/rtems/src/rtems/build'
+ Waf: Leaving directory `$HOME/development/rtems/src/rtems/build'
+ 'build' finished successfully (0.051s)
+ Waf: Entering directory `$HOME/development/rtems/src/rtems/build/sparc/erc32'
+ [ 1/1524] Compiling bsps/shared/dev/serial/mc68681_reg2.c
+ [ 2/1524] Compiling bsps/shared/dev/rtc/mc146818a_ioreg.c
+ [ 3/1524] Compiling bsps/shared/dev/flash/am29lv160.c
+ ...
+ [1521/1524] Linking $HOME/development/rtems/src/rtems/build/sparc/erc32/libz.a
+ [1522/1524] Linking $HOME/development/rtems/src/rtems/build/sparc/erc32/librtemscxx.a
+ [1523/1524] Linking $HOME/development/rtems/src/rtems/build/sparc/erc32/testsuites/samples/paranoia.exe
+ [1524/1524] Linking $HOME/development/rtems/src/rtems/build/sparc/erc32/libmghttpd.a
+ Waf: Leaving directory `$HOME/development/rtems/src/rtems/build/sparc/erc32'
+ 'build_sparc/erc32' finished successfully (4.894s)
Installing A BSP
----------------
@@ -252,46 +114,20 @@ RTEMS with the following command:
.. code-block:: none
- $ make install
- Making install in tools/build
- make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
- /bin/mkdir -p '/home/chris/development/rtems/5/bin'
- /usr/bin/install -c cklength eolstrip packhex unhex rtems-bin2c '/home/chris/development/rtems/5/bin'
- /bin/mkdir -p '/home/chris/development/rtems/5/bin'
- /usr/bin/install -c install-if-change '/home/chris/development/rtems/5/bin'
- make[2]: Nothing to be done for 'install-data-am'.
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
- Making install in tools/cpu
- make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- Making install in generic
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
- make[3]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
- make[3]: Nothing to be done for 'install-exec-am'.
- make[3]: Nothing to be done for 'install-data-am'.
- make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- make[3]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- make[3]: Nothing to be done for 'install-exec-am'.
- make[3]: Nothing to be done for 'install-data-am'.
- make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
- ....
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems5/c'
- make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32'
- make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32'
- make[2]: Nothing to be done for 'install-exec-am'.
- /bin/mkdir -p '/home/chris/development/rtems/5/make'
- /usr/bin/install -c -m 644 /home/chris/development/rtems/kernel/rtems/make/main.cfg /home/chris/development/rtems/kernel/rtems/make/leaf.cfg '/home/chris/development/rtems/5/make'
- /bin/mkdir -p '/home/chris/development/rtems/5/share/rtems5/make/Templates'
- /usr/bin/install -c -m 644 /home/chris/development/rtems/kernel/rtems/make/Templates/Makefile.dir /home/chris/development/rtems/kernel/rtems/make/Templates/Makefile.leaf /home/chris/development/rtems/kernel/rtems/make/Templates/Makefile.lib '/home/chris/development/rtems/5/share/rtems5/make/Templates'
- /bin/mkdir -p '/home/chris/development/rtems/5/make/custom'
- /usr/bin/install -c -m 644 /home/chris/development/rtems/kernel/rtems/make/custom/default.cfg '/home/chris/development/rtems/5/make/custom'
- make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
- make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
+ $ ./waf install
+ Waf: Entering directory `$HOME/development/rtems/src/rtems/build'
+ Waf: Leaving directory `$HOME/development/rtems/src/rtems/build'
+ 'install' finished successfully (0.074s)
+ Waf: Entering directory `$HOME/development/rtems/src/rtems/build/sparc/erc32'
+ + install $HOME/development/rtems/6/sparc-rtems6/erc32/lib/include/libchip/am29lv160.h (from bsps/include/libchip/am29lv160.h)
+ + install $HOME/development/rtems/6/sparc-rtems6/erc32/lib/include/libchip/mc146818a.h (from bsps/include/libchip/mc146818a.h)
+ + install $HOME/development/rtems/6/sparc-rtems6/erc32/lib/include/libchip/mc68681.h (from bsps/include/libchip/mc68681.h)
+ ...
+ + install $HOME/development/rtems/6/sparc-rtems6/erc32/lib/include/rtems/version.h (from cpukit/include/rtems/version.h)
+ + install $HOME/development/rtems/6/sparc-rtems6/erc32/lib/include/rtems/vmeintr.h (from cpukit/include/rtems/vmeintr.h)
+ + install $HOME/development/rtems/6/sparc-rtems6/erc32/lib/include/rtems/watchdogdrv.h (from cpukit/include/rtems/watchdogdrv.h)
+ Waf: Leaving directory `$HOME/development/rtems/src/rtems/build/sparc/erc32'
+ 'install_sparc/erc32' finished successfully (0.637s)
Contributing Patches
--------------------
@@ -313,7 +149,7 @@ has changed:
.. code-block:: none
- $ cd ../rtems
+ $ cd $HOME/development/rtems/src/rtems
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
diff --git a/user/tracing/eventrecording.rst b/user/tracing/eventrecording.rst
index 7130658..b5561cc 100644
--- a/user/tracing/eventrecording.rst
+++ b/user/tracing/eventrecording.rst
@@ -48,8 +48,11 @@ The application enables the event recording support via the configuration
option :c:macro:`CONFIGURE_RECORD_PER_PROCESSOR_ITEMS`. The configuration
option :c:macro:`CONFIGURE_RECORD_EXTENSIONS_ENABLED` enables the generation of
thread create, start, restart, delete, switch, begin, exitted and terminate
-events. Dumps of the event records in a fatal error handler can be enabled by
-the mutually exclusive :c:macro:`CONFIGURE_RECORD_FATAL_DUMP_BASE64` and
+events. The configuration option
+:c:macro:`CONFIGURE_RECORD_INTERRUPTS_ENABLED` enables the generation of
+interrupt entry and exit events. Dumps of the event records in a fatal error
+handler can be enabled by the mutually exclusive
+:c:macro:`CONFIGURE_RECORD_FATAL_DUMP_BASE64` and
:c:macro:`CONFIGURE_RECORD_FATAL_DUMP_BASE64_ZLIB` configuration options.
Custom events can be recorded for example with the
@@ -98,64 +101,6 @@ instrumented functions:
);
}
-To generate interrupt handler entry/exit events, the following patch can be
-used:
-
-.. code-block:: diff
-
- diff --git a/bsps/arm/shared/clock/clock-armv7m.c b/bsps/arm/shared/clock/clock-armv7m.c
- index 255de1ca42..0d37c63ac6 100644
- --- a/bsps/arm/shared/clock/clock-armv7m.c
- +++ b/bsps/arm/shared/clock/clock-armv7m.c
- @@ -29,6 +29,7 @@
- #include <bsp/clock-armv7m.h>
-
- #include <rtems.h>
- +#include <rtems/record.h>
- #include <rtems/sysinit.h>
-
- #ifdef ARM_MULTILIB_ARCH_V7M
- @@ -45,9 +46,11 @@ static uint32_t _ARMV7M_TC_get_timecount(struct timecounter *base)
-
- void _ARMV7M_Clock_handler(void)
- {
- + rtems_record_produce(RTEMS_RECORD_INTERRUPT_ENTRY, ARMV7M_VECTOR_SYSTICK);
- _ARMV7M_Interrupt_service_enter();
- Clock_isr(NULL);
- _ARMV7M_Interrupt_service_leave();
- + rtems_record_produce(RTEMS_RECORD_INTERRUPT_EXIT, ARMV7M_VECTOR_SYSTICK);
- }
-
- static void _ARMV7M_Clock_handler_install(void)
- diff --git a/bsps/include/bsp/irq-generic.h b/bsps/include/bsp/irq-generic.h
- index 31835d07ba..2ab2f78b65 100644
- --- a/bsps/include/bsp/irq-generic.h
- +++ b/bsps/include/bsp/irq-generic.h
- @@ -30,6 +30,7 @@
- #include <stdbool.h>
-
- #include <rtems/irq-extension.h>
- +#include <rtems/record.h>
- #include <rtems/score/assert.h>
-
- #ifdef RTEMS_SMP
- @@ -258,6 +259,7 @@ void bsp_interrupt_vector_disable(rtems_vector_number vector);
- */
- static inline void bsp_interrupt_handler_dispatch(rtems_vector_number vector)
- {
- + rtems_record_produce(RTEMS_RECORD_INTERRUPT_ENTRY, vector);
- if (bsp_interrupt_is_valid_vector(vector)) {
- const bsp_interrupt_handler_entry *e =
- &bsp_interrupt_handler_table [bsp_interrupt_handler_index(vector)];
- @@ -276,6 +278,7 @@ static inline void bsp_interrupt_handler_dispatch(rtems_vector_number vector)
- } else {
- bsp_interrupt_handler_default(vector);
- }
- + rtems_record_produce(RTEMS_RECORD_INTERRUPT_EXIT, vector);
- }
-
- /**
-
Transfer of Event Records to the Host Computer
----------------------------------------------
diff --git a/user/tracing/examples.rst b/user/tracing/examples.rst
index d0bef0b..2b673d4 100644
--- a/user/tracing/examples.rst
+++ b/user/tracing/examples.rst
@@ -61,7 +61,7 @@ to your installation.
.. code-block:: none
sparc-rtems5-gcc -Bsparc-rtems5/erc32/lib/ \
- -specs bsp_specs -qrtems -mcpu=cypress -O2 -g -ffunction-sections \
+ -qrtems -mcpu=cypress -O2 -g -ffunction-sections \
-fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration \
-Wstrict-prototypes -Wnested-externs -Wl,--gc-sections -mcpu=cypress \
-o sparc-rtems5/c/erc32/testsuites/samples/fileio.exe sparc-rtems5/c/erc32/\
@@ -75,7 +75,7 @@ the wrapper c file.
.. code-block:: none
rtems-tld -C fileio-trace.ini -W fileio-wrapper -- -Bsparc-rtems5/erc32/lib/ \
- -specs bsp_specs -qrtems -mcpu=cypress -O2 -g -ffunction-sections \
+ -qrtems -mcpu=cypress -O2 -g -ffunction-sections \
-fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration \
-Wstrict-prototypes -Wnested-externs -Wl,--gc-sections -mcpu=cypress \
-o sparc-rtems5/c/erc32/testsuites/samples/fileio.exe sparc-rtems5/c/erc32/\