Orbcode Trace functions library
|
This library provides C/C++ functions for configuring ARM Cortex-M trace components.
Following features are supported:
All functions are available as header-only library depending only on CMSIS core_cmXX.h
header provided by MCU vendor. Once library is available (see Installation section below) it can be used in application code as follow:
Refer to documentation of each module for details how each component is configured and what functionalities are available.
Warning: Currently libtrace
is optimistic when it comes to MCU capabilities. For devices with limited trace features it is possible for libtrace
to generate invalid configuration. If that happens, please let us know by submitting issue and we will try to adapt library.
As library is header only it is straightforward to use with any build system.
For projects using CMake it is recommended to use FetchContent
to download libtrace
library and include it in build system automatically.
Fetch library:
Include Orbcode::Trace
as dependency:
Other build system must download libtrace
manually (git submodule, wget, etc) and add folder libs/trace/include
to include directories in compiler command line:
Although for end-user this library can be treated as header-only with no build steps required, for development of library itself it is useful to be able to generate proper build system.
Simple command line for using Ninja generator:
Following options are availble:
ORBCODE_LIBTRACE_BUILD_TEST
(default: OFF
) - compile simple test files to make sure that header files are correct (useful for detecting syntax errors). When this option is enable toolchain capable for compiling for ARM Cortex-M is required (e.g. arm-none-eabi-gcc with -mmcu=cortex-m3
)ORBCODE_LIBTRACE_DOCS
(default: OFF
) - build Doxygen documentation (requires Doxygen)