2
2
#
3
3
# SPDX-License-Identifier: Apache-2.0
4
4
5
- zephyr_compile_definitions( -DBLE )
6
-
7
- zephyr_include_directories(BLE_TransparentMode/Core/Inc)
8
- zephyr_include_directories(BLE_TransparentMode/STM32_WPAN/Target )
9
- zephyr_include_directories(BLE_TransparentMode/System /Config/Debug_GPIO)
10
- zephyr_include_directories(BLE_TransparentMode/System /Config/Log )
11
5
zephyr_include_directories(Common/WPAN/Interfaces)
12
6
zephyr_include_directories(Common/WPAN/Modules)
13
7
zephyr_include_directories(Common/WPAN/Modules/Flash)
14
8
zephyr_include_directories(Common/WPAN/Modules/RTDebug)
15
9
zephyr_include_directories(Common/WPAN/Modules/Log )
16
- zephyr_include_directories(STM32_WPAN)
17
- zephyr_include_directories(STM32_WPAN/ble/stack/include )
18
- zephyr_include_directories(STM32_WPAN/ble/stack/include /auto)
19
- zephyr_include_directories(STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full)
20
- zephyr_include_directories(STM32_WPAN/link_layer/ll_cmd_lib/inc)
21
- zephyr_include_directories(STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files)
22
- zephyr_include_directories(STM32_WPAN/link_layer/ll_sys/inc)
23
10
zephyr_include_directories(Utilities/misc)
24
11
zephyr_include_directories(Utilities/tim_serv)
25
12
zephyr_include_directories(Utilities/trace/adv_trace)
13
+ zephyr_include_directories(STM32_WPAN)
14
+
26
15
27
- zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target /bpka.c)
28
- zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target /linklayer_plat.c)
29
- zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target /ll_sys_if.c)
30
- zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target /power_table.c)
31
16
zephyr_sources(Common/WPAN/Modules/Log /log_module.c)
32
17
zephyr_sources(Common/WPAN/Interfaces/hw_pka.c)
33
18
zephyr_sources(Common/WPAN/Interfaces/hw_pka_p256.c)
34
19
zephyr_sources(Common/WPAN/Modules/RTDebug/RTDebug.c)
35
- zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_cs.c)
36
- zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_dp_slp.c)
37
- zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c)
38
- zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_startup.c)
20
+
39
21
40
22
if (CONFIG_FLASH)
41
23
zephyr_sources(Common/WPAN/Modules/Flash/flash_manager.c)
@@ -44,6 +26,9 @@ if(CONFIG_FLASH)
44
26
zephyr_sources(Common/WPAN/Modules/Flash/rf_timing_synchro.c)
45
27
endif ()
46
28
29
+ set (STM32WBA_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR} /../../zephyr/blobs/stm32wba/lib)
30
+
31
+ # select the type of BLE library
47
32
if (CONFIG_BT_EXT_ADV
48
33
OR (CONFIG_BT_PER_ADV OR CONFIG_BT_PER_ADV_SYNC)
49
34
OR CONFIG_BT_SCA_UPDATE
@@ -63,25 +48,21 @@ else()
63
48
set (BLE_LIB_TYPE "BLE_LIB_BASIC" )
64
49
endif ()
65
50
66
-
67
- set (STM32WBA_BLE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR} /../../zephyr/blobs/stm32wba/lib)
68
51
set (STM32WBA_BLE_LIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /STM32_WPAN/ble/stack)
69
- set (STM32WBA_LL_LIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /STM32_WPAN/link_layer/ll_cmd_lib)
70
52
71
53
add_library (stm32wba_ble_lib STATIC IMPORTED GLOBAL )
72
- add_library (stm32wba_ll_lib STATIC IMPORTED GLOBAL )
73
54
74
55
add_dependencies (
75
56
stm32wba_ble_lib
76
57
stm32wba_ll_lib
77
58
)
78
59
if (BLE_LIB_TYPE STREQUAL "BLE_LIB_BASIC" )
79
60
set_target_properties (
80
- stm32wba_ble_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_BLE_LIB_DIR } /stm32wba_ble_stack_llobasic.a
61
+ stm32wba_ble_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_LIB_DIR } /stm32wba_ble_stack_llobasic.a
81
62
)
82
63
elseif (BLE_LIB_TYPE STREQUAL "BLE_LIB_FULL" )
83
64
set_target_properties (
84
- stm32wba_ble_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_BLE_LIB_DIR } /stm32wba_ble_stack_llo.a
65
+ stm32wba_ble_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_LIB_DIR } /stm32wba_ble_stack_llo.a
85
66
)
86
67
endif ()
87
68
@@ -90,9 +71,13 @@ if(NOT CONFIG_BT_STM32WBA_USE_TEMP_BASED_CALIB)
90
71
zephyr_compile_definitions( -DUSE_TEMPERATURE_BASED_RADIO_CALIBRATION=0 )
91
72
endif ()
92
73
93
- # Selecting the proper version of link layer lib according the soc
94
- # Checking all the soc variants and not simply relying on board name
74
+ # Using the selected version of ble lib
75
+ set_target_properties (stm32wba_ble_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_BLE_LIB_INCLUDE_DIR} )
95
76
77
+ target_link_libraries (app PUBLIC stm32wba_ble_lib)
78
+
79
+ # Selecting the proper version of link layer lib
80
+ # Checking all the soc variants and not simply relying on board name
96
81
if (CONFIG_SOC_STM32WBA65XX)
97
82
message (STATUS "STM32WBA6 link layer lib selected" )
98
83
if (BLE_LIB_TYPE STREQUAL "BLE_LIB_BASIC" )
@@ -111,10 +96,12 @@ if(CONFIG_SOC_STM32WBA55XX OR SOC_STM32WBA52XX)
111
96
endif ()
112
97
endif ()
113
98
114
- # Using the selected version of link layer lib
115
- set_target_properties (stm32wba_ll_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_BLE_LIB_DIR} / ${LL_LIB} )
116
- set_target_properties (stm32wba_ble_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_BLE_LIB_INCLUDE_DIR } )
99
+ add_library (stm32wba_ll_lib STATIC IMPORTED GLOBAL )
100
+ set (STM32WBA_LL_LIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /STM32_WPAN/link_layer/ll_cmd_lib )
101
+ set_target_properties (stm32wba_ll_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_LIB_DIR} / ${LL_LIB } )
117
102
set_target_properties (stm32wba_ll_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_LL_LIB_INCLUDE_DIR} )
118
-
119
- target_link_libraries (app PUBLIC stm32wba_ble_lib)
120
103
target_link_libraries (app PUBLIC stm32wba_ll_lib)
104
+
105
+ add_subdirectory (STM32_WPAN)
106
+
107
+ add_subdirectory_ifdef(CONFIG_BT_STM32WBA ble)
0 commit comments