From d47bd60933cced9a008e5400b4a3ba2539f4906c Mon Sep 17 00:00:00 2001 From: Gregers Gram Rygg Date: Wed, 22 Sep 2021 14:45:35 +0200 Subject: [PATCH] soc: nordic_nrf: Add Kconfig option for enabling trace port Add Kconfig option to enable the hardware trace port in the SystemInit() function. Signed-off-by: Gregers Gram Rygg --- modules/hal_nordic/nrfx/CMakeLists.txt | 2 ++ soc/arm/nordic_nrf/Kconfig | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index 9af6ee81929..4860f1ea371 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -38,6 +38,8 @@ zephyr_compile_definitions_ifdef(CONFIG_NRF_SECURE_APPROTECT_LOCK ENABLE_SECURE_APPROTECT) zephyr_compile_definitions_ifdef(CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING ENABLE_SECURE_APPROTECT_USER_HANDLING) +zephyr_library_compile_definitions_ifdef(CONFIG_NRF_TRACE_PORT + ENABLE_TRACE) # Connect Kconfig compilation option for Non-Secure software with option required by MDK/nrfx zephyr_compile_definitions_ifdef(CONFIG_ARM_NONSECURE_FIRMWARE NRF_TRUSTZONE_NONSECURE) diff --git a/soc/arm/nordic_nrf/Kconfig b/soc/arm/nordic_nrf/Kconfig index 96a5e6c4029..5e527899f4b 100644 --- a/soc/arm/nordic_nrf/Kconfig +++ b/soc/arm/nordic_nrf/Kconfig @@ -119,4 +119,12 @@ config NRF_SECURE_APPROTECT_USER_HANDLING endchoice +config NRF_TRACE_PORT + bool "Enable nRF TPIU" + depends on !SOC_SERIES_NRF51X + help + Enable this option to initialize the TPIU (Trace Port Interface + Unit) for tracing using a hardware probe. If disabled, the trace + pins will be used as GPIO. + endif # SOC_FAMILY_NRF