|
5 | 5 | # SPDX-License-Identifier: Apache-2.0 |
6 | 6 |
|
7 | 7 | if(CONFIG_HAS_STM32LIB) |
8 | | - if(CONFIG_BT_STM32_IPM) |
9 | | - zephyr_include_directories(stm32wb/hci) |
10 | | - |
11 | | - zephyr_sources(stm32wb/hci/hw_ipcc.c) |
12 | | - zephyr_sources(stm32wb/hci/shci.c) |
13 | | - zephyr_sources(stm32wb/hci/shci_tl.c) |
14 | | - zephyr_sources(stm32wb/hci/shci_tl_if.c) |
15 | | - zephyr_sources(stm32wb/hci/stm_list.c) |
16 | | - zephyr_sources(stm32wb/hci/tl_mbox.c) |
17 | | - |
18 | | - endif() |
19 | | - |
20 | | - if(CONFIG_BT_STM32WBA) |
21 | | - |
22 | | - if(DEFINED CONFIG_BOARD_NUCLEO_WBA52CG) |
23 | | - message(FATAL_ERROR "BLE library is not compatible with nucleo_wba52cg") |
24 | | - endif() |
25 | | - |
26 | | - zephyr_compile_definitions( -DBLE ) |
27 | | - |
28 | | - zephyr_include_directories(stm32wba/hci) |
29 | | - zephyr_include_directories(stm32wba/hci/ll) |
30 | | - |
31 | | - zephyr_sources(stm32wba/hci/ll_sys_cs.c) |
32 | | - zephyr_sources(stm32wba/hci/ll_sys_intf.c) |
33 | | - zephyr_sources(stm32wba/hci/ll_sys_dp_slp.c) |
34 | | - zephyr_sources(stm32wba/hci/ll_sys_startup.c) |
35 | | - zephyr_sources(stm32wba/hci/RTDebug.c) |
36 | | - zephyr_sources(stm32wba/hci/hw_pka.c) |
37 | | - zephyr_sources(stm32wba/hci/pka_p256.c) |
38 | | - zephyr_sources(stm32wba/hci/bpka.c) |
39 | | - zephyr_sources(stm32wba/hci/power_table.c) |
40 | | - zephyr_sources(stm32wba/hci/scm.c) |
41 | | - zephyr_sources(stm32wba/hci/log_module.c) |
42 | | - zephyr_sources(stm32wba/hci/linklayer_plat.c) |
43 | | - zephyr_sources(stm32wba/hci/ll_sys_if.c) |
44 | | - if(CONFIG_FLASH) |
45 | | - zephyr_sources(stm32wba/hci/flash_manager.c) |
46 | | - zephyr_sources(stm32wba/hci/flash_driver.c) |
47 | | - zephyr_sources(stm32wba/hci/stm_list.c) |
48 | | - zephyr_sources(stm32wba/hci/rf_timing_synchro.c) |
49 | | - endif() |
50 | | - |
51 | | - set(STM32WBA_BLE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../zephyr/blobs/stm32wba/lib) |
52 | | - set(STM32WBA_BLE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/stm32wba/hci) |
53 | | - |
54 | | - add_library(stm32wba_ble_lib STATIC IMPORTED GLOBAL) |
55 | | - add_library(stm32wba_ll_lib STATIC IMPORTED GLOBAL) |
56 | | - |
57 | | - add_dependencies( |
58 | | - stm32wba_ble_lib |
59 | | - stm32wba_ll_lib |
60 | | - ) |
61 | | - set_target_properties( |
62 | | - stm32wba_ble_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_BLE_LIB_DIR}/stm32wba_ble_stack_llo.a |
63 | | - ) |
64 | | - set_target_properties( |
65 | | - stm32wba_ll_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_BLE_LIB_DIR}/LinkLayer_BLE_Full_lib.a |
66 | | - ) |
67 | | - |
68 | | - set_target_properties(stm32wba_ble_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_BLE_INCLUDE_DIR}) |
69 | | - set_target_properties(stm32wba_ll_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_BLE_INCLUDE_DIR}) |
70 | | - |
71 | | - target_link_libraries(app PUBLIC stm32wba_ble_lib) |
72 | | - target_link_libraries(app PUBLIC stm32wba_ll_lib) |
73 | | - |
74 | | - endif() |
| 8 | + add_subdirectory_ifdef(CONFIG_BT_STM32_IPM stm32wb) |
| 9 | + add_subdirectory_ifdef(CONFIG_BT_STM32WBA stm32wba) |
75 | 10 | add_subdirectory_ifdef(CONFIG_BT_STM32WB0 stm32wb0) |
76 | 11 | endif() |
0 commit comments