Skip to content

Commit 394704d

Browse files
authored
Merge pull request #1057 from fpistm/CubeUpdateWB
Update to latest STM32CubeWB
2 parents 3bcc4f1 + 88dd0a4 commit 394704d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+45142
-1232
lines changed

Diff for: cores/arduino/stm32/stm32_def_build.h

+6
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,16 @@
364364
#define CMSIS_STARTUP_FILE "startup_stm32l4s9xx.s"
365365
#elif defined(STM32MP1xx)
366366
#define CMSIS_STARTUP_FILE "startup_stm32mp15xx.s"
367+
#elif defined(STM32WB30xx)
368+
#define CMSIS_STARTUP_FILE "startup_stm32wb30xx_cm4.s"
369+
#elif defined(STM32WB35xx)
370+
#define CMSIS_STARTUP_FILE "startup_stm32wb35xx_cm4.s"
367371
#elif defined(STM32WB50xx)
368372
#define CMSIS_STARTUP_FILE "startup_stm32wb50xx_cm4.s"
369373
#elif defined(STM32WB55xx)
370374
#define CMSIS_STARTUP_FILE "startup_stm32wb55xx_cm4.s"
375+
#elif defined(STM32WB5Mxx)
376+
#define CMSIS_STARTUP_FILE "startup_stm32wb5mxx_cm4.s"
371377
#else
372378
#error UNKNOWN CHIP
373379
#endif

Diff for: libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2s.c

+3
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@
3131
#ifdef STM32L1xx
3232
#include "stm32l1xx_hal_i2s.c"
3333
#endif
34+
#ifdef STM32WBxx
35+
#include "stm32wbxx_hal_i2s.c"
36+
#endif

Diff for: system/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb30xx.h

+11,130
Large diffs are not rendered by default.

Diff for: system/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb35xx.h

+12,767
Large diffs are not rendered by default.

Diff for: system/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb50xx.h

+65-144
Large diffs are not rendered by default.

Diff for: system/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h

+67-68
Large diffs are not rendered by default.

Diff for: system/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb5mxx.h

+13,677
Large diffs are not rendered by default.

Diff for: system/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* @brief CMSIS Device version number
7070
*/
7171
#define __STM32WBxx_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
72-
#define __STM32WBxx_CMSIS_VERSION_SUB1 (0x03U) /*!< [23:16] sub1 version */
72+
#define __STM32WBxx_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
7373
#define __STM32WBxx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
7474
#define __STM32WBxx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
7575
#define __STM32WBxx_CMSIS_DEVICE_VERSION ((__STM32WBxx_CMSIS_VERSION_MAIN << 24)\
@@ -87,8 +87,14 @@
8787

8888
#if defined(STM32WB55xx)
8989
#include "stm32wb55xx.h"
90+
#elif defined(STM32WB5Mxx)
91+
#include "stm32wb5mxx.h"
9092
#elif defined(STM32WB50xx)
9193
#include "stm32wb50xx.h"
94+
#elif defined(STM32WB35xx)
95+
#include "stm32wb35xx.h"
96+
#elif defined(STM32WB30xx)
97+
#include "stm32wb30xx.h"
9298
#else
9399
#error "Please select first the target STM32WBxx device used in your application, for instance xxx (in stm32wbxx.h file)"
94100
#endif

Diff for: system/Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
6464
extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */
6565
extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
6666

