forked from stm32duino/STM32duinoBLE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: regenerate STM32Cube_FW patches
Prepare update to version 1.17.0 Signed-off-by: Frederic Pillon <[email protected]>
- Loading branch information
Showing
4 changed files
with
35 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
From ef2495f6fa746df9f86f0db39fa00244d22feb3b Mon Sep 17 00:00:00 2001 | ||
From fd17a2302d60208768610cb4723eb403c52ff2b1 Mon Sep 17 00:00:00 2001 | ||
From: Frederic Pillon <[email protected]> | ||
Date: Wed, 5 Apr 2023 10:18:52 +0200 | ||
Subject: [PATCH 1/4] chore: adapt STM32Cube_FW sources | ||
|
||
Compare to previous patch, do the minimum changes required | ||
to ease further update. | ||
Date: Thu, 13 Jul 2023 17:08:05 +0200 | ||
Subject: [PATCH 1/3] chore: adapt STM32Cube_FW sources | ||
|
||
Signed-off-by: Frederic Pillon <[email protected]> | ||
--- | ||
src/utility/STM32Cube_FW/app_conf_default.h | 47 +++++++++++++++------ | ||
src/utility/STM32Cube_FW/ble_bufsize.h | 11 ++++- | ||
src/utility/STM32Cube_FW/hw.h | 15 +++++-- | ||
src/utility/STM32Cube_FW/hw_ipcc.c | 4 +- | ||
src/utility/STM32Cube_FW/app_conf_default.h | 46 ++++++++++++++++----- | ||
src/utility/STM32Cube_FW/ble_bufsize.h | 7 ++++ | ||
src/utility/STM32Cube_FW/hw.h | 13 +++++- | ||
src/utility/STM32Cube_FW/hw_ipcc.c | 5 ++- | ||
src/utility/STM32Cube_FW/shci.c | 3 +- | ||
src/utility/STM32Cube_FW/shci_tl.c | 18 +++++++- | ||
src/utility/STM32Cube_FW/stm_list.c | 7 ++- | ||
src/utility/STM32Cube_FW/tl_mbox.c | 8 +++- | ||
8 files changed, 90 insertions(+), 23 deletions(-) | ||
src/utility/STM32Cube_FW/stm_list.c | 7 +++- | ||
src/utility/STM32Cube_FW/tl_mbox.c | 7 +++- | ||
8 files changed, 86 insertions(+), 20 deletions(-) | ||
|
||
diff --git a/src/utility/STM32Cube_FW/app_conf_default.h b/src/utility/STM32Cube_FW/app_conf_default.h | ||
index 51bd33a..e89df14 100644 | ||
index 51bd33a..1c6dd91 100644 | ||
--- a/src/utility/STM32Cube_FW/app_conf_default.h | ||
+++ b/src/utility/STM32Cube_FW/app_conf_default.h | ||
@@ -1,9 +1,9 @@ | ||
|
@@ -121,19 +118,18 @@ index 51bd33a..e89df14 100644 | |
/****************************************************************************** | ||
* Transport Layer | ||
******************************************************************************/ | ||
@@ -657,5 +680,5 @@ typedef enum | ||
#define CFG_OTP_BASE_ADDRESS OTP_AREA_BASE | ||
@@ -658,4 +681,5 @@ typedef enum | ||
|
||
#define CFG_OTP_END_ADRESS OTP_AREA_END_ADDR | ||
- | ||
-#endif /*APP_CONF_H */ | ||
+#endif | ||
+#endif /*APP_CONF_DEFAULT_H */ | ||
diff --git a/src/utility/STM32Cube_FW/ble_bufsize.h b/src/utility/STM32Cube_FW/ble_bufsize.h | ||
index 7b7c170..53cf59a 100644 | ||
index b9935c0..d4d2890 100644 | ||
--- a/src/utility/STM32Cube_FW/ble_bufsize.h | ||
+++ b/src/utility/STM32Cube_FW/ble_bufsize.h | ||
@@ -75,15 +75,22 @@ | ||
@@ -75,6 +75,13 @@ | ||
((pw) + MAX(BLE_MEM_BLOCK_X_MTU(mtu, n_link), \ | ||
BLE_MBLOCKS_SECURE_CONNECTIONS)) | ||
|
||
|
@@ -147,19 +143,8 @@ index 7b7c170..53cf59a 100644 | |
/* | ||
* BLE_FIXED_BUFFER_SIZE_BYTES: | ||
* A part of the RAM, is dynamically allocated by initializing all the pointers | ||
* defined in a global context variable "mem_alloc_ctx_p". | ||
- * This initialization is made in the Dynamic_allocator functions, which | ||
+ * This initialization is made in the Dynamic_allocator functions, which | ||
* assign a portion of RAM given by the external application to the above | ||
* mentioned "global pointers". | ||
* | ||
- * The size of this Dynamic RAM is made of 2 main components: | ||
+ * The size of this Dynamic RAM is made of 2 main components: | ||
* - a part that is parameters-dependent (num of links, GATT buffers, ...), | ||
* and which value is made explicit by the following macro; | ||
* - a part, that may be considered "fixed", i.e. independent from the above | ||
diff --git a/src/utility/STM32Cube_FW/hw.h b/src/utility/STM32Cube_FW/hw.h | ||
index 503fa2c..1472a5e 100644 | ||
index 651e1f1..1472a5e 100644 | ||
--- a/src/utility/STM32Cube_FW/hw.h | ||
+++ b/src/utility/STM32Cube_FW/hw.h | ||
@@ -26,14 +26,23 @@ extern "C" { | ||
|
@@ -188,37 +173,29 @@ index 503fa2c..1472a5e 100644 | |
|
||
void HW_IPCC_BLE_Init( void ); | ||
void HW_IPCC_BLE_SendCmd( void ); | ||
@@ -76,7 +85,7 @@ extern "C" { | ||
void HW_IPCC_BLE_LLD_ReceiveRsp( void ); | ||
void HW_IPCC_BLE_LLD_SendRspAck( void ); | ||
|
||
- | ||
+ | ||
void HW_IPCC_TRACES_Init( void ); | ||
void HW_IPCC_TRACES_EvtNot( void ); | ||
|
||
diff --git a/src/utility/STM32Cube_FW/hw_ipcc.c b/src/utility/STM32Cube_FW/hw_ipcc.c | ||
index fd620b8..3461cbe 100644 | ||
index fd620b8..c730482 100644 | ||
--- a/src/utility/STM32Cube_FW/hw_ipcc.c | ||
+++ b/src/utility/STM32Cube_FW/hw_ipcc.c | ||
@@ -18,8 +18,9 @@ | ||
@@ -17,9 +17,9 @@ | ||
****************************************************************************** | ||
*/ | ||
/* USER CODE END Header */ | ||
- | ||
+#if defined(STM32WBxx) | ||
/* Includes ------------------------------------------------------------------*/ | ||
-#include "app_common.h" | ||
+#include "hw.h" | ||
#include "mbox_def.h" | ||
|
||
/* Global variables ---------------------------------------------------------*/ | ||
@@ -667,3 +668,4 @@ static void HW_IPCC_TRACES_EvtHandler( void ) | ||
@@ -667,3 +667,4 @@ static void HW_IPCC_TRACES_EvtHandler( void ) | ||
} | ||
|
||
__weak void HW_IPCC_TRACES_EvtNot( void ){}; | ||
+#endif /* STM32WBxx */ | ||
diff --git a/src/utility/STM32Cube_FW/shci.c b/src/utility/STM32Cube_FW/shci.c | ||
index 301db76..cb7d7bd 100644 | ||
index eaa35d7..4525656 100644 | ||
--- a/src/utility/STM32Cube_FW/shci.c | ||
+++ b/src/utility/STM32Cube_FW/shci.c | ||
@@ -16,7 +16,7 @@ | ||
|
@@ -236,7 +213,7 @@ index 301db76..cb7d7bd 100644 | |
} | ||
+#endif /* STM32WBxx */ | ||
diff --git a/src/utility/STM32Cube_FW/shci_tl.c b/src/utility/STM32Cube_FW/shci_tl.c | ||
index 2b387b1..a336aa6 100644 | ||
index 0f60430..e343809 100644 | ||
--- a/src/utility/STM32Cube_FW/shci_tl.c | ||
+++ b/src/utility/STM32Cube_FW/shci_tl.c | ||
@@ -16,12 +16,13 @@ | ||
|
@@ -275,7 +252,7 @@ index 2b387b1..a336aa6 100644 | |
/* Private functions ---------------------------------------------------------*/ | ||
static void TlInit( TL_CmdPacket_t * p_cmdbuffer ) | ||
{ | ||
@@ -251,3 +266,4 @@ __WEAK void shci_cmd_resp_release(uint32_t flag) | ||
@@ -250,3 +265,4 @@ __WEAK void shci_cmd_resp_release(uint32_t flag) | ||
|
||
return; | ||
} | ||
|
@@ -306,7 +283,7 @@ index 4c92864..4e8c364 100644 | |
} | ||
+#endif /* STM32WBxx */ | ||
diff --git a/src/utility/STM32Cube_FW/tl_mbox.c b/src/utility/STM32Cube_FW/tl_mbox.c | ||
index 27a998a..ff219b9 100644 | ||
index 27a998a..1139316 100644 | ||
--- a/src/utility/STM32Cube_FW/tl_mbox.c | ||
+++ b/src/utility/STM32Cube_FW/tl_mbox.c | ||
@@ -16,6 +16,7 @@ | ||
|
@@ -329,19 +306,18 @@ index 27a998a..ff219b9 100644 | |
/**< tables */ | ||
PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static tListNode FreeBufQueue; | ||
PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static tListNode TracesEvtQueue; | ||
@@ -97,8 +99,11 @@ void TL_Init( void ) | ||
@@ -97,8 +99,10 @@ void TL_Init( void ) | ||
TL_RefTable.p_sys_table = &TL_SysTable; | ||
TL_RefTable.p_mem_manager_table = &TL_MemManagerTable; | ||
TL_RefTable.p_traces_table = &TL_TracesTable; | ||
+ | ||
+#if 0 | ||
TL_RefTable.p_mac_802_15_4_table = &TL_Mac_802_15_4_Table; | ||
TL_RefTable.p_zigbee_table = &TL_Zigbee_Table; | ||
+#endif | ||
HW_IPCC_Init(); | ||
|
||
return; | ||
@@ -846,3 +851,4 @@ static void OutputDbgTrace(TL_MB_PacketType_t packet_type, uint8_t* buffer) | ||
@@ -846,3 +850,4 @@ static void OutputDbgTrace(TL_MB_PacketType_t packet_type, uint8_t* buffer) | ||
|
||
return; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
From 12683bb7a3f0b0ad1e10400cba0e3694f9b9ee95 Mon Sep 17 00:00:00 2001 | ||
From 598c654f18fc9389be8326610a51052943151f04 Mon Sep 17 00:00:00 2001 | ||
From: Frederic Pillon <[email protected]> | ||
Date: Mon, 12 Dec 2022 17:17:48 +0100 | ||
Subject: [PATCH 2/4] fix: include a timeout when waiting for the cmd_resp | ||
Date: Thu, 13 Jul 2023 17:16:40 +0200 | ||
Subject: [PATCH 2/3] fix: include a timeout when waiting for the cmd_resp | ||
|
||
Signed-off-by: Frederic Pillon <[email protected]> | ||
--- | ||
src/utility/STM32Cube_FW/shci_tl.c | 10 ++++++---- | ||
1 file changed, 6 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/src/utility/STM32Cube_FW/shci_tl.c b/src/utility/STM32Cube_FW/shci_tl.c | ||
index a336aa6..d1d35f5 100644 | ||
index e343809..6038025 100644 | ||
--- a/src/utility/STM32Cube_FW/shci_tl.c | ||
+++ b/src/utility/STM32Cube_FW/shci_tl.c | ||
@@ -23,6 +23,7 @@ | ||
|
@@ -20,13 +20,12 @@ index a336aa6..d1d35f5 100644 | |
|
||
/* Private typedef -----------------------------------------------------------*/ | ||
typedef enum | ||
@@ -250,11 +251,12 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt) | ||
@@ -250,10 +251,11 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt) | ||
/* Weak implementation ----------------------------------------------------------------*/ | ||
__WEAK void shci_cmd_resp_wait(uint32_t timeout) | ||
{ | ||
- (void)timeout; | ||
- | ||
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT; | ||
- while(CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE); | ||
- | ||
+ for (unsigned long start = millis(); (millis() - start) < timeout;) { | ||
|
6 changes: 3 additions & 3 deletions
6
extras/STM32Cube_FW/0003-chore-add-support-for-customize-app_conf_default.h.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
From 8575588fedd55cf7238a1a810708100e700e57c0 Mon Sep 17 00:00:00 2001 | ||
From 663ed22fd680de1f32c542df0799c403665ecb2e Mon Sep 17 00:00:00 2001 | ||
From: Frederic Pillon <[email protected]> | ||
Date: Mon, 12 Dec 2022 17:29:27 +0100 | ||
Subject: [PATCH 3/4] chore: add support for customize app_conf_default.h | ||
Subject: [PATCH 3/3] chore: add support for customize app_conf_default.h | ||
|
||
Signed-off-by: Frederic Pillon <[email protected]> | ||
--- | ||
src/utility/STM32Cube_FW/app_conf_default.h | 86 ++++++++++++++++----- | ||
1 file changed, 68 insertions(+), 18 deletions(-) | ||
|
||
diff --git a/src/utility/STM32Cube_FW/app_conf_default.h b/src/utility/STM32Cube_FW/app_conf_default.h | ||
index e89df14..1f17900 100644 | ||
index 1c6dd91..d39492e 100644 | ||
--- a/src/utility/STM32Cube_FW/app_conf_default.h | ||
+++ b/src/utility/STM32Cube_FW/app_conf_default.h | ||
@@ -48,7 +48,9 @@ | ||
|
Oops, something went wrong.