Skip to content

Commit 0c19574

Browse files
author
puneet shrivas
committed
Added Nucleo-WB15CC
1 parent 280efe1 commit 0c19574

File tree

3 files changed

+234
-3
lines changed

3 files changed

+234
-3
lines changed

Diff for: boards.txt

+15-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ Nucleo_64.menu.pnum.NUCLEO_L476RG.build.cmsis_lib_gcc=arm_cortexM4lf_math
589589
# P_NUCLEO_WB55RG board
590590
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG=P-Nucleo WB55RG
591591
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.node="NODE_WB55RG,NOD_WB55RG"
592-
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.upload.maximum_size=524288
592+
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.upload.maximum_size=524288
593593
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.upload.maximum_data_size=196608
594594
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.build.mcu=cortex-m4
595595
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.build.fpu=-mfpu=fpv4-sp-d16
@@ -613,6 +613,20 @@ Nucleo_64.menu.pnum.NUCLEO_WL55JC1.build.variant=STM32WLxx/WL54JCI_WL55JCI_WLE4J
613613
Nucleo_64.menu.pnum.NUCLEO_WL55JC1.build.cmsis_lib_gcc=arm_cortexM4l_math
614614
Nucleo_64.menu.pnum.NUCLEO_WL55JC1.build.st_extra_flags=-D{build.product_line} -DUSE_CM4_STARTUP_FILE {build.xSerial}
615615

616+
# NUCLEO_WB15CC board
617+
Nucleo.64.menu.pnum.NUCLEO_WB15CC=Nucleo WB15CC
618+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.node="NODE_WB15CC,NOD_WB15CC"
619+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.upload.maximum_size=327680
620+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.upload.maximum_data_size=122880
621+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.mcu=cortex-m4
622+
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.build.fpu=-mfpu=fpv4-sp-d16
623+
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.build.float-abi=-mfloat-abi=hard
624+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.board=NUCLEO_WB15CC
625+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.series=STM32WBxx
626+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.product_line=STM32WB15xx
627+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.variant=STM32WBxx/WB15CC
628+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.cmsis_lib_gcc=arm_cortexM4lf_math
629+
616630
# Upload menu
617631
Nucleo_64.menu.upload_method.MassStorage=Mass Storage
618632
Nucleo_64.menu.upload_method.MassStorage.upload.protocol=

Diff for: variants/STM32WBxx/WB15CCU/generic_clock.c

+36-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,42 @@
2020
*/
2121
WEAK void SystemClock_Config(void)
2222
{
23-
/* SystemClock_Config can be generated by STM32CubeMX */
24-
#warning "SystemClock_Config() is empty. Default clock at reset is used."
23+
24+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
25+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
26+
27+
/** Initializes the RCC Oscillators according to the specified parameters
28+
* in the RCC_OscInitTypeDef structure.
29+
*/
30+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_MSI;
31+
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
32+
RCC_OscInitStruct.MSIState = RCC_MSI_ON;
33+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
34+
RCC_OscInitStruct.MSICalibrationValue = RCC_MSICALIBRATION_DEFAULT;
35+
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;
36+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
37+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
38+
{
39+
Error_Handler();
40+
}
41+
42+
/** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers
43+
*/
44+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK4|RCC_CLOCKTYPE_HCLK2
45+
|RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
46+
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
47+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_MSI;
48+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
49+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
50+
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
51+
RCC_ClkInitStruct.AHBCLK2Divider = RCC_SYSCLK_DIV1;
52+
RCC_ClkInitStruct.AHBCLK4Divider = RCC_SYSCLK_DIV1;
53+
54+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
55+
{
56+
Error_Handler();
57+
}
58+
2559
}
2660

2761
#endif /* ARDUINO_GENERIC_* */

Diff for: variants/STM32WBxx/WB15CCU/ldscript.ld

