Bluetooth: Controller: Build vendor LLL as library
Build vendor LLL as separate library so that independent compiler flags can be supplied if required. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
f1011b3c82
commit
7bd2804c24
7 changed files with 214 additions and 183 deletions
|
|
@ -7,6 +7,7 @@ if(CONFIG_BT_CTLR_ADVANCED_FEATURES)
|
|||
endif()
|
||||
|
||||
zephyr_library()
|
||||
zephyr_library_link_libraries(subsys__bluetooth)
|
||||
|
||||
zephyr_library_sources(
|
||||
util/mem.c
|
||||
|
|
@ -165,17 +166,6 @@ zephyr_library_sources_ifdef(
|
|||
flash/soc_flash_nrf_ticker.c
|
||||
)
|
||||
|
||||
add_subdirectory_ifdef(
|
||||
CONFIG_BT_CTLR_COEX_DRIVERS
|
||||
coex
|
||||
)
|
||||
|
||||
if(CONFIG_SOC_COMPATIBLE_NRF)
|
||||
include(ll_sw/nrf.cmake)
|
||||
elseif(CONFIG_SOC_OPENISA_RV32M1_RISCV32)
|
||||
include(ll_sw/openisa.cmake)
|
||||
endif()
|
||||
|
||||
zephyr_library_include_directories(
|
||||
.
|
||||
include
|
||||
|
|
@ -191,9 +181,34 @@ zephyr_library_include_directories_ifdef(
|
|||
${ZEPHYR_BASE}/drivers/flash
|
||||
)
|
||||
|
||||
zephyr_library_include_directories_ifdef(
|
||||
CONFIG_SOC_COMPATIBLE_NRF
|
||||
ll_sw/nordic
|
||||
hci/nordic
|
||||
)
|
||||
|
||||
zephyr_library_include_directories_ifdef(
|
||||
CONFIG_SOC_OPENISA_RV32M1_RISCV32
|
||||
ll_sw/openisa
|
||||
hci/openisa
|
||||
)
|
||||
|
||||
add_subdirectory_ifdef(
|
||||
CONFIG_BT_CTLR_COEX_DRIVERS
|
||||
coex
|
||||
)
|
||||
|
||||
add_subdirectory_ifdef(
|
||||
CONFIG_SOC_COMPATIBLE_NRF
|
||||
ll_sw/nordic
|
||||
)
|
||||
|
||||
add_subdirectory_ifdef(
|
||||
CONFIG_SOC_OPENISA_RV32M1_RISCV32
|
||||
ll_sw/openisa
|
||||
)
|
||||
|
||||
zephyr_library_compile_options_ifdef(
|
||||
CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED
|
||||
${OPTIMIZE_FOR_SPEED_FLAG}
|
||||
)
|
||||
|
||||
zephyr_library_link_libraries(subsys__bluetooth)
|
||||
|
|
|
|||
117
subsys/bluetooth/controller/ll_sw/nordic/CMakeLists.txt
Normal file
117
subsys/bluetooth/controller/ll_sw/nordic/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_library()
|
||||
zephyr_library_link_libraries(subsys__bluetooth)
|
||||
|
||||
zephyr_library_sources(
|
||||
lll/lll.c
|
||||
lll/lll_clock.c
|
||||
)
|
||||
if (CONFIG_BT_BROADCASTER)
|
||||
zephyr_library_sources(
|
||||
lll/lll_adv.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ADV_EXT
|
||||
lll/lll_adv_aux.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ADV_PERIODIC
|
||||
lll/lll_adv_sync.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ADV_ISO
|
||||
lll/lll_adv_iso.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_OBSERVER)
|
||||
zephyr_library_sources(
|
||||
lll/lll_scan.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ADV_EXT
|
||||
lll/lll_scan_aux.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_SYNC_PERIODIC
|
||||
lll/lll_sync.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_SYNC_ISO
|
||||
lll/lll_sync_iso.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_CONN)
|
||||
zephyr_library_sources(
|
||||
lll/lll_conn.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_PERIPHERAL
|
||||
lll/lll_peripheral.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CENTRAL
|
||||
lll/lll_central.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_CTLR_CONN_ISO)
|
||||
zephyr_library_sources(
|
||||
lll/lll_conn_iso.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_CENTRAL_ISO
|
||||
lll/lll_central_iso.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_PERIPHERAL_ISO
|
||||
lll/lll_peripheral_iso.c
|
||||
)
|
||||
endif()
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_DF
|
||||
lll/lll_df.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_DTM
|
||||
lll/lll_test.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_PROFILE_ISR
|
||||
lll/lll_prof.c
|
||||
)
|
||||
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ISO_VENDOR_DATA_PATH
|
||||
ull/ull_iso_vendor.c
|
||||
)
|
||||
|
||||
zephyr_library_sources(
|
||||
hal/nrf5/cntr.c
|
||||
hal/nrf5/ecb.c
|
||||
hal/nrf5/radio/radio.c
|
||||
hal/nrf5/mayfly.c
|
||||
hal/nrf5/ticker.c
|
||||
)
|
||||
if(CONFIG_BT_CTLR_DF AND NOT CONFIG_SOC_SERIES_BSIM_NRFXX)
|
||||
zephyr_library_sources(
|
||||
hal/nrf5/radio/radio_df.c
|
||||
)
|
||||
endif()
|
||||
|
||||
zephyr_library_include_directories(
|
||||
.
|
||||
../../../controller
|
||||
../../../controller/ll_sw
|
||||
../../../controller/include
|
||||
)
|
||||
|
||||
# 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(
|
||||
hal/nrf5/nrfx_glue
|
||||
)
|
||||
|
||||
zephyr_library_compile_options_ifdef(
|
||||
CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED
|
||||
${OPTIMIZE_FOR_SPEED_FLAG}
|
||||
)
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(CONFIG_BT_LL_SW_SPLIT)
|
||||
zephyr_library_sources(
|
||||
ll_sw/nordic/lll/lll.c
|
||||
ll_sw/nordic/lll/lll_clock.c
|
||||
)
|
||||
if(CONFIG_BT_BROADCASTER)
|
||||
zephyr_library_sources(
|
||||
ll_sw/nordic/lll/lll_adv.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ADV_EXT
|
||||
ll_sw/nordic/lll/lll_adv_aux.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ADV_PERIODIC
|
||||
ll_sw/nordic/lll/lll_adv_sync.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ADV_ISO
|
||||
ll_sw/nordic/lll/lll_adv_iso.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_OBSERVER)
|
||||
zephyr_library_sources(
|
||||
ll_sw/nordic/lll/lll_scan.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_ADV_EXT
|
||||
ll_sw/nordic/lll/lll_scan_aux.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_SYNC_PERIODIC
|
||||
ll_sw/nordic/lll/lll_sync.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_SYNC_ISO
|
||||
ll_sw/nordic/lll/lll_sync_iso.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_CONN)
|
||||
zephyr_library_sources(
|
||||
ll_sw/nordic/lll/lll_conn.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_PERIPHERAL
|
||||
ll_sw/nordic/lll/lll_peripheral.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CENTRAL
|
||||
ll_sw/nordic/lll/lll_central.c
|
||||
)
|
||||
endif()
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_DTM
|
||||
ll_sw/nordic/lll/lll_test.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_PROFILE_ISR
|
||||
ll_sw/nordic/lll/lll_prof.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_DF
|
||||
ll_sw/nordic/lll/lll_df.c
|
||||
)
|
||||
if(CONFIG_BT_CTLR_DF AND NOT CONFIG_SOC_SERIES_BSIM_NRFXX)
|
||||
zephyr_library_sources(ll_sw/nordic/hal/nrf5/radio/radio_df.c)
|
||||
endif()
|
||||
if(CONFIG_BT_CTLR_CONN_ISO)
|
||||
zephyr_library_sources(
|
||||
ll_sw/nordic/lll/lll_conn_iso.c
|
||||
)
|
||||
endif()
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_CENTRAL_ISO
|
||||
ll_sw/nordic/lll/lll_central_iso.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_PERIPHERAL_ISO
|
||||
ll_sw/nordic/lll/lll_peripheral_iso.c
|
||||
)
|
||||
if(CONFIG_BT_CTLR_ISO_VENDOR_DATA_PATH)
|
||||
zephyr_library_sources(
|
||||
ll_sw/nordic/ull/ull_iso_vendor.c
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
zephyr_library_sources(
|
||||
ll_sw/nordic/hal/nrf5/cntr.c
|
||||
ll_sw/nordic/hal/nrf5/ecb.c
|
||||
ll_sw/nordic/hal/nrf5/radio/radio.c
|
||||
ll_sw/nordic/hal/nrf5/mayfly.c
|
||||
ll_sw/nordic/hal/nrf5/ticker.c
|
||||
)
|
||||
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_SOC_FAMILY_NRF
|
||||
hci/nordic/hci_vendor.c
|
||||
)
|
||||
|
||||
zephyr_library_include_directories(
|
||||
ll_sw
|
||||
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
|
||||
)
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(CONFIG_BT_LL_SW_SPLIT)
|
||||
zephyr_library_sources(
|
||||
ll_sw/openisa/lll/lll.c
|
||||
)
|
||||
if(CONFIG_BT_BROADCASTER)
|
||||
zephyr_library_sources(
|
||||
ll_sw/openisa/lll/lll_adv.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_OBSERVER)
|
||||
zephyr_library_sources(
|
||||
ll_sw/openisa/lll/lll_scan.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_CONN)
|
||||
zephyr_library_sources(
|
||||
ll_sw/openisa/lll/lll_clock.c
|
||||
ll_sw/openisa/lll/lll_conn.c
|
||||
)
|
||||
if(CONFIG_BT_PERIPHERAL)
|
||||
zephyr_library_sources(
|
||||
ll_sw/openisa/lll/lll_peripheral.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_CENTRAL)
|
||||
zephyr_library_sources(
|
||||
ll_sw/openisa/lll/lll_central.c
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_DTM
|
||||
ll_sw/openisa/lll/lll_test.c
|
||||
)
|
||||
endif()
|
||||
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_SOC_OPENISA_RV32M1_RISCV32
|
||||
ll_sw/openisa/hal/RV32M1/cntr.c
|
||||
ll_sw/openisa/hal/RV32M1/ecb.c
|
||||
ll_sw/openisa/hal/RV32M1/radio/radio.c
|
||||
ll_sw/openisa/hal/RV32M1/mayfly.c
|
||||
ll_sw/openisa/hal/RV32M1/ticker.c
|
||||
)
|
||||
|
||||
if(CONFIG_SOC_OPENISA_RV32M1_RISCV32)
|
||||
zephyr_library_include_directories(
|
||||
ll_sw
|
||||
ll_sw/openisa
|
||||
hci/openisa
|
||||
)
|
||||
endif()
|
||||
59
subsys/bluetooth/controller/ll_sw/openisa/CMakeLists.txt
Normal file
59
subsys/bluetooth/controller/ll_sw/openisa/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_library()
|
||||
zephyr_library_link_libraries(subsys__bluetooth)
|
||||
|
||||
zephyr_library_sources(
|
||||
lll/lll.c
|
||||
)
|
||||
if(CONFIG_BT_BROADCASTER)
|
||||
zephyr_library_sources(
|
||||
lll/lll_adv.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_OBSERVER)
|
||||
zephyr_library_sources(
|
||||
lll/lll_scan.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_CONN)
|
||||
zephyr_library_sources(
|
||||
lll/lll_clock.c
|
||||
lll/lll_conn.c
|
||||
)
|
||||
if(CONFIG_BT_PERIPHERAL)
|
||||
zephyr_library_sources(
|
||||
lll/lll_peripheral.c
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BT_CENTRAL)
|
||||
zephyr_library_sources(
|
||||
lll/lll_central.c
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_DTM
|
||||
lll/lll_test.c
|
||||
)
|
||||
|
||||
zephyr_library_sources(
|
||||
hal/RV32M1/cntr.c
|
||||
hal/RV32M1/ecb.c
|
||||
hal/RV32M1/radio/radio.c
|
||||
hal/RV32M1/mayfly.c
|
||||
hal/RV32M1/ticker.c
|
||||
)
|
||||
|
||||
zephyr_library_include_directories(
|
||||
.
|
||||
../../../controller
|
||||
../../../controller/ll_sw
|
||||
../../../controller/include
|
||||
)
|
||||
|
||||
zephyr_library_compile_options_ifdef(
|
||||
CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED
|
||||
${OPTIMIZE_FOR_SPEED_FLAG}
|
||||
)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016 Nordic Semiconductor ASA
|
||||
* Copyright (c) 2016-2024 Nordic Semiconductor ASA
|
||||
* Copyright (c) 2016 Vinayak Kariappa Chettimada
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "hal/RV32M1/cpu.h"
|
||||
Loading…
Reference in a new issue