|
145 | 145 | ], |
146 | 146 | } |
147 | 147 |
|
| 148 | +wb0_ble_transparent_mode_app_path = "Projects/NUCLEO-WB09KE/Applications/BLE/" \ |
| 149 | + + "BLE_TransparentMode" |
| 150 | + |
| 151 | +file_list_wb0 = { |
| 152 | + "STM32_BLE": [ |
| 153 | + "Middlewares/ST/STM32_BLE/ble.h", |
| 154 | + "Middlewares/ST/STM32_BLE/stack/config/ble_stack_user_cfg.c", |
| 155 | + "Middlewares/ST/STM32_BLE/stack/include/ble_api.h", |
| 156 | + "Middlewares/ST/STM32_BLE/stack/include/ble_const.h", |
| 157 | + "Middlewares/ST/STM32_BLE/stack/include/ble_events.h", |
| 158 | + "Middlewares/ST/STM32_BLE/stack/include/ble_gatt.h", |
| 159 | + "Middlewares/ST/STM32_BLE/stack/include/bleplat_cntr.h", |
| 160 | + "Middlewares/ST/STM32_BLE/stack/include/bleplat.h", |
| 161 | + "Middlewares/ST/STM32_BLE/stack/include/ble_stack.h", |
| 162 | + "Middlewares/ST/STM32_BLE/stack/include/ble_stack_user_cfg.h", |
| 163 | + "Middlewares/ST/STM32_BLE/stack/include/ble_status.h", |
| 164 | + "Middlewares/ST/STM32_BLE/stack/include/ble_types.h", |
| 165 | + "Middlewares/ST/STM32_BLE/stack/include/uuid.h", |
| 166 | + ], |
| 167 | + "BLE_TransparentMode": [ |
| 168 | + wb0_ble_transparent_mode_app_path + "/Core/Inc/app_common.h", |
| 169 | + wb0_ble_transparent_mode_app_path + "/Core/Inc/app_conf.h", |
| 170 | + wb0_ble_transparent_mode_app_path + "/Core/Src/stm32wb0x_hal_msp.c", |
| 171 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/aci_adv_nwk.c", |
| 172 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/aci_adv_nwk.h", |
| 173 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/aci_gatt_nwk.h", |
| 174 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/aci_l2cap_nwk.h", |
| 175 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/adv_buff_alloc.c", |
| 176 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/adv_buff_alloc.h", |
| 177 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/adv_buff_alloc_tiny.c", |
| 178 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/adv_buff_alloc_tiny.h", |
| 179 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/app_ble.h", |
| 180 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/ble_conf.h", |
| 181 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dm_alloc.c", |
| 182 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dm_alloc.h", |
| 183 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dtm_burst.h", |
| 184 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dtm_cmd_db.c", |
| 185 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dtm_cmd_db.h", |
| 186 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dtm_cmd_en.h", |
| 187 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dtm_cmds.c", |
| 188 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dtm_cmd_stack_en.h", |
| 189 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dtm_preprocess_events.c", |
| 190 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/dtm_preprocess_events.h", |
| 191 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/fifo.h", |
| 192 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/hci_parser.h", |
| 193 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/pawr_buff_alloc.c", |
| 194 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/pawr_buff_alloc.h", |
| 195 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/transport_layer.c", |
| 196 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/App/transport_layer.h", |
| 197 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/Target/bleplat.c", |
| 198 | + wb0_ble_transparent_mode_app_path + "/STM32_BLE/Target/bleplat_cntr.c", |
| 199 | + ], |
| 200 | + "Common": [ |
| 201 | + "Projects/Common/BLE/Interfaces/hw_aes.c", |
| 202 | + "Projects/Common/BLE/Interfaces/hw_aes.h", |
| 203 | + "Projects/Common/BLE/Interfaces/hw_pka.c", |
| 204 | + "Projects/Common/BLE/Interfaces/hw_pka.h", |
| 205 | + "Projects/Common/BLE/Interfaces/hw_rng.c", |
| 206 | + "Projects/Common/BLE/Interfaces/hw_rng.h", |
| 207 | + "Projects/Common/BLE/Modules/asm.h", |
| 208 | + "Projects/Common/BLE/Modules/blue_unit_conversion.s", |
| 209 | + "Projects/Common/BLE/Modules/compiler.h", |
| 210 | + "Projects/Common/BLE/Modules/crash_handler.h", |
| 211 | + "Projects/Common/BLE/Modules/miscutil.c", |
| 212 | + "Projects/Common/BLE/Modules/miscutil.h", |
| 213 | + "Projects/Common/BLE/Modules/osal.h", |
| 214 | + "Projects/Common/BLE/Modules/osal_memcpy.s", |
| 215 | + "Projects/Common/BLE/Modules/PKAMGR/Inc/pka_manager.h", |
| 216 | + "Projects/Common/BLE/Modules/PKAMGR/Src/pka_manager.c", |
| 217 | + "Projects/Common/BLE/Modules/RADIO_utils/Inc/RADIO_utils.h", |
| 218 | + "Projects/Common/BLE/Modules/RADIO_utils/Src/RADIO_utils.c", |
| 219 | + ], |
| 220 | +} |
148 | 221 |
|
149 | 222 | def os_cmd(cmd, cwd=None, shell=False): |
150 | 223 | """Execute a command with subprocess.check_call() |
@@ -193,15 +266,25 @@ def copy_ble_lib_files(src_repo_path, dest_lib_path, stm32_serie): |
193 | 266 | logging.error("Abort") |
194 | 267 | sys.exit() |
195 | 268 |
|
196 | | - elif stm32_serie == "stm32wba": |
| 269 | + elif stm32_serie in ["stm32wba", "stm32wb0"]: |
| 270 | + |
| 271 | + if stm32_serie == "stm32wba": |
| 272 | + target_file_list = file_list_wba |
| 273 | + elif stm32_serie == "stm32wb0": |
| 274 | + target_file_list = file_list_wb0 |
| 275 | + else: |
| 276 | + logging.error(f"File : Unexpected series {stm32_serie}") |
| 277 | + logging.error("Abort") |
| 278 | + sys.exit() |
| 279 | + |
197 | 280 | # Remove existing *.c and *.h files |
198 | 281 | for root, _, files in os.walk(dest_lib_path): |
199 | 282 | for file in files: |
200 | 283 | if file.endswith(".c") or file.endswith(".h"): |
201 | 284 | os.remove(os.path.join(root, file)) |
202 | 285 |
|
203 | | - for dir_name in file_list_wba: |
204 | | - for file in file_list_wba[dir_name]: |
| 286 | + for dir_name in target_file_list: |
| 287 | + for file in target_file_list[dir_name]: |
205 | 288 | # Src file path to be copied |
206 | 289 | src_file_path = Path(src_repo_path / file) |
207 | 290 | if src_file_path.exists(): |
|
0 commit comments