Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions CI/update/patch/HAL/WL3/0001-fix-wl3-HAL-and-LL-warnings.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 6d24d07674b242544e2f24a26dd9785efb178650 Mon Sep 17 00:00:00 2001
From cf9d51a1f1763f3452c8ce2312b79357ac9766fc Mon Sep 17 00:00:00 2001
From: Frederic Pillon <[email protected]>
Date: Tue, 23 Sep 2025 14:48:50 +0200
Subject: [PATCH 1/1] fix(wl3): HAL and LL warnings
Expand All @@ -7,8 +7,7 @@ Signed-off-by: Frederic Pillon <[email protected]>
---
.../Inc/stm32wl3x_ll_dma.h | 104 ++++++++++++++++++
.../Src/stm32wl3x_hal_flash_ex.c | 2 +-
.../Src/stm32wl3x_ll_adc.c | 2 +-
3 files changed, 106 insertions(+), 2 deletions(-)
2 files changed, 105 insertions(+), 1 deletion(-)

diff --git a/system/Drivers/STM32WL3x_HAL_Driver/Inc/stm32wl3x_ll_dma.h b/system/Drivers/STM32WL3x_HAL_Driver/Inc/stm32wl3x_ll_dma.h
index b94790b32..e49d7c53f 100644
Expand Down Expand Up @@ -859,19 +858,6 @@ index 9cd95caf3..d1b9f3dd0 100644
uint32_t index;

/* Check the parameters */
diff --git a/system/Drivers/STM32WL3x_HAL_Driver/Src/stm32wl3x_ll_adc.c b/system/Drivers/STM32WL3x_HAL_Driver/Src/stm32wl3x_ll_adc.c
index 5455a5343..4a88375ed 100644
--- a/system/Drivers/STM32WL3x_HAL_Driver/Src/stm32wl3x_ll_adc.c
+++ b/system/Drivers/STM32WL3x_HAL_Driver/Src/stm32wl3x_ll_adc.c
@@ -24,7 +24,7 @@
#ifdef USE_FULL_ASSERT
#include "stm32_assert.h"
#else
-#define assert_param(expr) ((void)0UL)
+#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */

