Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@
/modules/openthread/ @nrfconnect/ncs-thread
/modules/trusted-firmware-m/ @nrfconnect/ncs-aegir
/modules/wfa-qt/ @nrfconnect/ncs-wifi
/modules/hal_nordic/ @nrfconnect/ncs-code-owners @rob-robinson-14 @Hi-Im-David

# Samples
/samples/CMakeLists.txt @nrfconnect/ncs-co-build-system
Expand Down
9 changes: 9 additions & 0 deletions modules/hal_nordic/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
if(NOT DEFINED NRFX_DIR)
set(NRFX_DIR ${ZEPHYR_CURRENT_MODULE_DIR}/nrfx/ CACHE PATH "nrfx Directory")
endif()

zephyr_include_directories_ifdef(CONFIG_HAS_NRFX .)
add_subdirectory(${ZEPHYR_BASE}/modules/hal_nordic ${CMAKE_CURRENT_BINARY_DIR}/modules/hal_nordic)
add_subdirectory_ifdef(CONFIG_HAS_NRFX nrfx)
24 changes: 24 additions & 0 deletions modules/hal_nordic/nrfx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

zephyr_library_amend(${ZEPHYR_NRF_MODULE_DIR})

set(mdk_dir ${NRFX_DIR}/mdk)

# Add definitions for products which are yet to be upstreamed.
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF7120_ENGA NRF7120_ENGA_XXAA)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF7120_ENGA_CPUAPP NRF_APPLICATION)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF7120_ENGA_CPUFLPR NRF_FLPR)
zephyr_compile_definitions_ifdef(CONFIG_SOC_COMPATIBLE_NRF7120_ENGA NRF7120_ENGA_XXAA)
zephyr_compile_definitions_ifdef(CONFIG_SOC_COMPATIBLE_NRF7120_ENGA_CPUAPP NRF_APPLICATION)

zephyr_library_sources_ifdef(CONFIG_SOC_NRF7120_ENGA ${mdk_dir}/system_nrf7120_enga.c)

mdk_svd_ifdef(CONFIG_SOC_NRF7120_ENGA_CPUAPP nrf7120_enga_application.svd)
mdk_svd_ifdef(CONFIG_SOC_NRF7120_ENGA_CPUFLPR nrf7120_enga_flpr.svd)

if(CONFIG_SOC_NRF7120_ENGA_CPUAPP)
dt_prop(clock_frequency PATH "/cpus/cpu@0" PROPERTY "clock-frequency")
math(EXPR clock_frequency_mhz "${clock_frequency} / 1000000")
zephyr_compile_definitions("NRF_CONFIG_CPU_FREQ_MHZ=${clock_frequency_mhz}")
endif()
20 changes: 20 additions & 0 deletions modules/hal_nordic/nrfx_config_ext.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#ifndef NRFX_CONFIG_EXT_H__
#define NRFX_CONFIG_EXT_H__

/* Include nrfx_config_nrf*.h for products which are yet to be upstreamed. */

#if (defined(NRF7120_ENGA_XXAA) && defined(NRF_APPLICATION))
#include "templates/nrfx_config_nrf7120_enga_application.h"
#elif (defined(NRF7120_ENGA_XXAA)) && defined(NRF_FLPR)
#include"templates/nrfx_config_nrf7120_enga_flpr.h"
#else
#error "Unknown device."
#endif

#endif /* NRFX_CONFIG_EXT_H__ */
1 change: 1 addition & 0 deletions modules/modules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(ZEPHYR_AZURE_SDK_FOR_C_KCONFIG ${CMAKE_CURRENT_LIST_DIR}/azure-sdk-for-c/Kco
set(ZEPHYR_AZURE_SDK_FOR_C_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR}/azure-sdk-for-c)
set(ZEPHYR_OPENTHREAD_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR}/openthread)
set(ZEPHYR_OPENTHREAD_KCONFIG ${CMAKE_CURRENT_LIST_DIR}/openthread/Kconfig)
set(ZEPHYR_HAL_NORDIC_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR}/hal_nordic)

# Those are modules with Kconfig tree's inside the module repo but where
# nRF Connect SDK extend those trees.
Expand Down