Tracing: TRACING_NONE Compilation Fix

Fixed several compilation errors that resulted from selecting
TRACING without specifying a tracing system (Tracerecorder,
CTF, Systemview). In this case (TRACING_NONE), some default trace hooks
(in tracing.h) were incorrectly named resulting in compilation errors.
The legacy sys_trace_isr_enter, sys_trace_isr_exit, and sys_trace_idle
also caused problems since these were only given as defines, resulting
in undefined reference errors since they are required by the assembly
files calling these. To solve this issue I've added a stub file
"tracing_none.c" (only compiled if TRACING_NONE) and declared the
functions in tracing.h if no tracing system is selected.

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>
This commit is contained in:
Torbjörn Leksell 2021-05-27 09:28:46 +02:00 committed by Kumar Gala
commit 22071d613c
3 changed files with 74 additions and 35 deletions

View file

@ -39,6 +39,11 @@ zephyr_sources_ifdef(
endif()
if(NOT CONFIG_PERCEPIO_TRACERECORDER AND NOT CONFIG_TRACING_CTF
AND NOT CONFIG_SEGGER_SYSTEMVIEW AND NOT CONFIG_TRACING_TEST)
zephyr_sources(tracing_none.c)
endif()
zephyr_include_directories_ifdef(
CONFIG_TRACING
${ZEPHYR_BASE}/kernel/include