Skip to content

Commit c2d66a8

Browse files
committed
variant(wb0): add WB05KZV, WB05TZF, WB09KEV and WB09TEF generic support
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent afca0ac commit c2d66a8

File tree

4 files changed

+373
-2
lines changed

4 files changed

+373
-2
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
7676
- [Generic STM32U3 boards](#generic-stm32u3-boards)
7777
- [Generic STM32U5 boards](#generic-stm32u5-boards)
7878
- [Generic STM32WB boards](#generic-stm32wb-boards)
79+
- [Generic STM32WB0 boards](#generic-stm32wb0-boards)
7980
- [Generic STM32WBA boards](#generic-stm32wba-boards)
8081
- [Generic STM32WL boards](#generic-stm32wl-boards)
8182
- [3D printer boards](#3d-printer-boards)
@@ -800,6 +801,13 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
800801
| :green_heart: | STM32WB55VC<br>STM32WB55VE<br>STM32WB55VG | Generic Board | *2.10.0* | |
801802
| :green_heart: | STM32WB55VY | Generic Board | *2.10.0* | |
802803

804+
### Generic STM32WB0 boards
805+
806+
| Status | Device(s) | Name | Release | Notes |
807+
| :----: | :-------: | ---- | :-----: | :---- |
808+
| :yellow_heart: | WB05KZV<br>WB05TZF| Generic Board | **2.11.0** | |
809+
| :yellow_heart: | WB09KEV<br>WB09TEF | Generic Board | **2.11.0** | |
810+
803811
### Generic STM32WBA boards
804812

805813
| Status | Device(s) | Name | Release | Notes |

boards.txt

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13097,6 +13097,80 @@ GenWB.menu.upload_method.OpenOCDDapLink=OpenOCD DapLink (SWD)
1309713097
GenWB.menu.upload_method.OpenOCDDapLink.upload.protocol=cmsis-dap
1309813098
GenWB.menu.upload_method.OpenOCDDapLink.upload.tool=openocd_upload
1309913099

13100+
################################################################################
13101+
# Generic WB0
13102+
GenWB0.name=Generic STM32WB0 series
13103+
13104+
GenWB0.build.core=arduino
13105+
GenWB0.build.board=GenWB0
13106+
GenWB0.build.st_extra_flags=-D{build.product_line} {build.xSerial} -D__CORTEX_SC=0
13107+
GenWB0.build.mcu=cortex-m0plus
13108+
GenWB0.build.series=STM32WB0x
13109+
GenWB0.build.flash_offset=0x0
13110+
GenWB0.upload.maximum_size=0
13111+
GenWB0.upload.maximum_data_size=0
13112+
GenWB0.openocd.target=stm32wb0x
13113+
13114+
# Generic WB05KZVx
13115+
GenWB0.menu.pnum.GENERIC_WB05KZVX=Generic WB05KZVx
13116+
GenWB0.menu.pnum.GENERIC_WB05KZVX.upload.maximum_size=196608
13117+
GenWB0.menu.pnum.GENERIC_WB05KZVX.upload.maximum_data_size=24576
13118+
GenWB0.menu.pnum.GENERIC_WB05KZVX.build.board=GENERIC_WB05KZVX
13119+
GenWB0.menu.pnum.GENERIC_WB05KZVX.build.product_line=STM32WB05
13120+
GenWB0.menu.pnum.GENERIC_WB05KZVX.build.variant=STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF
13121+
GenWB0.menu.pnum.GENERIC_WB05KZVX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WB0x/STM32WB05.svd
13122+
13123+
# Generic WB05TZFx
13124+
GenWB0.menu.pnum.GENERIC_WB05TZFX=Generic WB05TZFx
13125+
GenWB0.menu.pnum.GENERIC_WB05TZFX.upload.maximum_size=196608
13126+
GenWB0.menu.pnum.GENERIC_WB05TZFX.upload.maximum_data_size=24576
13127+
GenWB0.menu.pnum.GENERIC_WB05TZFX.build.board=GENERIC_WB05TZFX
13128+
GenWB0.menu.pnum.GENERIC_WB05TZFX.build.product_line=STM32WB05
13129+
GenWB0.menu.pnum.GENERIC_WB05TZFX.build.variant=STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF
13130+
GenWB0.menu.pnum.GENERIC_WB05TZFX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WB0x/STM32WB05.svd
13131+
13132+
# Generic WB09KEVx
13133+
GenWB0.menu.pnum.GENERIC_WB09KEVX=Generic WB09KEVx
13134+
GenWB0.menu.pnum.GENERIC_WB09KEVX.upload.maximum_size=524288
13135+
GenWB0.menu.pnum.GENERIC_WB09KEVX.upload.maximum_data_size=65536
13136+
GenWB0.menu.pnum.GENERIC_WB09KEVX.build.board=GENERIC_WB09KEVX
13137+
GenWB0.menu.pnum.GENERIC_WB09KEVX.build.product_line=STM32WB09
13138+
GenWB0.menu.pnum.GENERIC_WB09KEVX.build.variant=STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF
13139+
GenWB0.menu.pnum.GENERIC_WB09KEVX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WB0x/STM32WB09.svd
13140+
13141+
# Generic WB09TEFx
13142+
GenWB0.menu.pnum.GENERIC_WB09TEFX=Generic WB09TEFx
13143+
GenWB0.menu.pnum.GENERIC_WB09TEFX.upload.maximum_size=524288
13144+
GenWB0.menu.pnum.GENERIC_WB09TEFX.upload.maximum_data_size=65536
13145+
GenWB0.menu.pnum.GENERIC_WB09TEFX.build.board=GENERIC_WB09TEFX
13146+
GenWB0.menu.pnum.GENERIC_WB09TEFX.build.product_line=STM32WB09
13147+
GenWB0.menu.pnum.GENERIC_WB09TEFX.build.variant=STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF
13148+
GenWB0.menu.pnum.GENERIC_WB09TEFX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WB0x/STM32WB09.svd
13149+
13150+
# Upload menu
13151+
GenWB0.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
13152+
GenWB0.menu.upload_method.swdMethod.upload.protocol=swd
13153+
GenWB0.menu.upload_method.swdMethod.upload.options=
13154+
GenWB0.menu.upload_method.swdMethod.upload.tool=stm32CubeProg
13155+
13156+
GenWB0.menu.upload_method.jlinkMethod=STM32CubeProgrammer (J-Link)
13157+
GenWB0.menu.upload_method.jlinkMethod.upload.protocol=jlink
13158+
GenWB0.menu.upload_method.jlinkMethod.upload.options=
13159+
GenWB0.menu.upload_method.jlinkMethod.upload.tool=stm32CubeProg
13160+
13161+
GenWB0.menu.upload_method.serialMethod=STM32CubeProgrammer (Serial)
13162+
GenWB0.menu.upload_method.serialMethod.upload.protocol=serial
13163+
GenWB0.menu.upload_method.serialMethod.upload.options=-c {serial.port.file}
13164+
GenWB0.menu.upload_method.serialMethod.upload.tool=stm32CubeProg
13165+
13166+
GenWB0.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD)
13167+
GenWB0.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink
13168+
GenWB0.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload
13169+
13170+
GenWB0.menu.upload_method.OpenOCDDapLink=OpenOCD DapLink (SWD)
13171+
GenWB0.menu.upload_method.OpenOCDDapLink.upload.protocol=cmsis-dap
13172+
GenWB0.menu.upload_method.OpenOCDDapLink.upload.tool=openocd_upload
13173+
1310013174
################################################################################
1310113175
# Generic WBA
1310213176
GenWBA.name=Generic STM32WBA series
@@ -14664,6 +14738,12 @@ GenWB.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
1466414738
GenWB.menu.xserial.disabled=Disabled (no Serial support)
1466514739
GenWB.menu.xserial.disabled.build.xSerial=
1466614740

14741+
GenWB0.menu.xserial.generic=Enabled (generic 'Serial')
14742+
GenWB0.menu.xserial.none=Enabled (no generic 'Serial')
14743+
GenWB0.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
14744+
GenWB0.menu.xserial.disabled=Disabled (no Serial support)
14745+
GenWB0.menu.xserial.disabled.build.xSerial=
14746+
1466714747
GenWBA.menu.xserial.generic=Enabled (generic 'Serial')
1466814748
GenWBA.menu.xserial.none=Enabled (no generic 'Serial')
1466914749
GenWBA.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
@@ -15624,6 +15704,26 @@ GenWB.menu.opt.ogstd.build.flags.optimize=-Og
1562415704
GenWB.menu.opt.o0std=No Optimization (-O0)
1562515705
GenWB.menu.opt.o0std.build.flags.optimize=-O0
1562615706

15707+
GenWB0.menu.opt.osstd=Smallest (-Os default)
15708+
GenWB0.menu.opt.oslto=Smallest (-Os) with LTO
15709+
GenWB0.menu.opt.oslto.build.flags.optimize=-Os -flto
15710+
GenWB0.menu.opt.o1std=Fast (-O1)
15711+
GenWB0.menu.opt.o1std.build.flags.optimize=-O1
15712+
GenWB0.menu.opt.o1lto=Fast (-O1) with LTO
15713+
GenWB0.menu.opt.o1lto.build.flags.optimize=-O1 -flto
15714+
GenWB0.menu.opt.o2std=Faster (-O2)
15715+
GenWB0.menu.opt.o2std.build.flags.optimize=-O2
15716+
GenWB0.menu.opt.o2lto=Faster (-O2) with LTO
15717+
GenWB0.menu.opt.o2lto.build.flags.optimize=-O2 -flto
15718+
GenWB0.menu.opt.o3std=Fastest (-O3)
15719+
GenWB0.menu.opt.o3std.build.flags.optimize=-O3
15720+
GenWB0.menu.opt.o3lto=Fastest (-O3) with LTO
15721+
GenWB0.menu.opt.o3lto.build.flags.optimize=-O3 -flto
15722+
GenWB0.menu.opt.ogstd=Debug (-Og)
15723+
GenWB0.menu.opt.ogstd.build.flags.optimize=-Og
15724+
GenWB0.menu.opt.o0std=No Optimization (-O0)
15725+
GenWB0.menu.opt.o0std.build.flags.optimize=-O0
15726+
1562715727
GenWBA.menu.opt.osstd=Smallest (-Os default)
1562815728
GenWBA.menu.opt.oslto=Smallest (-Os) with LTO
1562915729
GenWBA.menu.opt.oslto.build.flags.optimize=-Os -flto
@@ -16101,6 +16201,14 @@ GenWB.menu.dbg.enable_log.build.flags.debug=
1610116201
GenWB.menu.dbg.enable_all=Core Logs and Symbols Enabled (-g)
1610216202
GenWB.menu.dbg.enable_all.build.flags.debug=-g
1610316203

16204+
GenWB0.menu.dbg.none=None
16205+
GenWB0.menu.dbg.enable_sym=Symbols Enabled (-g)
16206+
GenWB0.menu.dbg.enable_sym.build.flags.debug=-g -DNDEBUG
16207+
GenWB0.menu.dbg.enable_log=Core logs Enabled
16208+
GenWB0.menu.dbg.enable_log.build.flags.debug=
16209+
GenWB0.menu.dbg.enable_all=Core Logs and Symbols Enabled (-g)
16210+
GenWB0.menu.dbg.enable_all.build.flags.debug=-g
16211+
1610416212
GenWBA.menu.dbg.none=None
1610516213
GenWBA.menu.dbg.enable_sym=Symbols Enabled (-g)
1610616214
GenWBA.menu.dbg.enable_sym.build.flags.debug=-g -DNDEBUG
@@ -16464,6 +16572,16 @@ GenWB.menu.rtlib.nanofps.build.flags.ldspecs=--specs=nano.specs -u _printf_float
1646416572
GenWB.menu.rtlib.full=Newlib Standard
1646516573
GenWB.menu.rtlib.full.build.flags.ldspecs=
1646616574

16575+
GenWB0.menu.rtlib.nano=Newlib Nano (default)
16576+
GenWB0.menu.rtlib.nanofp=Newlib Nano + Float Printf
16577+
GenWB0.menu.rtlib.nanofp.build.flags.ldspecs=--specs=nano.specs -u _printf_float
16578+
GenWB0.menu.rtlib.nanofs=Newlib Nano + Float Scanf
16579+
GenWB0.menu.rtlib.nanofs.build.flags.ldspecs=--specs=nano.specs -u _scanf_float
16580+
GenWB0.menu.rtlib.nanofps=Newlib Nano + Float Printf/Scanf
16581+
GenWB0.menu.rtlib.nanofps.build.flags.ldspecs=--specs=nano.specs -u _printf_float -u _scanf_float
16582+
GenWB0.menu.rtlib.full=Newlib Standard
16583+
GenWB0.menu.rtlib.full.build.flags.ldspecs=
16584+
1646716585
GenWBA.menu.rtlib.nano=Newlib Nano (default)
1646816586
GenWBA.menu.rtlib.nanofp=Newlib Nano + Float Printf
1646916587
GenWBA.menu.rtlib.nanofp.build.flags.ldspecs=--specs=nano.specs -u _printf_float

variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/generic_clock.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,25 @@
2121
*/
2222
WEAK void SystemClock_Config(void)
2323
{
24-
/* SystemClock_Config can be generated by STM32CubeMX */
25-
#warning "SystemClock_Config() is empty. Default clock at reset is used."
24+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
25+
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {};
26+
27+
/** Configure the SYSCLKSource and SYSCLKDivider
28+
*/
29+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
30+
RCC_ClkInitStruct.SYSCLKDivider = RCC_RC64MPLL_DIV1;
31+
32+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_WAIT_STATES_1) != HAL_OK) {
33+
Error_Handler();
34+
}
35+
/** Initializes the peripherals clock
36+
*/
37+
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SMPS;
38+
PeriphClkInitStruct.SmpsDivSelection = RCC_SMPSCLK_DIV4;
39+
40+
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
41+
Error_Handler();
42+
}
2643
}
2744

2845
#endif /* ARDUINO_GENERIC_* */

0 commit comments

Comments
 (0)