diff --git a/lib/stm32wb/hci/README b/lib/stm32wb/README similarity index 100% rename from lib/stm32wb/hci/README rename to lib/stm32wb/README diff --git a/lib/stm32wba/hci/app_common.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_common.h similarity index 100% rename from lib/stm32wba/hci/app_common.h rename to lib/stm32wba/BLE_TransparentMode/Core/Inc/app_common.h diff --git a/lib/stm32wba/hci/app_conf.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_conf.h similarity index 85% rename from lib/stm32wba/hci/app_conf.h rename to lib/stm32wba/BLE_TransparentMode/Core/Inc/app_conf.h index d19be4663..93c4a54e5 100644 --- a/lib/stm32wba/hci/app_conf.h +++ b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_conf.h @@ -35,71 +35,6 @@ ******************************************************************************/ /**< generic parameters ******************************************************/ -/** - * Define Tx Power - */ -#define CFG_TX_POWER (0x19) /* 0x19 <=> -0.3 dBm */ - -/** - * Definition of public BD Address, - * when CFG_BD_ADDRESS = 0x000000000000 the BD address is generated based on Unique Device Number. - */ -#define CFG_BD_ADDRESS (0x0000000000000) - -/** - * Define BD_ADDR type: define proper address. Can only be GAP_PUBLIC_ADDR (0x00) or GAP_STATIC_RANDOM_ADDR (0x01) - */ -#define CFG_BD_ADDRESS_DEVICE (GAP_PUBLIC_ADDR) - -/** - * Define privacy: PRIVACY_DISABLED or PRIVACY_ENABLED - */ -#define CFG_PRIVACY (PRIVACY_DISABLED) - -/** - * Define BLE Address Type - * Bluetooth address types defined in ble_legacy.h - * if CFG_PRIVACY equals PRIVACY_DISABLED, CFG_BLE_ADDRESS_TYPE has 2 allowed values: GAP_PUBLIC_ADDR or GAP_STATIC_RANDOM_ADDR - * if CFG_PRIVACY equals PRIVACY_ENABLED, CFG_BLE_ADDRESS_TYPE has 2 allowed values: GAP_RESOLVABLE_PRIVATE_ADDR or GAP_NON_RESOLVABLE_PRIVATE_ADDR - */ -#define CFG_BD_ADDRESS_TYPE (GAP_PUBLIC_ADDR) - -#define ADV_INTERVAL_MIN (0x0080) -#define ADV_INTERVAL_MAX (0x00A0) -#define ADV_LP_INTERVAL_MIN (0x0640) -#define ADV_LP_INTERVAL_MAX (0x0FA0) -#define ADV_TYPE ADV_IND -#define ADV_FILTER NO_WHITE_LIST_USE - -/** - * Define IO Authentication - */ -#define CFG_BONDING_MODE (1) -#define CFG_USED_FIXED_PIN (0) /* 0->fixed pin is used ; 1->No fixed pin used*/ -#define CFG_FIXED_PIN (111111) -#define CFG_ENCRYPTION_KEY_SIZE_MAX (16) -#define CFG_ENCRYPTION_KEY_SIZE_MIN (8) - -/** - * Define Input Output capabilities - */ -#define CFG_IO_CAPABILITY (IO_CAP_DISPLAY_YES_NO) - -/** - * Define Man In The Middle modes - */ -#define CFG_MITM_PROTECTION (MITM_PROTECTION_REQUIRED) - -/** - * Define Secure Connections Support - */ -#define CFG_SC_SUPPORT (SC_PAIRING_OPTIONAL) - -/** - * Define Keypress Notification Support - */ -#define CFG_KEYPRESS_NOTIFICATION_SUPPORT (KEYPRESS_NOT_SUPPORTED) - /** * Identity root key used to derive IRK and DHK(Legacy) */ @@ -228,7 +163,7 @@ * - 0 : Standby is not used, so stop mode 1 is used as low power mode. * ******************************************************************************/ -#define CFG_LPM_LEVEL (2) +#define CFG_LPM_LEVEL (1) #define CFG_LPM_STDBY_SUPPORTED (1) /* Defines time to wake up from standby before radio event to meet timings */ @@ -248,6 +183,7 @@ typedef enum CFG_LPM_LOG, CFG_LPM_LL_DEEPSLEEP, CFG_LPM_LL_HW_RCO_CLBR, + CFG_LPM_APP_BLE, /* USER CODE BEGIN CFG_LPM_Id_t */ /* USER CODE END CFG_LPM_Id_t */ @@ -322,7 +258,12 @@ typedef enum { CFG_TASK_HW_RNG, CFG_TASK_LINK_LAYER, - CFG_TASK_HCI_ASYNCH_EVT_ID, + CFG_TASK_BLE_HCI_CMD_ID, + CFG_TASK_SYS_HCI_CMD_ID, + CFG_TASK_HCI_ACL_DATA_ID, + CFG_TASK_SYS_LOCAL_CMD_ID, + CFG_TASK_TX_TO_HOST_ID, + CFG_TASK_NOTIFY_EVENT_ID, CFG_TASK_TEMP_MEAS, CFG_TASK_BLE_HOST, CFG_TASK_AMM, @@ -333,8 +274,6 @@ typedef enum TASK_BUTTON_1, TASK_BUTTON_2, TASK_BUTTON_3, - CFG_TASK_MEAS_REQ_ID, - CFG_TASK_ADV_LP_REQ_ID, /* USER CODE END CFG_Task_Id_t */ CFG_TASK_NBR /* Shall be LAST in the list */ } CFG_Task_Id_t; @@ -360,17 +299,6 @@ typedef enum /* Sequencer configuration */ #define UTIL_SEQ_CONF_PRIO_NBR CFG_SEQ_PRIO_NBR -/** - * This is a bit mapping over 32bits listing all events id supported in the application - */ -typedef enum -{ - CFG_IDLEEVT_PROC_GAP_COMPLETE, - /* USER CODE BEGIN CFG_IdleEvt_Id_t */ - - /* USER CODE END CFG_IdleEvt_Id_t */ -} CFG_IdleEvt_Id_t; - /** * These are the lists of events id registered to the sequencer * Each event id shall be in the range [0:31] @@ -419,7 +347,7 @@ typedef enum * - 2 : Debugger available in low power mode. * ******************************************************************************/ -#define CFG_DEBUGGER_LEVEL (0) +#define CFG_DEBUGGER_LEVEL (2) /****************************************************************************** * RealTime GPIO debug module configuration @@ -464,7 +392,7 @@ typedef enum * 0 -> RF TX output level from -20 dBm to +10 dBm * 1 -> RF TX output level from -20 dBm to +3 dBm */ -#define CFG_RF_TX_POWER_TABLE_ID (1) +#define CFG_RF_TX_POWER_TABLE_ID (0) /* Custom LSE sleep clock accuracy to use if both conditions are met: * - LSE is selected as Link Layer sleep clock source @@ -511,7 +439,7 @@ typedef enum * When CFG_BUTTON_SUPPORTED is set, the push button are activated if requested */ -#define CFG_LED_SUPPORTED (0) +#define CFG_LED_SUPPORTED (1) #define CFG_BUTTON_SUPPORTED (1) /** diff --git a/lib/stm32wba/hci/app_entry.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_entry.h similarity index 98% rename from lib/stm32wba/hci/app_entry.h rename to lib/stm32wba/BLE_TransparentMode/Core/Inc/app_entry.h index bd1a7754e..91bc9c6c3 100644 --- a/lib/stm32wba/hci/app_entry.h +++ b/lib/stm32wba/BLE_TransparentMode/Core/Inc/app_entry.h @@ -42,7 +42,6 @@ extern "C" { /* Exported constants --------------------------------------------------------*/ #define WPAN_SUCCESS 0u -/* USER CODE BEGIN EC */ /****************************************************************************** * Information Table * @@ -56,9 +55,12 @@ extern "C" { ******************************************************************************/ #define CFG_FW_BUILD (0) #define CFG_FW_BRANCH (0) -#define CFG_FW_SUBVERSION (1) +#define CFG_FW_SUBVERSION (0) #define CFG_FW_MINOR_VERSION (4) #define CFG_FW_MAJOR_VERSION (1) + +/* USER CODE BEGIN EC */ + /* USER CODE END EC */ /* Exported variables --------------------------------------------------------*/ diff --git a/lib/stm32wba/hci/main.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/main.h similarity index 100% rename from lib/stm32wba/hci/main.h rename to lib/stm32wba/BLE_TransparentMode/Core/Inc/main.h diff --git a/lib/stm32wba/hci/utilities_conf.h b/lib/stm32wba/BLE_TransparentMode/Core/Inc/utilities_conf.h similarity index 100% rename from lib/stm32wba/hci/utilities_conf.h rename to lib/stm32wba/BLE_TransparentMode/Core/Inc/utilities_conf.h diff --git a/lib/stm32wba/hci/bpka.c b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/bpka.c similarity index 100% rename from lib/stm32wba/hci/bpka.c rename to lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/bpka.c diff --git a/lib/stm32wba/hci/bpka.h b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/bpka.h similarity index 100% rename from lib/stm32wba/hci/bpka.h rename to lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/bpka.h diff --git a/lib/stm32wba/hci/linklayer_plat.c b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c similarity index 100% rename from lib/stm32wba/hci/linklayer_plat.c rename to lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c diff --git a/lib/stm32wba/hci/ll_sys_if.c b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c similarity index 100% rename from lib/stm32wba/hci/ll_sys_if.c rename to lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c diff --git a/lib/stm32wba/hci/power_table.c b/lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/power_table.c similarity index 100% rename from lib/stm32wba/hci/power_table.c rename to lib/stm32wba/BLE_TransparentMode/STM32_WPAN/Target/power_table.c diff --git a/lib/stm32wba/hci/app_debug.h b/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/app_debug.h similarity index 100% rename from lib/stm32wba/hci/app_debug.h rename to lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/app_debug.h diff --git a/lib/stm32wba/hci/debug_config.h b/lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/debug_config.h similarity index 100% rename from lib/stm32wba/hci/debug_config.h rename to lib/stm32wba/BLE_TransparentMode/System/Config/Debug_GPIO/debug_config.h diff --git a/lib/stm32wba/hci/log_module.c b/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.c similarity index 100% rename from lib/stm32wba/hci/log_module.c rename to lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.c diff --git a/lib/stm32wba/hci/log_module.h b/lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.h similarity index 100% rename from lib/stm32wba/hci/log_module.h rename to lib/stm32wba/BLE_TransparentMode/System/Config/Log/log_module.h diff --git a/lib/stm32wba/hci/hw.h b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw.h similarity index 100% rename from lib/stm32wba/hci/hw.h rename to lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw.h diff --git a/lib/stm32wba/hci/hw_aes.c b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_aes.c similarity index 100% rename from lib/stm32wba/hci/hw_aes.c rename to lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_aes.c diff --git a/lib/stm32wba/hci/hw_if.h b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_if.h similarity index 100% rename from lib/stm32wba/hci/hw_if.h rename to lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_if.h diff --git a/lib/stm32wba/hci/hw_pka.c b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka.c similarity index 100% rename from lib/stm32wba/hci/hw_pka.c rename to lib/stm32wba/BLE_TransparentMode/System/Interfaces/hw_pka.c diff --git a/lib/stm32wba/hci/pka_p256.c b/lib/stm32wba/BLE_TransparentMode/System/Interfaces/pka_p256.c similarity index 100% rename from lib/stm32wba/hci/pka_p256.c rename to lib/stm32wba/BLE_TransparentMode/System/Interfaces/pka_p256.c diff --git a/lib/stm32wba/hci/flash_driver.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.c similarity index 100% rename from lib/stm32wba/hci/flash_driver.c rename to lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.c diff --git a/lib/stm32wba/hci/flash_driver.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.h similarity index 100% rename from lib/stm32wba/hci/flash_driver.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_driver.h diff --git a/lib/stm32wba/hci/flash_manager.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.c similarity index 100% rename from lib/stm32wba/hci/flash_manager.c rename to lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.c diff --git a/lib/stm32wba/hci/flash_manager.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.h similarity index 100% rename from lib/stm32wba/hci/flash_manager.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/flash_manager.h diff --git a/lib/stm32wba/hci/rf_timing_synchro.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.c similarity index 100% rename from lib/stm32wba/hci/rf_timing_synchro.c rename to lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.c diff --git a/lib/stm32wba/hci/rf_timing_synchro.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.h similarity index 100% rename from lib/stm32wba/hci/rf_timing_synchro.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.h diff --git a/lib/stm32wba/hci/RTDebug.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c similarity index 100% rename from lib/stm32wba/hci/RTDebug.c rename to lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c diff --git a/lib/stm32wba/hci/RTDebug.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.h similarity index 100% rename from lib/stm32wba/hci/RTDebug.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.h diff --git a/lib/stm32wba/hci/debug_signals.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/debug_signals.h similarity index 100% rename from lib/stm32wba/hci/debug_signals.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/debug_signals.h diff --git a/lib/stm32wba/hci/local_debug_tables.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/local_debug_tables.h similarity index 100% rename from lib/stm32wba/hci/local_debug_tables.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/RTDebug/local_debug_tables.h diff --git a/lib/stm32wba/hci/scm.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.c similarity index 100% rename from lib/stm32wba/hci/scm.c rename to lib/stm32wba/BLE_TransparentMode/System/Modules/scm.c diff --git a/lib/stm32wba/hci/scm.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/scm.h similarity index 100% rename from lib/stm32wba/hci/scm.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/scm.h diff --git a/lib/stm32wba/hci/stm_list.c b/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.c similarity index 100% rename from lib/stm32wba/hci/stm_list.c rename to lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.c diff --git a/lib/stm32wba/hci/stm_list.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.h similarity index 100% rename from lib/stm32wba/hci/stm_list.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/stm_list.h diff --git a/lib/stm32wba/hci/utilities_common.h b/lib/stm32wba/BLE_TransparentMode/System/Modules/utilities_common.h similarity index 100% rename from lib/stm32wba/hci/utilities_common.h rename to lib/stm32wba/BLE_TransparentMode/System/Modules/utilities_common.h diff --git a/lib/stm32wba/CMakeLists.txt b/lib/stm32wba/CMakeLists.txt index 214fc80a0..eca5399df 100644 --- a/lib/stm32wba/CMakeLists.txt +++ b/lib/stm32wba/CMakeLists.txt @@ -8,31 +8,49 @@ endif() zephyr_compile_definitions( -DBLE ) -zephyr_include_directories(hci) -zephyr_include_directories(hci/ll) - -zephyr_sources(hci/ll_sys_cs.c) -zephyr_sources(hci/ll_sys_intf.c) -zephyr_sources(hci/ll_sys_dp_slp.c) -zephyr_sources(hci/ll_sys_startup.c) -zephyr_sources(hci/RTDebug.c) -zephyr_sources(hci/hw_pka.c) -zephyr_sources(hci/pka_p256.c) -zephyr_sources(hci/bpka.c) -zephyr_sources(hci/power_table.c) -zephyr_sources(hci/scm.c) -zephyr_sources(hci/log_module.c) -zephyr_sources(hci/linklayer_plat.c) -zephyr_sources(hci/ll_sys_if.c) +zephyr_include_directories(BLE_TransparentMode/Core/Inc) +zephyr_include_directories(BLE_TransparentMode/STM32_WPAN/Target) +zephyr_include_directories(BLE_TransparentMode/System/Config/Debug_GPIO) +zephyr_include_directories(BLE_TransparentMode/System/Config/Log) +zephyr_include_directories(BLE_TransparentMode/System/Interfaces) +zephyr_include_directories(BLE_TransparentMode/System/Modules) +zephyr_include_directories(BLE_TransparentMode/System/Modules/Flash) +zephyr_include_directories(BLE_TransparentMode/System/Modules/RTDebug) +zephyr_include_directories(STM32_WPAN) +zephyr_include_directories(STM32_WPAN/ble/stack/include) +zephyr_include_directories(STM32_WPAN/ble/stack/include/auto) +zephyr_include_directories(STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full) +zephyr_include_directories(STM32_WPAN/link_layer/ll_cmd_lib/inc) +zephyr_include_directories(STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files) +zephyr_include_directories(STM32_WPAN/link_layer/ll_sys/inc) +zephyr_include_directories(Utilities/misc) +zephyr_include_directories(Utilities/tim_serv) +zephyr_include_directories(Utilities/trace/adv_trace) + +zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target/bpka.c) +zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c) +zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c) +zephyr_sources(BLE_TransparentMode/STM32_WPAN/Target/power_table.c) +zephyr_sources(BLE_TransparentMode/System/Config/Log/log_module.c) +zephyr_sources(BLE_TransparentMode/System/Interfaces/hw_pka.c) +zephyr_sources(BLE_TransparentMode/System/Interfaces/pka_p256.c) +zephyr_sources(BLE_TransparentMode/System/Modules/scm.c) +zephyr_sources(BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c) +zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_cs.c) +zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_dp_slp.c) +zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c) +zephyr_sources(STM32_WPAN/link_layer/ll_sys/src/ll_sys_startup.c) + if(CONFIG_FLASH) - zephyr_sources(hci/flash_manager.c) - zephyr_sources(hci/flash_driver.c) - zephyr_sources(hci/stm_list.c) - zephyr_sources(hci/rf_timing_synchro.c) + zephyr_sources(BLE_TransparentMode/System/Modules/Flash/flash_manager.c) + zephyr_sources(BLE_TransparentMode/System/Modules/Flash/flash_driver.c) + zephyr_sources(BLE_TransparentMode/System/Modules/stm_list.c) + zephyr_sources(BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.c) endif() set(STM32WBA_BLE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../zephyr/blobs/stm32wba/lib) -set(STM32WBA_BLE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/hci) +set(STM32WBA_BLE_LIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/STM32_WPAN/ble/stack) +set(STM32WBA_LL_LIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/STM32_WPAN/link_layer/ll_cmd_lib) add_library(stm32wba_ble_lib STATIC IMPORTED GLOBAL) add_library(stm32wba_ll_lib STATIC IMPORTED GLOBAL) @@ -48,8 +66,8 @@ set_target_properties( stm32wba_ll_lib PROPERTIES IMPORTED_LOCATION ${STM32WBA_BLE_LIB_DIR}/LinkLayer_BLE_Full_lib.a ) -set_target_properties(stm32wba_ble_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_BLE_INCLUDE_DIR}) -set_target_properties(stm32wba_ll_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_BLE_INCLUDE_DIR}) +set_target_properties(stm32wba_ble_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_BLE_LIB_INCLUDE_DIR}) +set_target_properties(stm32wba_ll_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${STM32WBA_LL_LIB_INCLUDE_DIR}) target_link_libraries(app PUBLIC stm32wba_ble_lib) target_link_libraries(app PUBLIC stm32wba_ll_lib) diff --git a/lib/stm32wba/hci/LICENSE.md b/lib/stm32wba/LICENSE.md similarity index 100% rename from lib/stm32wba/hci/LICENSE.md rename to lib/stm32wba/LICENSE.md diff --git a/lib/stm32wba/hci/README b/lib/stm32wba/README similarity index 51% rename from lib/stm32wba/hci/README rename to lib/stm32wba/README index 38836f979..aeb66b11b 100644 --- a/lib/stm32wba/hci/README +++ b/lib/stm32wba/README @@ -43,40 +43,40 @@ Description: Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_startup.c Middlewares/ST/STM32_WPAN/link_layer/ll_sys/inc/ll_sys_startup.h Middlewares/ST/STM32_WPAN/stm32_wpan_common.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/Core/Inc/app_common.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/Core/Inc/app_conf.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/Core/Inc/app_entry.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/Core/Inc/utilities_conf.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/Core/Inc/main.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/Flash/rf_timing_synchro.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/Flash/rf_timing_synchro.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/Flash/flash_driver.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/Flash/flash_driver.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/Flash/flash_manager.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/Flash/flash_manager.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/RTDebug/debug_signals.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/RTDebug/RTDebug.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/RTDebug/RTDebug.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/RTDebug/local_debug_tables.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/scm.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/scm.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/stm_list.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/stm_list.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Modules/utilities_common.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Interfaces/hw.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Interfaces/hw_aes.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Interfaces/hw_if.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Interfaces/hw_pka.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Interfaces/pka_p256.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Config/Log/log_module.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Config/Log/log_module.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Config/Debug_GPIO/app_debug.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/System/Config/Debug_GPIO/debug_config.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/STM32_WPAN/Target/power_table.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/STM32_WPAN/Target/bpka.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/STM32_WPAN/Target/bpka.h - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/STM32_WPAN/Target/linklayer_plat.c - Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate/STM32_WPAN/Target/ll_sys_if.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/Core/Inc/app_common.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/Core/Inc/app_conf.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/Core/Inc/app_entry.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/Core/Inc/utilities_conf.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/Core/Inc/main.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/Flash/rf_timing_synchro.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/Flash/flash_driver.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/Flash/flash_driver.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/Flash/flash_manager.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/Flash/flash_manager.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/RTDebug/debug_signals.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/RTDebug/RTDebug.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/RTDebug/local_debug_tables.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/scm.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/scm.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/stm_list.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/stm_list.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Modules/utilities_common.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Interfaces/hw.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Interfaces/hw_aes.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Interfaces/hw_if.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Interfaces/hw_pka.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Interfaces/pka_p256.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Config/Log/log_module.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Config/Log/log_module.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Config/Debug_GPIO/app_debug.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/System/Config/Debug_GPIO/debug_config.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/power_table.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/bpka.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/bpka.h + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/linklayer_plat.c + Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_TransparentMode/STM32_WPAN/Target/ll_sys_if.c Utilities/trace/adv_trace/stm32_adv_trace.h Utilities/misc/stm32_mem.h Utilities/tim_serv/stm32_timer.h diff --git a/lib/stm32wba/hci/auto/ble_types.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/auto/ble_types.h similarity index 100% rename from lib/stm32wba/hci/auto/ble_types.h rename to lib/stm32wba/STM32_WPAN/ble/stack/include/auto/ble_types.h diff --git a/lib/stm32wba/hci/ble_bufsize.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/ble_bufsize.h similarity index 100% rename from lib/stm32wba/hci/ble_bufsize.h rename to lib/stm32wba/STM32_WPAN/ble/stack/include/ble_bufsize.h diff --git a/lib/stm32wba/hci/ble_const.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/ble_const.h similarity index 100% rename from lib/stm32wba/hci/ble_const.h rename to lib/stm32wba/STM32_WPAN/ble/stack/include/ble_const.h diff --git a/lib/stm32wba/hci/ble_defs.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/ble_defs.h similarity index 100% rename from lib/stm32wba/hci/ble_defs.h rename to lib/stm32wba/STM32_WPAN/ble/stack/include/ble_defs.h diff --git a/lib/stm32wba/hci/ble_std.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/ble_std.h similarity index 100% rename from lib/stm32wba/hci/ble_std.h rename to lib/stm32wba/STM32_WPAN/ble/stack/include/ble_std.h diff --git a/lib/stm32wba/hci/bleplat.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/bleplat.h similarity index 100% rename from lib/stm32wba/hci/bleplat.h rename to lib/stm32wba/STM32_WPAN/ble/stack/include/bleplat.h diff --git a/lib/stm32wba/hci/blestack.h b/lib/stm32wba/STM32_WPAN/ble/stack/include/blestack.h similarity index 100% rename from lib/stm32wba/hci/blestack.h rename to lib/stm32wba/STM32_WPAN/ble/stack/include/blestack.h diff --git a/lib/stm32wba/hci/ll/ll_fw_config.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/ll_fw_config.h similarity index 100% rename from lib/stm32wba/hci/ll/ll_fw_config.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/ll_fw_config.h diff --git a/lib/stm32wba/hci/ll/_40nm_reg_files/DWC_ble154combo.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files/DWC_ble154combo.h similarity index 100% rename from lib/stm32wba/hci/ll/_40nm_reg_files/DWC_ble154combo.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files/DWC_ble154combo.h diff --git a/lib/stm32wba/hci/ll/bsp.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/bsp.h similarity index 100% rename from lib/stm32wba/hci/ll/bsp.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/bsp.h diff --git a/lib/stm32wba/hci/ll/common_types.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/common_types.h similarity index 100% rename from lib/stm32wba/hci/ll/common_types.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/common_types.h diff --git a/lib/stm32wba/hci/ll/event_manager.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/event_manager.h similarity index 100% rename from lib/stm32wba/hci/ll/event_manager.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/event_manager.h diff --git a/lib/stm32wba/hci/ll/evnt_schdlr_gnrc_if.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/evnt_schdlr_gnrc_if.h similarity index 100% rename from lib/stm32wba/hci/ll/evnt_schdlr_gnrc_if.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/evnt_schdlr_gnrc_if.h diff --git a/lib/stm32wba/hci/ll/hci.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/hci.h similarity index 100% rename from lib/stm32wba/hci/ll/hci.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/hci.h diff --git a/lib/stm32wba/hci/ll/ll_intf.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf.h similarity index 100% rename from lib/stm32wba/hci/ll/ll_intf.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf.h diff --git a/lib/stm32wba/hci/ll_intf_cmn.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf_cmn.h similarity index 100% rename from lib/stm32wba/hci/ll_intf_cmn.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf_cmn.h diff --git a/lib/stm32wba/hci/ll/mem_intf.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/mem_intf.h similarity index 100% rename from lib/stm32wba/hci/ll/mem_intf.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/mem_intf.h diff --git a/lib/stm32wba/hci/ll/os_wrapper.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/os_wrapper.h similarity index 100% rename from lib/stm32wba/hci/ll/os_wrapper.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/os_wrapper.h diff --git a/lib/stm32wba/hci/ll/power_table.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/power_table.h similarity index 100% rename from lib/stm32wba/hci/ll/power_table.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/power_table.h diff --git a/lib/stm32wba/hci/pta.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/pta.h similarity index 100% rename from lib/stm32wba/hci/pta.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_cmd_lib/inc/pta.h diff --git a/lib/stm32wba/hci/linklayer_plat.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h similarity index 100% rename from lib/stm32wba/hci/linklayer_plat.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h diff --git a/lib/stm32wba/hci/ll_sys.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h similarity index 100% rename from lib/stm32wba/hci/ll_sys.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h diff --git a/lib/stm32wba/hci/ll_sys_startup.h b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys_startup.h similarity index 100% rename from lib/stm32wba/hci/ll_sys_startup.h rename to lib/stm32wba/STM32_WPAN/link_layer/ll_sys/inc/ll_sys_startup.h diff --git a/lib/stm32wba/hci/ll_sys_cs.c b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_cs.c similarity index 100% rename from lib/stm32wba/hci/ll_sys_cs.c rename to lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_cs.c diff --git a/lib/stm32wba/hci/ll_sys_dp_slp.c b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_dp_slp.c similarity index 100% rename from lib/stm32wba/hci/ll_sys_dp_slp.c rename to lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_dp_slp.c diff --git a/lib/stm32wba/hci/ll_sys_intf.c b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c similarity index 100% rename from lib/stm32wba/hci/ll_sys_intf.c rename to lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c diff --git a/lib/stm32wba/hci/ll_sys_startup.c b/lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_startup.c similarity index 100% rename from lib/stm32wba/hci/ll_sys_startup.c rename to lib/stm32wba/STM32_WPAN/link_layer/ll_sys/src/ll_sys_startup.c diff --git a/lib/stm32wba/hci/stm32_wpan_common.h b/lib/stm32wba/STM32_WPAN/stm32_wpan_common.h similarity index 100% rename from lib/stm32wba/hci/stm32_wpan_common.h rename to lib/stm32wba/STM32_WPAN/stm32_wpan_common.h diff --git a/lib/stm32wba/hci/stm32_mem.h b/lib/stm32wba/Utilities/misc/stm32_mem.h similarity index 100% rename from lib/stm32wba/hci/stm32_mem.h rename to lib/stm32wba/Utilities/misc/stm32_mem.h diff --git a/lib/stm32wba/hci/stm32_tiny_vsnprintf.h b/lib/stm32wba/Utilities/misc/stm32_tiny_vsnprintf.h similarity index 100% rename from lib/stm32wba/hci/stm32_tiny_vsnprintf.h rename to lib/stm32wba/Utilities/misc/stm32_tiny_vsnprintf.h diff --git a/lib/stm32wba/hci/stm32_timer.h b/lib/stm32wba/Utilities/tim_serv/stm32_timer.h similarity index 100% rename from lib/stm32wba/hci/stm32_timer.h rename to lib/stm32wba/Utilities/tim_serv/stm32_timer.h diff --git a/lib/stm32wba/hci/stm32_adv_trace.h b/lib/stm32wba/Utilities/trace/adv_trace/stm32_adv_trace.h similarity index 100% rename from lib/stm32wba/hci/stm32_adv_trace.h rename to lib/stm32wba/Utilities/trace/adv_trace/stm32_adv_trace.h diff --git a/scripts/ble_library.py b/scripts/ble_library.py index 618e73fe9..bda339f72 100644 --- a/scripts/ble_library.py +++ b/scripts/ble_library.py @@ -39,81 +39,83 @@ + "tl_dbg_conf.h", ] -ble_heartrate_app_path = "Projects/NUCLEO-WBA55CG/Applications/BLE/BLE_HeartRate" - +ble_transparent_mode_app_path = "Projects/NUCLEO-WBA55CG/Applications/BLE/" \ + + "BLE_TransparentMode" file_list_wba = { - "auto": ["Middlewares/ST/STM32_WPAN/ble/stack/include/auto/ble_types.h", - ], - "reg_files": ["Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files/" - + "DWC_ble154combo.h", - ], - "ll": ["Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/bsp.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/common_types.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/event_manager.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/evnt_schdlr_gnrc_if.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/hci.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/mem_intf.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/os_wrapper.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/power_table.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/pta.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/" - + "ll_fw_config.h", - ], - "hci": ["Middlewares/ST/STM32_WPAN/ble/stack/include/ble_bufsize.h", - "Middlewares/ST/STM32_WPAN/ble/stack/include/ble_const.h", - "Middlewares/ST/STM32_WPAN/ble/stack/include/ble_defs.h", - "Middlewares/ST/STM32_WPAN/ble/stack/include/ble_std.h", - "Middlewares/ST/STM32_WPAN/ble/stack/include/bleplat.h", - "Middlewares/ST/STM32_WPAN/ble/stack/include/blestack.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h", - "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_cs.c", - "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_dp_slp.c", - "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c", - "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_startup.c", - "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/inc/ll_sys_startup.h", - "Middlewares/ST/STM32_WPAN/stm32_wpan_common.h", - "Middlewares/ST/STM32_WPAN/ll_intf_cmn.h", - ble_heartrate_app_path + "/Core/Inc/app_common.h", - ble_heartrate_app_path + "/Core/Inc/app_conf.h", - ble_heartrate_app_path + "/Core/Inc/app_entry.h", - ble_heartrate_app_path + "/Core/Inc/utilities_conf.h", - ble_heartrate_app_path + "/Core/Inc/main.h", - ble_heartrate_app_path + "/System/Modules/Flash/rf_timing_synchro.c", - ble_heartrate_app_path + "/System/Modules/Flash/rf_timing_synchro.h", - ble_heartrate_app_path + "/System/Modules/Flash/flash_driver.c", - ble_heartrate_app_path + "/System/Modules/Flash/flash_driver.h", - ble_heartrate_app_path + "/System/Modules/Flash/flash_manager.c", - ble_heartrate_app_path + "/System/Modules/Flash/flash_manager.h", - ble_heartrate_app_path + "/System/Modules/RTDebug/debug_signals.h", - ble_heartrate_app_path + "/System/Modules/RTDebug/RTDebug.c", - ble_heartrate_app_path + "/System/Modules/RTDebug/RTDebug.h", - ble_heartrate_app_path + "/System/Modules/RTDebug/local_debug_tables.h", - ble_heartrate_app_path + "/System/Modules/scm.c", - ble_heartrate_app_path + "/System/Modules/scm.h", - ble_heartrate_app_path + "/System/Modules/stm_list.c", - ble_heartrate_app_path + "/System/Modules/stm_list.h", - ble_heartrate_app_path + "/System/Modules/utilities_common.h", - ble_heartrate_app_path + "/System/Interfaces/hw.h", - ble_heartrate_app_path + "/System/Interfaces/hw_aes.c", - ble_heartrate_app_path + "/System/Interfaces/hw_if.h", - ble_heartrate_app_path + "/System/Interfaces/hw_pka.c", - ble_heartrate_app_path + "/System/Interfaces/pka_p256.c", - ble_heartrate_app_path + "/System/Config/Log/log_module.c", - ble_heartrate_app_path + "/System/Config/Log/log_module.h", - ble_heartrate_app_path + "/System/Config/Debug_GPIO/app_debug.h", - ble_heartrate_app_path + "/System/Config/Debug_GPIO/debug_config.h", - ble_heartrate_app_path + "/STM32_WPAN/Target/power_table.c", - ble_heartrate_app_path + "/STM32_WPAN/Target/bpka.c", - ble_heartrate_app_path + "/STM32_WPAN/Target/bpka.h", - ble_heartrate_app_path + "/STM32_WPAN/Target/linklayer_plat.c", - ble_heartrate_app_path + "/STM32_WPAN/Target/ll_sys_if.c", - "Utilities/trace/adv_trace/stm32_adv_trace.h", - "Utilities/misc/stm32_mem.h", - "Utilities/tim_serv/stm32_timer.h", - "Utilities/misc/stm32_tiny_vsnprintf.h", - ], + "STM32_WPAN": [ + "Middlewares/ST/STM32_WPAN/ble/stack/include/auto/ble_types.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/_40nm_reg_files/" + + "DWC_ble154combo.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/bsp.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/common_types.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/event_manager.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/evnt_schdlr_gnrc_if.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/hci.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/ll_intf_cmn.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/mem_intf.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/os_wrapper.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/power_table.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/inc/pta.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/config/ble_full/" + + "ll_fw_config.h", + "Middlewares/ST/STM32_WPAN/ble/stack/include/ble_bufsize.h", + "Middlewares/ST/STM32_WPAN/ble/stack/include/ble_const.h", + "Middlewares/ST/STM32_WPAN/ble/stack/include/ble_defs.h", + "Middlewares/ST/STM32_WPAN/ble/stack/include/ble_std.h", + "Middlewares/ST/STM32_WPAN/ble/stack/include/bleplat.h", + "Middlewares/ST/STM32_WPAN/ble/stack/include/blestack.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/inc/linklayer_plat.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/inc/ll_sys.h", + "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_cs.c", + "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_dp_slp.c", + "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_intf.c", + "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/src/ll_sys_startup.c", + "Middlewares/ST/STM32_WPAN/link_layer/ll_sys/inc/ll_sys_startup.h", + "Middlewares/ST/STM32_WPAN/stm32_wpan_common.h", + ], + "BLE_TransparentMode": [ + ble_transparent_mode_app_path + "/Core/Inc/app_common.h", + ble_transparent_mode_app_path + "/Core/Inc/app_conf.h", + ble_transparent_mode_app_path + "/Core/Inc/app_entry.h", + ble_transparent_mode_app_path + "/Core/Inc/utilities_conf.h", + ble_transparent_mode_app_path + "/Core/Inc/main.h", + ble_transparent_mode_app_path + "/System/Modules/Flash/rf_timing_synchro.c", + ble_transparent_mode_app_path + "/System/Modules/Flash/rf_timing_synchro.h", + ble_transparent_mode_app_path + "/System/Modules/Flash/flash_driver.c", + ble_transparent_mode_app_path + "/System/Modules/Flash/flash_driver.h", + ble_transparent_mode_app_path + "/System/Modules/Flash/flash_manager.c", + ble_transparent_mode_app_path + "/System/Modules/Flash/flash_manager.h", + ble_transparent_mode_app_path + "/System/Modules/RTDebug/debug_signals.h", + ble_transparent_mode_app_path + "/System/Modules/RTDebug/RTDebug.c", + ble_transparent_mode_app_path + "/System/Modules/RTDebug/RTDebug.h", + ble_transparent_mode_app_path + "/System/Modules/RTDebug/local_debug_tables.h", + ble_transparent_mode_app_path + "/System/Modules/scm.c", + ble_transparent_mode_app_path + "/System/Modules/scm.h", + ble_transparent_mode_app_path + "/System/Modules/stm_list.c", + ble_transparent_mode_app_path + "/System/Modules/stm_list.h", + ble_transparent_mode_app_path + "/System/Modules/utilities_common.h", + ble_transparent_mode_app_path + "/System/Interfaces/hw.h", + ble_transparent_mode_app_path + "/System/Interfaces/hw_aes.c", + ble_transparent_mode_app_path + "/System/Interfaces/hw_if.h", + ble_transparent_mode_app_path + "/System/Interfaces/hw_pka.c", + ble_transparent_mode_app_path + "/System/Interfaces/pka_p256.c", + ble_transparent_mode_app_path + "/System/Config/Log/log_module.c", + ble_transparent_mode_app_path + "/System/Config/Log/log_module.h", + ble_transparent_mode_app_path + "/System/Config/Debug_GPIO/app_debug.h", + ble_transparent_mode_app_path + "/System/Config/Debug_GPIO/debug_config.h", + ble_transparent_mode_app_path + "/STM32_WPAN/Target/power_table.c", + ble_transparent_mode_app_path + "/STM32_WPAN/Target/bpka.c", + ble_transparent_mode_app_path + "/STM32_WPAN/Target/bpka.h", + ble_transparent_mode_app_path + "/STM32_WPAN/Target/linklayer_plat.c", + ble_transparent_mode_app_path + "/STM32_WPAN/Target/ll_sys_if.c", + ], + "Utilities": [ + "Utilities/trace/adv_trace/stm32_adv_trace.h", + "Utilities/misc/stm32_mem.h", + "Utilities/tim_serv/stm32_timer.h", + "Utilities/misc/stm32_tiny_vsnprintf.h", + ], } @@ -138,56 +140,55 @@ def os_cmd(cmd, cwd=None, shell=False): ) -def copy_hci_files(src_repo_path, dest_lib_path, stm32_serie): - """Copy sources files from Cube Firmware to zephyr""" - # remove existing *.c and *.h files - hci_path = Path(dest_lib_path / "hci") - if hci_path.exists(): - for item in os.listdir(hci_path): - if item.endswith(".c") or item.endswith(".h"): - os.remove(hci_path / item) - +def copy_ble_lib_files(src_repo_path, dest_lib_path, stm32_serie): + """Copy BLE lib related files from Cube Firmware to hal_stm32""" if stm32_serie == "stm32wb": + # Remove existing *.c and *.h files + hci_path = Path(dest_lib_path / "hci") + if hci_path.exists(): + for item in os.listdir(hci_path): + if item.endswith(".c") or item.endswith(".h"): + os.remove(hci_path / item) + + # Create hci folder if does not exist if not hci_path.exists(): hci_path.mkdir(parents=True) + # Copy files for file in file_list_wb: - file_path = Path(src_repo_path / file) - file_name = file_path.name - if file_path.exists(): + src_file_path = Path(src_repo_path / file) + file_name = src_file_path.name + if src_file_path.exists(): # copy each file to destination - shutil.copy(file_path, Path(hci_path / file_name)) + shutil.copy(src_file_path, Path(hci_path / file_name)) else: - logging.error(f"File : {file_path} not found") + logging.error(f"File : {src_file_path} not found") logging.error("Abort") sys.exit() elif stm32_serie == "stm32wba": - # remove existing *.c and *.h files - auto_path = Path(hci_path / "auto") - ll_path = Path(hci_path / "ll") - reg_files_path = Path(ll_path / "_40nm_reg_files") - dir_paths = {"hci": hci_path, "auto": auto_path, "ll": ll_path, - "reg_files": reg_files_path} - - for dir_path in [auto_path, ll_path, reg_files_path]: - if dir_path.exists(): - for item in os.listdir(dir_path): - if item.endswith(".c") or item.endswith(".h"): - os.remove(dir_path / item) + # Remove existing *.c and *.h files + for root, _, files in os.walk(dest_lib_path): + for file in files: + if file.endswith(".c") or file.endswith(".h"): + os.remove(os.path.join(root, file)) for dir_name in file_list_wba: - if not dir_paths[dir_name].exists(): - dir_paths[dir_name].mkdir(parents=True) - for file in file_list_wba[dir_name]: - file_path = Path(src_repo_path / file) - file_name = file_path.name - if file_path.exists(): - # copy each file to destination - shutil.copy(file_path, Path(dir_paths[dir_name])) + # Src file path to be copied + src_file_path = Path(src_repo_path / file) + if src_file_path.exists(): + # Extract the relevant part of the path from "dir_name" onwards + start_index = file.find(dir_name) + relative_path = file[start_index:] + # Create the full destination path + destination_path = os.path.join(dest_lib_path, relative_path) + # Create (if does not exist) all directories in the destination path + os.makedirs(os.path.dirname(destination_path), exist_ok=True) + # Copy the file to the destination path + shutil.copy(src_file_path, destination_path) else: - logging.error(f"File : {file_path} not found") + logging.error(f"File : {src_file_path} not found") logging.error("Abort") sys.exit() @@ -201,7 +202,7 @@ def update_ble_lib_readme(lib_path, make_version, make_commit): make_commit: Commit corresponding to latest STM32Cube version. """ - readme_path = Path(lib_path / "hci" / "README") + readme_path = Path(lib_path / "README") with readme_path.open(mode="r") as readme_prev: lines = (x for x in readme_prev.read().splitlines()) @@ -250,7 +251,7 @@ def build_patch_from_current_zephyr_version( shutil.rmtree(temp_source_path, onerror=common_utils.remove_readonly) temp_source_lib_path.mkdir(parents=True) - copy_hci_files( + copy_ble_lib_files( src_repo_path, temp_source_lib_path, stm32_serie, @@ -284,8 +285,8 @@ def build_patch_from_current_zephyr_version( for file in temp_source_lib_path.glob("*"): if file.is_file(): file.unlink() - if Path(temp_source_lib_path / "hci" / "README").exists(): - Path(temp_source_lib_path / "hci" / "README").unlink() + if Path(temp_source_lib_path / "README").exists(): + Path(temp_source_lib_path / "README").unlink() # commit this current zephyr library file os_cmd(("git", "add", "*"), cwd=temp_source_path) @@ -334,11 +335,10 @@ def update( ("git", "checkout", "-f", "--recurse-submodules", update_version), cwd=src_repo_path, ) - copy_hci_files(src_repo_path, dest_lib_path, stm32_serie) + copy_ble_lib_files(src_repo_path, dest_lib_path, stm32_serie) common_utils.apply_patch(dest_lib_path / "ble_zephyr.patch", dest_lib_path) - if Path(dest_lib_path / "hci" / "README").exists(): - update_ble_lib_readme( - dest_lib_path, update_version, commit) + if Path(dest_lib_path / "README").exists(): + update_ble_lib_readme(dest_lib_path, update_version, commit) if __name__ == "__main__":