diff --git a/modules/hal_nordic/nrfx/nrfx_glue.h b/modules/hal_nordic/nrfx/nrfx_glue.h index 6fef79ab101..eeb1ef89c1f 100644 --- a/modules/hal_nordic/nrfx/nrfx_glue.h +++ b/modules/hal_nordic/nrfx/nrfx_glue.h @@ -275,8 +275,14 @@ void nrfx_busy_wait(uint32_t usec_to_wait); #define NRFX_GPIOTE_CHANNELS_USED NRFX_GPIOTE_CHANNELS_USED_BY_BT_CTLR #if defined(CONFIG_BT_CTLR) -#include <../subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_resources.h> - +/* + * The enabled Bluetooth controller subsystem is responsible for providing + * definitions of the BT_CTLR_USED_* symbols used below in a file named + * bt_ctlr_used_resources.h and for adding its location to global include + * paths so that the file can be included here for all Zephyr libraries that + * are to be built. + */ +#include #define NRFX_PPI_CHANNELS_USED_BY_BT_CTLR BT_CTLR_USED_PPI_CHANNELS #define NRFX_PPI_GROUPS_USED_BY_BT_CTLR BT_CTLR_USED_PPI_GROUPS #define NRFX_GPIOTE_CHANNELS_USED_BY_BT_CTLR BT_CTLR_USED_GPIOTE_CHANNELS diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_resources.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/nrfx_glue/bt_ctlr_used_resources.h similarity index 96% rename from subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_resources.h rename to subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/nrfx_glue/bt_ctlr_used_resources.h index cc67a11ee6f..a9c5fb216a7 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_resources.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/nrfx_glue/bt_ctlr_used_resources.h @@ -3,12 +3,12 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#include "radio_nrf5_fem.h" +#include "../radio/radio_nrf5_fem.h" #ifdef DPPI_PRESENT -#include "radio_nrf5_dppi_resources.h" +#include "../radio/radio_nrf5_dppi_resources.h" #else -#include "radio_nrf5_ppi_resources.h" +#include "../radio/radio_nrf5_ppi_resources.h" #endif #if defined(HAL_RADIO_GPIO_HAVE_PA_PIN) || \ diff --git a/subsys/bluetooth/controller/ll_sw/nrf.cmake b/subsys/bluetooth/controller/ll_sw/nrf.cmake index 249c3e5c589..546e2e7531a 100644 --- a/subsys/bluetooth/controller/ll_sw/nrf.cmake +++ b/subsys/bluetooth/controller/ll_sw/nrf.cmake @@ -100,3 +100,9 @@ zephyr_library_include_directories( ll_sw/nordic hci/nordic ) + +# This path needs to be added globally as it is supposed to be used +# in nrfx_glue.h when other libraries are built. +zephyr_include_directories( + ll_sw/nordic/hal/nrf5/nrfx_glue +)