From cbb2a9be77ab2bff284a651ef4b1da84d10dfd09 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 1 May 2021 23:10:54 +0200 Subject: [PATCH] logging: Enable SWO support for nRF SOCs The nRF SOCs declare support for SWO using the HAS_SWO define. In addition, the SWO pin has to be configured at runtime, which is done through the Nordic HAL by defining ENABLE_SWO. Signed-off-by: Aurelien Jarno --- modules/hal_nordic/nrfx/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index 727bcaac69..f5738391eb 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -29,6 +29,7 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9160 NRF9160_XXAA) # 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) +zephyr_compile_definitions_ifdef(CONFIG_LOG_BACKEND_SWO ENABLE_SWO) zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_NRF51X ${MDK_DIR}/system_nrf51.c) zephyr_library_sources_ifdef(CONFIG_SOC_NRF52805 ${MDK_DIR}/system_nrf52805.c)