These files are taken from the SEGGER RTT source examples. They are here because:
- In order not to lock interrupts out for the sake of logging we modify the locks around the logging parts to be RTOS locks rather than critical section locks.
- In the Nordic version of
SEGGER_RTT_Conf.h
SEGGER_RTT_LOCK()
/SEGGER_RTT_UNLOCK()
are defined directly (i.e. without#ifdef
s around them) to be critical section locks; hence we need to use a modified version ofSEGGER_RTT_Conf.h
. - The inclusion of
SEGGER_RTT_Conf.h
, viaSEGGER_RTT.h
, is done with quoted includes rather than angle-bracket includes, which means that a header file found in the same directory takes priority, irrespective of the include paths passed to the compiler, and all the.c
and.h
files are in the same directory. - Hence, to modify
SEGGER_RTT_LOCK()
/SEGGER_RTT_UNLOCK()
, theSEGGER_RTT_Syscalls_*.c
files have to be copied locally, so we might as well use the oiginal SEGGER version and avoid getting tangled up in nRF5 SDK #defines.