67-
#if defined(STM32WB55xx)
67+
#if defined(STM32WB55xx) || defined(STM32WB5Mxx) || defined(STM32WB35xx)
6868
extern const uint32_t SmpsPrescalerTable[4][6]; /*!< SMPS factor ranges table values */
6969
#endif
7070
/**

Diff for: system/Drivers/CMSIS/Device/ST/STM32WBxx/Release_Notes.html

+66-8
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ <h1 id="purpose">Purpose</h1>
3636
<p>This driver provides the CMSIS device for the stm32wbxx products. This covers</p>
3737
<ul>
3838
<li>STM32WB55xx devices</li>
39+
<li>STM32WB5Mxx devices</li>
3940
<li>STM32WB50xx devices</li>
41+
<li>STM32WB35xx devices</li>
42+
<li>STM32WB30xx devices</li>
4043
</ul>
4144
<p>This driver is composed of the descriptions of the registers under “Include” directory.</p>
4245
<p>Various template file are provided to easily build an application. They can be adapted to fit applications requirements.</p>
@@ -45,13 +48,68 @@ <h1 id="purpose">Purpose</h1>
4548
<li>Startup files are provided as example for IAR©, KEIL© and SW4STM32©.</li>
4649
<li>Linker files are provided as example for IAR©, KEIL© and SW4STM32©.</li>
4750
</ul>
51+
<h1 id="specific-consideration-for-available-flash-size-inside-linker-file">Specific consideration for available FLASH size inside linker file</h1>
52+
<p>The available flash size depends on the wireless binary used inside the STM32WB device.</p>
53+
<p>The linker files templates for IAR, KEIL and GCC provide example of implementation which can be tuned.</p>
54+
<p>You can refer to the below chapters to optimize the usage of the flash on your device.</p>
55+
<h2 id="stm32wb55xx-stm32wb50xx-and-stm32wb5m">STM32WB55xx, STM32WB50xx and STM32WB5M</h2>
56+
<p>The default linker file provided in “/Drivers/CMSIS/DeviceST/STM32WBxx/Source/Templates” allows the application to use 512KB of flash.</p>
57+
<p>The maximum flash memory that can be used by the application is up to the Secure Flash Start Address (SFSA) that can be read from the option byte.</p>
58+
<p>The __ICFEDIT_region_ROM_end__ in the linker can be modified with a value up to : (0x08000000 + (SFSA &lt;&lt; 12)) - 1.</p>
59+
<p>Example:</p>
60+
<ul>
61+
<li>When the SFSA option byte is set to 0xA0, the maximum value to be used for __ICFEDIT_region_ROM_end is 0x0809FFFF which is 640KB of flash.</li>
62+
</ul>
63+
<p>Note:</p>
64+
<ul>
65+
<li>The SFSA option byte can only be set by the CPU2. The user cannot modify that value.</li>
66+
</ul>
67+
<h2 id="stm32wb35xx-and-stm32wb30xx">STM32WB35xx and STM32WB30xx</h2>
68+
<p>The default linker file provided in "/Drivers/CMSIS/Device/ST/STM32WBxx/Source/Templates allows the application to use 120KB of flash.</p>
69+
<p>The maximum flash memory that can be used by the application is up to the Secure Flash Start Address (SFSA) that can be read from the option byte.</p>
70+
<p>The __ICFEDIT_region_ROM_end__ in the linker can be modified with a value up to : (0x08000000 + (SFSA &lt;&lt; 12)) - 1.</p>
71+
<p>Example:</p>
72+
<ul>
73+
<li>When the SFSA option byte is set to 0x32, the maximum value to be used for __ICFEDIT_region_ROM_end is 0x08031FFF – which is 200KB of flash</li>
74+
</ul>
75+
<p>Note:</p>
76+
<ul>
77+
<li>The SFSA option byte can only be set by the CPU2. The user cannot modify that value.</li>
78+
</ul>
4879
</div>
4980
<div class="col-sm-12 col-lg-8">
5081
<h1 id="update-history">Update History</h1>
5182
<div class="collapse">
52-
<input type="checkbox" id="collapse-section4" checked aria-hidden="true"> <label for="collapse-section4" aria-hidden="true">v1.3.0 / 11-September-2019</label>
83+
<input type="checkbox" id="collapse-section5" checked aria-hidden="true"> <label for="collapse-section5" aria-hidden="true">v1.4.0 / 12-February-2020</label>
5384
<div>
5485
<h2 id="main-changes">Main Changes</h2>
86+
<h3 id="introduction-of-stm32wb35xx-stm32wb30xx-and-stm32wb5mxx-product">Introduction of STM32WB35xx, STM32WB30xx and STM32WB5Mxx product</h3>
87+
<p>This release introduce the support of STM32WB5Mxx, STM32WB35xx product and its value line STM32WB30xx.</p>
88+
<p>Added features:</p>
89+
<ul>
90+
<li>Templates/system_stm32wbxx.c contains the initialization code referred as SystemInit.</li>
91+
<li>Startup files are provided as example for IAR©, KEIL© and SW4STM32©.</li>
92+
<li>Linker files are provided as example for IAR©, KEIL© and SW4STM32©.</li>
93+
<li>The product STM32WB5Mxx is supported by enabling inside your project the define “STM32WB5Mxx”.</li>
94+
<li>The product STM32WB35xx is supported by enabling inside your project the define “STM32WB35xx”.</li>
95+
<li>The product STM32WB30xx is supported by enabling inside your project the define “STM32WB30xx”.</li>
96+
</ul>
97+
<h2 id="development-toolchains-and-compilers">Development Toolchains and Compilers</h2>
98+
<ul>
99+
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V8.20.2</li>
100+
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.25</li>
101+
<li>System Workbench STM32 (SW4STM32) toolchain V2.7</li>
102+
</ul>
103+
<h2 id="supported-devices-and-boards">Supported Devices and boards</h2>
104+
<ul>
105+
<li>STM32WB55xx, STM32WB5Mxx, STM32WB50xx, STM32WB35xx and STM32WB30xx devices.</li>
106+
</ul>
107+
</div>
108+
</div>
109+
<div class="collapse">
110+
<input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true">v1.3.0 / 11-September-2019</label>
111+
<div>
112+
<h2 id="main-changes-1">Main Changes</h2>
55113
<p>Maintenance release for <strong>STM32WBxx</strong> devices (stm32wb55xx and stm32wb50xx devices)</p>
56114
<table>
57115
<thead>
@@ -74,13 +132,13 @@ <h2 id="main-changes">Main Changes</h2>
74132
</tr>
75133
</tbody>
76134
</table>
77-
<h2 id="development-toolchains-and-compilers">Development Toolchains and Compilers</h2>
135+
<h2 id="development-toolchains-and-compilers-1">Development Toolchains and Compilers</h2>
78136
<ul>
79137
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V8.20.2</li>
80138
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.25</li>
81139
<li>System Workbench STM32 (SW4STM32) toolchain V2.7</li>
82140
</ul>
83-
<h2 id="supported-devices-and-boards">Supported Devices and boards</h2>
141+
<h2 id="supported-devices-and-boards-1">Supported Devices and boards</h2>
84142
<ul>
85143
<li>STM32WB55xx, STM32WB50xx devices</li>
86144
</ul>
@@ -89,18 +147,18 @@ <h2 id="supported-devices-and-boards">Supported Devices and boards</h2>
89147
<div class="collapse">
90148
<input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" aria-hidden="true">V1.2.0 / 26-June-2019</label>
91149
<div>
92-
<h2 id="main-changes-1">Main Changes</h2>
150+
<h2 id="main-changes-2">Main Changes</h2>
93151
<h3 id="introduction-of-stm32wb50xx-device">Introduction of STM32WB50xx device</h3>
94152
<p>First release for STM32WBxx CMSIS introducing <strong>stm32wb50xx</strong> devices.</p>
95153
<h2 id="contents">Contents</h2>
96154
<p>CMSIS devices files for stm32wb55xx, stm32wb50xx devices.</p>
97-
<h2 id="development-toolchains-and-compilers-1">Development Toolchains and Compilers</h2>
155+
<h2 id="development-toolchains-and-compilers-2">Development Toolchains and Compilers</h2>
98156
<ul>
99157
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V8.20.2</li>
100158
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.25</li>
101159
<li>System Workbench STM32 (SW4STM32) toolchain V2.7</li>
102160
</ul>
103-
<h2 id="supported-devices-and-boards-1">Supported Devices and boards</h2>
161+
<h2 id="supported-devices-and-boards-2">Supported Devices and boards</h2>
104162
<ul>
105163
<li>STM32WB55xx and STM32WB50xx devices</li>
106164
</ul>
@@ -109,7 +167,7 @@ <h2 id="supported-devices-and-boards-1">Supported Devices and boards</h2>
109167
<div class="collapse">
110168
<input type="checkbox" id="collapse-section2" aria-hidden="true"> <label for="collapse-section2" aria-hidden="true">V1.1.0 / 05-April-2019</label>
111169
<div>
112-
<h2 id="main-changes-2">Main Changes</h2>
170+
<h2 id="main-changes-3">Main Changes</h2>
113171
<h3 id="maintenance-release">Maintenance release</h3>
114172
<p>Maintenance release for <strong>STM32WBxx</strong> devices (stm32wb55xx devices)</p>
115173
<table>
@@ -133,7 +191,7 @@ <h3 id="maintenance-release">Maintenance release</h3>
133191
<div class="collapse">
134192
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true">V1.0.0 / 06-February-2019</label>
135193
<div>
136-
<h2 id="main-changes-3">Main Changes</h2>
194+
<h2 id="main-changes-4">Main Changes</h2>
137195
<h3 id="first-release">First release</h3>
138196
<p>Add support of STM32WB55xx.</p>
139197
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
/**
2+
*****************************************************************************
3+
**
4+
** File : stm32wb30xx_flash_cm4.ld
5+
**
6+
** Abstract : System Workbench Minimal System calls file
7+
**
8+
** For more information about which c-functions
9+
** need which of these lowlevel functions
10+
** please consult the Newlib libc-manual
11+
**
12+
** Environment : System Workbench for MCU
13+
**
14+
** Distribution: The file is distributed “as is,” without any warranty
15+
** of any kind.
16+
**
17+
*****************************************************************************
18+
**
19+
** <h2><center>&copy; COPYRIGHT(c) 2019 Ac6</center></h2>
20+
**
21+
** Redistribution and use in source and binary forms, with or without modification,
22+
** are permitted provided that the following conditions are met:
23+
** 1. Redistributions of source code must retain the above copyright notice,
24+
** this list of conditions and the following disclaimer.
25+
** 2. Redistributions in binary form must reproduce the above copyright notice,
26+
** this list of conditions and the following disclaimer in the documentation
27+
** and/or other materials provided with the distribution.
28+
** 3. Neither the name of Ac6 nor the names of its contributors
29+
** may be used to endorse or promote products derived from this software
30+
** without specific prior written permission.
31+
**
32+
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33+
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34+
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35+
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
36+
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37+
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
38+
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
39+
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
40+
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41+
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42+
**
43+
*****************************************************************************
44+
*/
45+
46+
/* Entry Point */
47+
ENTRY(Reset_Handler)
48+
49+
/* Highest address of the user mode stack */
50+
_estack = 0x20008000; /* end of RAM */
51+
/* Generate a link error if heap and stack don't fit into RAM */
52+
_Min_Heap_Size = 0x400; /* required amount of heap */
53+
_Min_Stack_Size = 0x1000; /* required amount of stack */
54+
55+
/* Specify the memory areas */
56+
MEMORY
57+
{
58+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
59+
RAM1 (xrw) : ORIGIN = 0x20000004, LENGTH = 0x7FFC
60+
RAM_SHARED (xrw) : ORIGIN = 0x20008000, LENGTH = 10K
61+
}
62+
63+
/* Define output sections */
64+
SECTIONS
65+
{
66+
/* The startup code goes first into FLASH */
67+
.isr_vector :
68+
{
69+
. = ALIGN(4);
70+
KEEP(*(.isr_vector)) /* Startup code */
71+
. = ALIGN(4);
72+
} >FLASH
73+
74+
/* The program code and other data goes into FLASH */
75+
.text :
76+
{
77+
. = ALIGN(4);
78+
*(.text) /* .text sections (code) */
79+
*(.text*) /* .text* sections (code) */
80+
*(.glue_7) /* glue arm to thumb code */
81+
*(.glue_7t) /* glue thumb to arm code */
82+
*(.eh_frame)
83+
84+
KEEP (*(.init))
85+
KEEP (*(.fini))
86+
87+
. = ALIGN(4);
88+
_etext = .; /* define a global symbols at end of code */
89+
} >FLASH
90+
91+
/* Constant data goes into FLASH */
92+
.rodata :
93+
{
94+
. = ALIGN(4);
95+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
96+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
97+
. = ALIGN(4);
98+
} >FLASH
99+
100+
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
101+
.ARM : {
102+
__exidx_start = .;
103+
*(.ARM.exidx*)
104+
__exidx_end = .;
105+
} >FLASH
106+
107+
.preinit_array :
108+
{
109+
PROVIDE_HIDDEN (__preinit_array_start = .);
110+
KEEP (*(.preinit_array*))
111+
PROVIDE_HIDDEN (__preinit_array_end = .);
112+
} >FLASH
113+
.init_array :
114+
{
115+
PROVIDE_HIDDEN (__init_array_start = .);
116+
KEEP (*(SORT(.init_array.*)))
117+
KEEP (*(.init_array*))
118+
PROVIDE_HIDDEN (__init_array_end = .);
119+
} >FLASH
120+
.fini_array :
121+
{
122+
PROVIDE_HIDDEN (__fini_array_start = .);
123+
KEEP (*(SORT(.fini_array.*)))
124+
KEEP (*(.fini_array*))
125+
PROVIDE_HIDDEN (__fini_array_end = .);
126+
} >FLASH
127+
128+
/* used by the startup to initialize data */
129+
_sidata = LOADADDR(.data);
130+
131+
/* Initialized data sections goes into RAM, load LMA copy after code */
132+
.data :
133+
{
134+
. = ALIGN(4);
135+
_sdata = .; /* create a global symbol at data start */
136+
*(.data) /* .data sections */
137+
*(.data*) /* .data* sections */
138+
139+
. = ALIGN(4);
140+
_edata = .; /* define a global symbol at data end */
141+
} >RAM1 AT> FLASH
142+
143+
144+
/* Uninitialized data section */
145+
. = ALIGN(4);
146+
.bss :
147+
{
148+
/* This is used by the startup in order to initialize the .bss secion */
149+
_sbss = .; /* define a global symbol at bss start */
150+
__bss_start__ = _sbss;
151+
*(.bss)
152+
*(.bss*)
153+
*(COMMON)
154+
155+
. = ALIGN(4);
156+
_ebss = .; /* define a global symbol at bss end */
157+
__bss_end__ = _ebss;
158+
} >RAM1
159+
160+
/* User_heap_stack section, used to check that there is enough RAM left */
161+
._user_heap_stack :
162+
{
163+
. = ALIGN(8);
164+
PROVIDE ( end = . );
165+
PROVIDE ( _end = . );
166+
. = . + _Min_Heap_Size;
167+
. = . + _Min_Stack_Size;
168+
. = ALIGN(8);
169+
} >RAM1
170+
171+
172+
173+
/* Remove information from the standard libraries */
174+
/DISCARD/ :
175+
{
176+
libc.a ( * )
177+
libm.a ( * )
178+
libgcc.a ( * )
179+
}
180+
181+
.ARM.attributes 0 : { *(.ARM.attributes) }
182+
MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED
183+
MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED
184+
MB_MEM2 (NOLOAD) : { _sMB_MEM2 = . ; *(MB_MEM2) ; _eMB_MEM2 = . ; } >RAM_SHARED
185+
}

0 commit comments

Comments
 (0)