+183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
/*
2+
******************************************************************************
3+
**
4+
** File : LinkerScript.ld
5+
**
6+
** Author : STM32CubeIDE
7+
**
8+
** Abstract : Linker script for STM32WB15xC Device
9+
** 320Kbytes FLASH
10+
** 48Kbytes RAM
11+
**
12+
** Set heap size, stack size and stack location according
13+
** to application requirements.
14+
**
15+
** Set memory bank area and size if external memory is used.
16+
**
17+
** Target : STMicroelectronics STM32
18+
**
19+
** Distribution: The file is distributed as is without any warranty
20+
** of any kind.
21+
**
22+
*****************************************************************************
23+
** @attention
24+
**
25+
** Copyright (c) 2022 STMicroelectronics.
26+
** All rights reserved.
27+
**
28+
** This software is licensed under terms that can be found in the LICENSE file
29+
** in the root directory of this software component.
30+
** If no LICENSE file comes with this software, it is provided AS-IS.
31+
**
32+
*****************************************************************************
33+
*/
34+
35+
/* Entry Point */
36+
ENTRY(Reset_Handler)
37+
38+
/* Highest address of the user mode stack */
39+
_estack = ORIGIN(RAM1) + LENGTH(RAM1); /* end of RAM1 */
40+
/* Generate a link error if heap and stack don't fit into RAM */
41+
_Min_Heap_Size = 0x200; /* required amount of heap */
42+
_Min_Stack_Size = 0x400; /* required amount of stack */
43+
44+
/* Specify the memory areas */
45+
MEMORY
46+
{
47+
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
48+
RAM1 (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
49+
RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K
50+
}
51+
52+
/* Define output sections */
53+
SECTIONS
54+
{
55+
/* The startup code goes first into FLASH */
56+
.isr_vector :
57+
{
58+
. = ALIGN(4);
59+
KEEP(*(.isr_vector)) /* Startup code */
60+
. = ALIGN(4);
61+
} >FLASH
62+
63+
/* The program code and other data goes into FLASH */
64+
.text :
65+
{
66+
. = ALIGN(4);
67+
*(.text) /* .text sections (code) */
68+
*(.text*) /* .text* sections (code) */
69+
*(.glue_7) /* glue arm to thumb code */
70+
*(.glue_7t) /* glue thumb to arm code */
71+
*(.eh_frame)
72+
73+
KEEP (*(.init))
74+
KEEP (*(.fini))
75+
76+
. = ALIGN(4);
77+
_etext = .; /* define a global symbols at end of code */
78+
} >FLASH
79+
80+
/* Constant data goes into FLASH */
81+
.rodata :
82+
{
83+
. = ALIGN(4);
84+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
85+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
86+
. = ALIGN(4);
87+
} >FLASH
88+
89+
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
90+
.ARM : {
91+
__exidx_start = .;
92+
*(.ARM.exidx*)
93+
__exidx_end = .;
94+
} >FLASH
95+
96+
.preinit_array :
97+
{
98+
PROVIDE_HIDDEN (__preinit_array_start = .);
99+
KEEP (*(.preinit_array*))
100+
PROVIDE_HIDDEN (__preinit_array_end = .);
101+
} >FLASH
102+
.init_array :
103+
{
104+
PROVIDE_HIDDEN (__init_array_start = .);
105+
KEEP (*(SORT(.init_array.*)))
106+
KEEP (*(.init_array*))
107+
PROVIDE_HIDDEN (__init_array_end = .);
108+
} >FLASH
109+
.fini_array :
110+
{
111+
PROVIDE_HIDDEN (__fini_array_start = .);
112+
KEEP (*(SORT(.fini_array.*)))
113+
KEEP (*(.fini_array*))
114+
PROVIDE_HIDDEN (__fini_array_end = .);
115+
} >FLASH
116+
117+
/* used by the startup to initialize data */
118+
_sidata = LOADADDR(.data);
119+
120+
/* Initialized data sections goes into RAM, load LMA copy after code */
121+
.data :
122+
{
123+
. = ALIGN(4);
124+
_sdata = .; /* create a global symbol at data start */
125+
*(.data) /* .data sections */
126+
*(.data*) /* .data* sections */
127+
*(.RamFunc) /* .RamFunc sections */
128+
*(.RamFunc*) /* .RamFunc* sections */
129+
130+
. = ALIGN(4);
131+
_edata = .; /* define a global symbol at data end */
132+
} >RAM1 AT> FLASH
133+
134+
/* Uninitialized data section */
135+
. = ALIGN(4);
136+
.bss :
137+
{
138+
/* This is used by the startup in order to initialize the .bss section */
139+
_sbss = .; /* define a global symbol at bss start */
140+
__bss_start__ = _sbss;
141+
*(.bss)
142+
*(.bss*)
143+
*(COMMON)
144+
145+
. = ALIGN(4);
146+
_ebss = .; /* define a global symbol at bss end */
147+
__bss_end__ = _ebss;
148+
} >RAM1
149+
150+
/* User_heap_stack section, used to check that there is enough RAM left */
151+
._user_heap_stack :
152+
{
153+
. = ALIGN(8);
154+
PROVIDE ( end = . );
155+
PROVIDE ( _end = . );
156+
. = . + _Min_Heap_Size;
157+
. = . + _Min_Stack_Size;
158+
. = ALIGN(8);
159+
} >RAM1
160+
161+
/* Remove information from the standard libraries */
162+
/DISCARD/ :
163+
{
164+
libc.a ( * )
165+
libm.a ( * )
166+
libgcc.a ( * )
167+
}
168+
169+
.ARM.attributes 0 : { *(.ARM.attributes) }
170+
MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED
171+
MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED
172+
173+
/* used by the startup to initialize .MB_MEM2 data */
174+
_siMB_MEM2 = LOADADDR(.MB_MEM2);
175+
.MB_MEM2 :
176+
{
177+
_sMB_MEM2 = . ;
178+
*(.MB_MEM2) ;
179+
_eMB_MEM2 = . ;
180+
} >RAM_SHARED AT> FLASH
181+
}
182+
183+

0 commit comments

Comments
 (0)