/** @addtogroup STM32WL3x_LL_Driver
--
2.34.1

54 changes: 43 additions & 11 deletions CI/update/stm32variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -1647,12 +1647,36 @@ def print_variant(generic_list, alt_syswkup_list):
def search_product_line(valueline: str, extra: str) -> str:
product_line = ""
product_line_list = product_line_dict[mcu_family]
if not valueline.startswith("STM32MP1"):
if valueline.startswith("STM32MP1"):
# previous
# Unfortunately, MP1 does not follows the same naming rules
for pline in product_line_dict[mcu_family]:
vline = valueline
product_line = pline
# Remove the 'x' character from pline and
# the one at same index in the vline
while 1:
idx = pline.find("x")
if idx > 0:
pline = pline.replace("x", "", 1)
if "STM32MP15xx" != vline:
vline = vline[:idx] + vline[idx + 1 :]
else:
break
if pline >= vline and pline[:10] == vline[:10]:
break
else:
# In case of CMSIS device does not exist
product_line = "STM32MP15xx"
elif valueline.startswith("STM32WL3"):
for idx_pline, pline in enumerate(product_line_list):
vline = valueline
# Add an 'x' at the end to match the length
# as startup file contains only one 'x' at the end
# STM32WL3xx -> STM32WL30K8
# STM32WL3Rx -> STM32WL3RK8
product_line = pline
if vline.startswith("STM32WB0") or vline.startswith("STM32WL3"):
pline = pline + "xx"
pline = pline + "x"
# Remove the 'x' character from pline and
# the one at same index in the vline
while 1:
Expand All @@ -1662,7 +1686,8 @@ def search_product_line(valueline: str, extra: str) -> str:
vline = vline[:idx] + vline[idx + 1 :]
else:
break
if pline >= vline:
# Exact match or generic name
if pline == vline or product_line == "STM32WL3xx":
if (
extra
and len(product_line_list) > idx_pline + 1
Expand All @@ -1674,27 +1699,34 @@ def search_product_line(valueline: str, extra: str) -> str:
else:
# In case of CMSIS device does not exist
product_line = ""
product_line = product_line.upper()
else:
# previous
# Unfortunately, MP1 does not follows the same naming rules
for pline in product_line_dict[mcu_family]:
for idx_pline, pline in enumerate(product_line_list):
vline = valueline
product_line = pline
if vline.startswith("STM32WB0"):
pline = pline + "xx"
# Remove the 'x' character from pline and
# the one at same index in the vline
while 1:
idx = pline.find("x")
if idx > 0:
pline = pline.replace("x", "", 1)
if "STM32MP15xx" != vline:
vline = vline[:idx] + vline[idx + 1 :]
vline = vline[:idx] + vline[idx + 1 :]
else:
break
if pline >= vline and pline[:10] == vline[:10]:
if pline >= vline:
if (
extra
and len(product_line_list) > idx_pline + 1
and product_line_list[idx_pline + 1] == (product_line + extra)
):
# Look for the next product line if contains the extra
product_line = product_line_list[idx_pline + 1]
break
else:
# In case of CMSIS device does not exist
product_line = "STM32MP15xx"
product_line = ""
return product_line


Expand Down
8 changes: 6 additions & 2 deletions CI/update/stm32wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,16 @@ def printCMSISStartup(log):
for fn_list in group_startup_list:
if len(fn_list) == 1:
valueline = re.split("_|\\.", fn_list[0])
vline = valueline[1].upper().replace("X", "x")
vline = valueline[1].upper()
if not valueline[1].startswith("stm32wl3"):
vline = vline.replace("X", "x")
cmsis_list.append({"vline": vline, "fn": fn_list[0], "cm": ""})
else:
for fn in fn_list:
valueline = re.split("_|\\.", fn)
vline = valueline[1].upper().replace("X", "x")
vline = valueline[1].upper()
if not valueline[1].startswith("stm32wl3"):
vline = vline.replace("X", "x")
cm = valueline[2].upper()
cmsis_list.append({"vline": vline, "fn": fn, "cm": cm})
with open(CMSIS_Startupfile, "w", newline="\n") as out_file:
Expand Down
16 changes: 8 additions & 8 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ Nucleo_64.menu.pnum.NUCLEO_WL33CC1.upload.maximum_data_size=32768
Nucleo_64.menu.pnum.NUCLEO_WL33CC1.build.mcu=cortex-m0plus
Nucleo_64.menu.pnum.NUCLEO_WL33CC1.build.board=NUCLEO_WL33CC1
Nucleo_64.menu.pnum.NUCLEO_WL33CC1.build.series=STM32WL3x
Nucleo_64.menu.pnum.NUCLEO_WL33CC1.build.product_line=STM32WL3xx
Nucleo_64.menu.pnum.NUCLEO_WL33CC1.build.product_line=STM32WL3XX
Nucleo_64.menu.pnum.NUCLEO_WL33CC1.build.variant=STM32WL3x/WL33C(8-B-C)Vx(X)
Nucleo_64.menu.pnum.NUCLEO_WL33CC1.build.variant_h=variant_NUCLEO_WL33CCx.h
Nucleo_64.menu.pnum.NUCLEO_WL33CC1.build.st_extra_flags=-D{build.product_line} {build.xSerial} -D__CORTEX_SC=0
Expand All @@ -1045,7 +1045,7 @@ Nucleo_64.menu.pnum.NUCLEO_WL33CC2.upload.maximum_data_size=32768
Nucleo_64.menu.pnum.NUCLEO_WL33CC2.build.mcu=cortex-m0plus
Nucleo_64.menu.pnum.NUCLEO_WL33CC2.build.board=NUCLEO_WL33CC2
Nucleo_64.menu.pnum.NUCLEO_WL33CC2.build.series=STM32WL3x
Nucleo_64.menu.pnum.NUCLEO_WL33CC2.build.product_line=STM32WL3xx
Nucleo_64.menu.pnum.NUCLEO_WL33CC2.build.product_line=STM32WL3XX
Nucleo_64.menu.pnum.NUCLEO_WL33CC2.build.variant=STM32WL3x/WL33C(8-B-C)Vx(X)
Nucleo_64.menu.pnum.NUCLEO_WL33CC2.build.variant_h=variant_NUCLEO_WL33CCx.h
Nucleo_64.menu.pnum.NUCLEO_WL33CC2.build.st_extra_flags=-D{build.product_line} {build.xSerial} -D__CORTEX_SC=0
Expand Down Expand Up @@ -13647,7 +13647,7 @@ GenWL3.menu.pnum.GENERIC_WL33C8VX=Generic WL33C8Vx
GenWL3.menu.pnum.GENERIC_WL33C8VX.upload.maximum_size=65536
GenWL3.menu.pnum.GENERIC_WL33C8VX.upload.maximum_data_size=16384
GenWL3.menu.pnum.GENERIC_WL33C8VX.build.board=GENERIC_WL33C8VX
GenWL3.menu.pnum.GENERIC_WL33C8VX.build.product_line=STM32WL3xx
GenWL3.menu.pnum.GENERIC_WL33C8VX.build.product_line=STM32WL3XX
GenWL3.menu.pnum.GENERIC_WL33C8VX.build.variant=STM32WL3x/WL33C(8-B-C)Vx(X)
GenWL3.menu.pnum.GENERIC_WL33C8VX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WL3x/STM32WL33.svd

Expand All @@ -13656,7 +13656,7 @@ GenWL3.menu.pnum.GENERIC_WL33C8VXX=Generic WL33C8VxX
GenWL3.menu.pnum.GENERIC_WL33C8VXX.upload.maximum_size=65536
GenWL3.menu.pnum.GENERIC_WL33C8VXX.upload.maximum_data_size=16384
GenWL3.menu.pnum.GENERIC_WL33C8VXX.build.board=GENERIC_WL33C8VXX
GenWL3.menu.pnum.GENERIC_WL33C8VXX.build.product_line=STM32WL3xx
GenWL3.menu.pnum.GENERIC_WL33C8VXX.build.product_line=STM32WL3XX
GenWL3.menu.pnum.GENERIC_WL33C8VXX.build.variant=STM32WL3x/WL33C(8-B-C)Vx(X)
GenWL3.menu.pnum.GENERIC_WL33C8VXX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WL3x/STM32WL33.svd

Expand All @@ -13665,7 +13665,7 @@ GenWL3.menu.pnum.GENERIC_WL33CBVX=Generic WL33CBVx
GenWL3.menu.pnum.GENERIC_WL33CBVX.upload.maximum_size=131072
GenWL3.menu.pnum.GENERIC_WL33CBVX.upload.maximum_data_size=32768
GenWL3.menu.pnum.GENERIC_WL33CBVX.build.board=GENERIC_WL33CBVX
GenWL3.menu.pnum.GENERIC_WL33CBVX.build.product_line=STM32WL3xx
GenWL3.menu.pnum.GENERIC_WL33CBVX.build.product_line=STM32WL3XX
GenWL3.menu.pnum.GENERIC_WL33CBVX.build.variant=STM32WL3x/WL33C(8-B-C)Vx(X)
GenWL3.menu.pnum.GENERIC_WL33CBVX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WL3x/STM32WL33.svd

Expand All @@ -13674,7 +13674,7 @@ GenWL3.menu.pnum.GENERIC_WL33CBVXX=Generic WL33CBVxX
GenWL3.menu.pnum.GENERIC_WL33CBVXX.upload.maximum_size=131072
GenWL3.menu.pnum.GENERIC_WL33CBVXX.upload.maximum_data_size=32768
GenWL3.menu.pnum.GENERIC_WL33CBVXX.build.board=GENERIC_WL33CBVXX
GenWL3.menu.pnum.GENERIC_WL33CBVXX.build.product_line=STM32WL3xx
GenWL3.menu.pnum.GENERIC_WL33CBVXX.build.product_line=STM32WL3XX
GenWL3.menu.pnum.GENERIC_WL33CBVXX.build.variant=STM32WL3x/WL33C(8-B-C)Vx(X)
GenWL3.menu.pnum.GENERIC_WL33CBVXX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WL3x/STM32WL33.svd

Expand All @@ -13683,7 +13683,7 @@ GenWL3.menu.pnum.GENERIC_WL33CCVX=Generic WL33CCVx
GenWL3.menu.pnum.GENERIC_WL33CCVX.upload.maximum_size=262144
GenWL3.menu.pnum.GENERIC_WL33CCVX.upload.maximum_data_size=32768
GenWL3.menu.pnum.GENERIC_WL33CCVX.build.board=GENERIC_WL33CCVX
GenWL3.menu.pnum.GENERIC_WL33CCVX.build.product_line=STM32WL3xx
GenWL3.menu.pnum.GENERIC_WL33CCVX.build.product_line=STM32WL3XX
GenWL3.menu.pnum.GENERIC_WL33CCVX.build.variant=STM32WL3x/WL33C(8-B-C)Vx(X)
GenWL3.menu.pnum.GENERIC_WL33CCVX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WL3x/STM32WL33.svd

Expand All @@ -13692,7 +13692,7 @@ GenWL3.menu.pnum.GENERIC_WL33CCVXX=Generic WL33CCVxX
GenWL3.menu.pnum.GENERIC_WL33CCVXX.upload.maximum_size=262144
GenWL3.menu.pnum.GENERIC_WL33CCVXX.upload.maximum_data_size=32768
GenWL3.menu.pnum.GENERIC_WL33CCVXX.build.board=GENERIC_WL33CCVXX
GenWL3.menu.pnum.GENERIC_WL33CCVXX.build.product_line=STM32WL3xx
GenWL3.menu.pnum.GENERIC_WL33CCVXX.build.product_line=STM32WL3XX
GenWL3.menu.pnum.GENERIC_WL33CCVXX.build.variant=STM32WL3x/WL33C(8-B-C)Vx(X)
GenWL3.menu.pnum.GENERIC_WL33CCVXX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WL3x/STM32WL33.svd

Expand Down
Loading