Skip to content

Commit

Permalink
[nrf fromtree] modules: hal_nordic: nrfx: Move some defines back to C…
Browse files Browse the repository at this point in the history
…MakeLists

534916c2253 moved some defines from CMakeLists.txt to nrfx_kconfig.h
but those defines are used by MDK which does not include nrfx_kconfig.h
and that broke some nrf platforms (e.g. nrf54l20). Moving those
defines back to CMakeLists.txt.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 738549e)
  • Loading branch information
nordic-krch authored and nika-nordic committed Feb 21, 2025
1 parent 5527f26 commit bbcb577
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
10 changes: 10 additions & 0 deletions modules/hal_nordic/nrfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ if(CONFIG_SOC_NRF54L_CPUAPP_COMMON)
zephyr_compile_definitions("NRF_CONFIG_CPU_FREQ_MHZ=${clock_frequency_mhz}")
endif()

zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_SKIP_CLOCK_CONFIG NRF_SKIP_CLOCK_CONFIGURATION)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_DISABLE_FICR_TRIMCNF NRF_DISABLE_FICR_TRIMCNF)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE NRF_SKIP_GLITCHDETECTOR_DISABLE)

# Inject code to skip TAMPC setup for nRF54L20 and nRF54L09. It is not supported for now.
# It needs to be removed when support is provided.
if(CONFIG_SOC_NRF54L20_ENGA_CPUAPP OR CONFIG_SOC_NRF54L09_ENGA_CPUAPP)
zephyr_compile_definitions(NRF_SKIP_TAMPC_SETUP)
endif()

if(CONFIG_SOC_COMPATIBLE_NRF54LX AND CONFIG_NRFX_GPPI)
zephyr_library_sources(${HELPERS_DIR}/nrfx_gppi_dppi_ppib_lumos.c)
zephyr_library_sources(${NRFX_DIR}/soc/interconnect/dppic_ppib/nrfx_interconnect_dppic_ppib.c)
Expand Down
20 changes: 0 additions & 20 deletions modules/hal_nordic/nrfx/nrfx_kconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -964,26 +964,6 @@
CONFIG_NRF52_ANOMALY_109_WORKAROUND_EGU_INSTANCE
#endif

#ifdef CONFIG_SOC_NRF54LX_SKIP_CLOCK_CONFIG
#define NRF_SKIP_CLOCK_CONFIGURATION
#endif

#ifdef CONFIG_SOC_NRF54LX_DISABLE_FICR_TRIMCNF
#define NRF_DISABLE_FICR_TRIMCNF
#endif

#ifdef CONFIG_SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE
#define NRF_SKIP_GLITCHDETECTOR_DISABLE
#endif

/*
* Inject code to skip TAMPC setup for nRF54L20 and nRF54L09. It is not supported for now.
* It needs to be removed when support is provided.
*/
#if defined(CONFIG_SOC_NRF54L20_ENGA_CPUAPP) || defined(CONFIG_SOC_NRF54L09_ENGA_CPUAPP)
#define NRF_SKIP_TAMPC_SETUP
#endif

#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_dppic_global) || \
DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_dppic_local)
#ifndef NRFX_DPPI_ENABLED
Expand Down

0 comments on commit bbcb577

Please sign in to comment.