tracing: fix conflict with RTT locking

Make custom RTT locking configurable and select it where it is needed.
When using RTT for tracing we want to use the default locking.

Update both segger and tracerecorder modules to support that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-05-20 10:27:13 -04:00 committed by Kumar Gala
commit 108129cf7d
5 changed files with 10 additions and 2 deletions

View file

@ -16,6 +16,11 @@ config USE_SEGGER_RTT
if USE_SEGGER_RTT
config SEGGER_RTT_CUSTOM_LOCKING
bool "Enable custom locking"
help
Enable custom locking using a mutex.
config SEGGER_RTT_MAX_NUM_UP_BUFFERS
int "Maximum number of up-buffers"
default 3

View file

@ -6,6 +6,7 @@
menuconfig UART_RTT
bool "Enable UART RTT driver"
depends on USE_SEGGER_RTT
select SEGGER_RTT_CUSTOM_LOCKING
help
This option enables access RTT channel as UART device.

View file

@ -89,6 +89,7 @@ config LOG_BACKEND_RTT
bool "Enable Segger J-Link RTT backend"
depends on USE_SEGGER_RTT
default y if !SHELL_BACKEND_RTT
select SEGGER_RTT_CUSTOM_LOCKING
help
When enabled, backend will use RTT for logging. This backend works on a per
message basis. Only a whole message (terminated with a carriage return: '\r')

View file

@ -45,6 +45,7 @@ config SEGGER_SYSTEMVIEW
select RTT_CONSOLE
select USE_SEGGER_RTT
select THREAD_MONITOR
select SEGGER_RTT_CUSTOM_LOCKING
config TRACING_CTF
bool "Tracing via Common Trace Format support"

View file

@ -112,7 +112,7 @@ manifest:
revision: 385e19da1ae15f27872c2543b97276a42f102ead
path: modules/lib/openthread
- name: segger
revision: 2aa031c081426dcd0626185af45c40bd05811b68
revision: 7d78f7121dc4c59396c12e60e34f3617bac5efcb
path: modules/debug/segger
- name: sof
revision: 779f28ed465c03899c8a7d4aaf399856f4e51158
@ -134,7 +134,7 @@ manifest:
revision: a47e326ca772ddd14cc3b9d4ca30a9ab44ecca16
- name: TraceRecorderSource
path: modules/debug/TraceRecorder
revision: 41daf89c15ff841ed63fa882a916ec97089141ce
revision: d9889883abb4657d71e15ff055517a9b032f8212
- name: hal_xtensa
revision: 2f04b615cd5ad3a1b8abef33f9bdd10cc1990ed6
path: modules/hal/xtensa