eCos applications and components can be debugged in
traditional ways, with printing statements and debugger
single-stepping, but there are situations in which these
techniques cannot be used. One example of this is when a
program is getting data at a high rate from a real-time
source, and cannot be slowed down or interrupted.
eCos’s infrastructure module provides a
tracing formalism, allowing the
kernel’s tracing macros to be configured in many useful
ways. eCos’s kernel provides instrumentation
buffers which also collect specific
(configurable) data about the system’s history and
performance.
To use eCos’s tracing facilities you must first
configure your system to use tracing.
You should enable the Asserts and Tracing component
(CYGPKG_INFRA_DEBUG) and the
Use tracing component within it
(CYGDBG_USE_TRACING). These
options can be enabled with the Configuration
Tool or by editing the file
BUILD_DIR/pkgconf/infra.h
manually.
You should then examine all the tracing-related options in
the Package: Infrastructure chapter of the eCos Reference
Manual. One useful set of configuration options are: CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS and CYGDBG_INFRA_DEBUG_TRACE_MESSAGE,
which are both enabled by default when tracing is enabled.