Chapter 217. Configuration
This chapter shows how to incorporate the RTT support into an eCos configuration, and how to configure it once included.
217.1. Configuration Overview
The RTT support is contained in a single eCos package
CYGPKG_RTT. However, some functionality may be
dependant on other eCos features. e.g. the Cortex-M HAL.
217.1.1. Quick Start
Incorporating the RTT support into your application is
straightforward. The essential starting point is to incorporate the
RTT eCos package (
into your configuration.
This may be achieved directly using ecosconfig add on the command line, or the Build->Packages… menu item within the eCos Configuration Tool.
Depending on the RTT package configuration, and the other packages
present in the configuration, further package specific configuration
may be required. For example, the
CYGPKG_HAL_CORTEXM packages allows for the use of
RTT for HAL diagnostics, but the option needs to be explicitly
Various package specific configuration settings define how the RTT world is present.
This option configures the number of UP buffers (Target->Host)
available. This value should be at least
2if also using
CYGPKG_SYSTEMVIEWfor event tracing.
- This option configures the size (in bytes) of the buffer used for terminal output (UP channel 0) from the Target to the Host.
- This option configures the number of DOWN buffers (Host->Target) available.
- This option configures the size (in bytes) of the buffer for terminal input from the Host to the Target. For exampe this could be used for keyboard input. Normally the terminal DOWN buffer can be significantly smaller than the corresponding terminal UP buffer since external tool interaction is going to be less than diagnostics generated.
This option configures the size of the internal buffer used for RTT
printfcharacters via RTT.
This option sets the default, initial, operation mode for
Target->Host buffers. Use
NO_BLOCK_SKIPfor non-blocking TX where data not yet uploaded is overwritten. Use
NO_BLOCK_TRIMfor non-blocking TX where further data is dropped if the upload buffer is full. Use
BLOCK_IF_FIFO_FULLwhen the RTT calls should block until space is available in the upload buffer, so no data is lost. The default setting can be over-ridden at run-time by an application if required, via the
If required this option replaces the standard
memcpy()usage with a byte loop. The byte loop can have a lower overhead than
memcpy()if small amounts of data are being copied, and may be required for some architectures where memory access restrictions are in place.
- The priority for the RTT lock.
This option defines a string with the name of the section to be used for the RTT data objects. If relevent for a target configuration this will allow the explicit placing of the RTT structures into a specific memory area (e.g. SRAM). It is the responsibility of the developer to choose a section name supported by the target architecture linker script. For example, for most target architectures this can be a section named with the prefix “
.sram”, e.g. “
.sram.rtt”. If the option is not enabled then the RTT data structures are linked to the normal data section for the target configuration.
If this option is enabled then the further option
CYGDAT_RTT_BUFFER_SECTIONis available, which can be set to allow the explicit placement of RTT buffers. The
CYGDAT_RTT_BUFFER_SECTIONoption defines the string with the name of the section to be used for the RTT up and down “Terminal” buffers. If this option is not enabled, but
CYGDAT_RTT_SECTIONis, then the buffers will be placed in the named
SEGGER_RTT_printf()implementation is not normally required, since the standard eCos diag_printf() provides similar functionality. This option can be enabled if required by the application.
|2023-08-15||eCosPro Non-Commercial Public License|