Skip to content

Update HAL and CMSIS drivers to STM32CubeWL 1.3.0 #1890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 9, 2022
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
4 changes: 4 additions & 0 deletions cores/arduino/stm32/stm32_def_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@
#define CMSIS_STARTUP_FILE "startup_stm32wl55xx_cm0plus.s"
#elif defined(STM32WL55xx) && defined(USE_CM4_STARTUP_FILE)
#define CMSIS_STARTUP_FILE "startup_stm32wl55xx_cm4.s"
#elif defined(STM32WL5Mxx) && defined(USE_CM0PLUS_STARTUP_FILE)
#define CMSIS_STARTUP_FILE "startup_stm32wl5mxx_cm0plus.s"
#elif defined(STM32WL5Mxx) && defined(USE_CM4_STARTUP_FILE)
#define CMSIS_STARTUP_FILE "startup_stm32wl5mxx_cm4.s"
#elif defined(STM32WLE4xx)
#define CMSIS_STARTUP_FILE "startup_stm32wle4xx.s"
#elif defined(STM32WLE5xx)
Expand Down
409 changes: 255 additions & 154 deletions system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl54xx.h

Large diffs are not rendered by default.

409 changes: 255 additions & 154 deletions system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl55xx.h

Large diffs are not rendered by default.

11,558 changes: 11,558 additions & 0 deletions system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl5mxx.h

Large diffs are not rendered by default.

401 changes: 249 additions & 152 deletions system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wle4xx.h

Large diffs are not rendered by default.

401 changes: 249 additions & 152 deletions system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wle5xx.h

Large diffs are not rendered by default.

22 changes: 10 additions & 12 deletions system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wlxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
* is using in the C source code, usually in main.c. This file contains:
* - Configuration section that allows to select:
* - The STM32WLxx device used in the target application
* - To use or not the peripherals drivers in application code(i.e.
* code will be based on direct access to peripherals registers
* - To use or not the peripheral's drivers in application code(i.e.
* code will be based on direct access to peripheral's registers
* rather than drivers API), this option is controlled by
* "#define USE_HAL_DRIVER"
*
******************************************************************************
* @attention
*
* Copyright (c) 2020(-2021) STMicroelectronics.
* Copyright (c) 2020-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -56,12 +56,13 @@
application
*/

#if !defined (STM32WL55xx) && !defined (STM32WL54xx) && !defined (STM32WLE5xx) && !defined (STM32WLE4xx)
#if !defined (STM32WL55xx) && !defined (STM32WL54xx) && !defined (STM32WLE5xx) && !defined (STM32WLE4xx) && !defined(STM32WL5Mxx)
/* #define STM32WL55xx */ /*!< STM32WL55xx Devices */
/* #define STM32WL54xx */ /*!< STM32WL54xx Devices */
/* #define STM32WLE5xx */ /*!< STM32WLE5xx Devices */
/* #define STM32WLE4xx */ /*!< STM32WLE4xx Devices */
#endif
/* #define STM32WL5Mxx */ /*!< STM32WL5Mxx Devices */
#endif /* STM32WL55xx ... */

/* Tip: To avoid modifying this file each time you need to switch between these
devices, you can define the device in your toolchain compiler preprocessor.
Expand All @@ -79,7 +80,7 @@
* @brief CMSIS Device version number
*/
#define __STM32WLxx_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32WLxx_CMSIS_VERSION_SUB1 (0x01U) /*!< [23:16] sub1 version */
#define __STM32WLxx_CMSIS_VERSION_SUB1 (0x02U) /*!< [23:16] sub1 version */
#define __STM32WLxx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
#define __STM32WLxx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32WLxx_CMSIS_DEVICE_VERSION ((__STM32WLxx_CMSIS_VERSION_MAIN << 24)\
Expand All @@ -103,9 +104,11 @@
#include "stm32wl54xx.h"
#elif defined(STM32WLE4xx)
#include "stm32wle4xx.h"
#elif defined(STM32WL5Mxx)
#include "stm32wl5mxx.h"
#else
#error "Please select first the target STM32WLxx device used in your application, for instance xxx (in stm32wlxx.h file)"
#endif
#endif /* STM32WL55xx ... */

/**
* @}
Expand Down Expand Up @@ -275,8 +278,3 @@ typedef enum
/**
* @}
*/




/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2020(-2021) STMicroelectronics.
* Copyright (c) 2020-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down Expand Up @@ -103,4 +103,3 @@ extern void SystemCoreClockUpdate(void);
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
12 changes: 2 additions & 10 deletions system/Drivers/CMSIS/Device/ST/STM32WLxx/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# STM32CubeWL CMSIS Device MCU Component

![latest tag](https://img.shields.io/github/v/tag/STMicroelectronics/cmsis_device_wl.svg?color=brightgreen)

## Overview

**STM32Cube** is an STMicroelectronics original initiative to ease the developers life by reducing efforts, time and cost.
Expand All @@ -27,17 +25,11 @@ Details about the content of this release are available in the release note [her

## Compatibility information

In this table, you can find the successive versions of this CMSIS Device component, in-line with the corresponding versions of the full MCU package:

CMSIS Device WL | CMSIS Core | Was delivered in the full MCU package
--------------- | ---------- | -------------------------------------
Tag v1.0.0 | Tag v5.6.0_cm4 | Tag v1.0.0
Tag v1.1.0 | Tag v5.6.0_cm4 | Tag v1.1.0

It is **crucial** that you use a consistent set of versions for the CMSIS Core - CMSIS Device, as mentioned in [this](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/STM32CubeWL/blob/main/Release_Notes.html) release note.

The full **STM32CubeWL** MCU package is available [here](https://github.com/STMicroelectronics/STM32CubeWL).

## Troubleshooting
If you have any issue with the **Software content** of this repo, you can [file an issue on Github](https://github.com/STMicroelectronics/cmsis_device_wl/issues/new).

For any other question related to the product, the tools, the environment, you can submit a topic on the [ST Community/STM32 MCUs forum](https://community.st.com/s/topic/0TO0X000000BSqSWAW/stm32-mcus).
For any other question related to the product, the tools, the environment, you can submit a topic on the [ST Community/STM32 MCUs forum](https://community.st.com/s/group/0F90X000000AXsASAW/stm32-mcus).
49 changes: 41 additions & 8 deletions system/Drivers/CMSIS/Device/ST/STM32WLxx/Release_Notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ <h1 id="purpose">Purpose</h1>
<li>STM32WL54xx devices</li>
<li>STM32WLE5xx devices</li>
<li>STM32WLE4xx devices</li>
<li>STM32WL5Mxx devices</li>
</ul>
<p>This driver is composed of the descriptions of the registers under “Include” directory.</p>
<p>Various template file are provided to easily build an application. They can be adapted to fit applications requirements.</p>
Expand All @@ -46,10 +47,42 @@ <h1 id="purpose">Purpose</h1>
<div class="col-sm-12 col-lg-8">
<h1 id="update-history">Update History</h1>
<div class="collapse">
<input type="checkbox" id="collapse-section2" checked aria-hidden="true"> <label for="collapse-section2" aria-hidden="true"><strong>V1.1.0 / 16-June-2021</strong></label>
<input type="checkbox" id="collapse-section4" checked aria-hidden="true"> <label for="collapse-section4" aria-hidden="true"><strong>V1.2.0 / 09-November-2022</strong></label>
<div>
<h2 id="main-changes">Main Changes</h2>
<ul>
<li>Add new device STM32WL5Mxx</li>
<li>Rename ADC_TRx to ADC_AWDxTR to match with Reference Manual</li>
<li>Fix inconsistent IRQn_Type enumeration for supervisor call exception with alias for compatibility</li>
</ul>
<h2 id="known-limitations">Known Limitations</h2>
<p>None</p>
<h2 id="dependencies">Dependencies</h2>
<p>None</p>
<h2 id="notes">Notes</h2>
<p>None</p>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" aria-hidden="true"><strong>V1.1.1 / 4-February-2022</strong></label>
<div>
<h2 id="main-changes-1">Main Changes</h2>
<ul>
<li>All source files and templates: update disclaimer to add reference to the new license agreement</li>
</ul>
<h2 id="known-limitations-1">Known Limitations</h2>
<p>None</p>
<h2 id="dependencies-1">Dependencies</h2>
<p>None</p>
<h2 id="notes-1">Notes</h2>
<p>None</p>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section2" aria-hidden="true"> <label for="collapse-section2" aria-hidden="true"><strong>V1.1.0 / 16-June-2021</strong></label>
<div>
<h2 id="main-changes-2">Main Changes</h2>
<ul>
<li>Add atomic register access services:
<ul>
<li>32-bit register access: ATOMIC_SET_BIT(), ATOMIC_CLEAR_BIT(), ATOMIC_MODIFY_REG()</li>
Expand All @@ -58,26 +91,26 @@ <h2 id="main-changes">Main Changes</h2>
<li>Add define LSI_STARTUP_TIME used in default IWDG timeout calculation (HAL_IWDG_DEFAULT_TIMEOUT)</li>
<li>Add reference to user manual for customization of CubeIDE linker files</li>
</ul>
<h2 id="known-limitations">Known Limitations</h2>
<h2 id="known-limitations-2">Known Limitations</h2>
<p>None</p>
<h2 id="dependencies">Dependencies</h2>
<h2 id="dependencies-2">Dependencies</h2>
<p>None</p>
<h2 id="notes">Notes</h2>
<h2 id="notes-2">Notes</h2>
<p>None</p>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true"><strong>V1.0.0 / 28-October-2020</strong></label>
<div>
<h2 id="main-changes-1">Main Changes</h2>
<h2 id="main-changes-3">Main Changes</h2>
<p><strong>First Official Release</strong></p>
<h2 id="contents">Contents</h2>
<p>First official release of CMSIS drivers for STM32WLxx lines</p>
<h2 id="known-limitations-1">Known Limitations</h2>
<h2 id="known-limitations-3">Known Limitations</h2>
<p>None</p>
<h2 id="dependencies-1">Dependencies</h2>
<h2 id="dependencies-3">Dependencies</h2>
<p>None</p>
<h2 id="notes-1">Notes</h2>
<h2 id="notes-3">Notes</h2>
<p>None</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
/*
** LinkerScript
** Note: For specific memory allocation, linker and startup files must be customized.
** Refer to STM32CubeIDE user guide (UM2609), chapter "Modify the linker script".
*/

/* Entry Point */
ENTRY(Reset_Handler)

/* Highest address of the user mode stack */
_estack = ORIGIN(RAM1) + LENGTH(RAM1); /* end of "SRAM1" Ram type memory */

_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */

/* Memories definition */
MEMORY
{
ROM (rx) : ORIGIN = 0x08020000, LENGTH = 128K /* Flash memory dedicated to CM0+ */
RAM1 (xrw) : ORIGIN = 0x20004000, LENGTH = 16K /* Non-backup SRAM1 dedicated to CM0+ */
RAM2 (xrw) : ORIGIN = 0x2000C000, LENGTH = 16K /* Backup SRAM2 dedicated to CM0+ */
}

/* Sections */
SECTIONS
{
/* The startup code into "ROM" Rom type memory */
.isr_vector :
{
. = ALIGN(8);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(8);
} >ROM

/* The program code and other data into "ROM" Rom type memory */
.text :
{
. = ALIGN(8);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)

KEEP (*(.init))
KEEP (*(.fini))

. = ALIGN(8);
_etext = .; /* define a global symbols at end of code */
} >ROM

/* Constant data into "ROM" Rom type memory */
.rodata :
{
. = ALIGN(8);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(8);
} >ROM

.ARM.extab : {
. = ALIGN(8);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(8);
} >ROM

.ARM : {
. = ALIGN(8);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
. = ALIGN(8);
} >ROM

.preinit_array :
{
. = ALIGN(8);
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(8);
} >ROM

.init_array :
{
. = ALIGN(8);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(8);
} >ROM

.fini_array :
{
. = ALIGN(8);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(8);
} >ROM

/* Used by the startup to initialize data */
_sidata = LOADADDR(.data);

/* Initialized data sections into "SRAM1" Ram type memory */
.data :
{
. = ALIGN(8);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

. = ALIGN(8);
_edata = .; /* define a global symbol at data end */

} >RAM1 AT> ROM

/* Uninitialized data section into "SRAM1" Ram type memory */
. = ALIGN(8);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)

. = ALIGN(8);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM1

/* Data section into "SRAM1" Ram type memory: Non-backup SRAM1 dedicated to CM0+ */
. = ALIGN(8);
RAM1_region :
{
_sRAM1_region = .; /* define a global symbol at section start */
*(.RAM1_region)

. = ALIGN(8);
_eRAM1_region = .; /* define a global symbol at section end */
} >RAM1

/* Data section into "SRAM2" Ram type memory: Backup SRAM2 dedicated to CM0+ */
. = ALIGN(8);
RAM2_region :
{
_sRAM2_region = .; /* define a global symbol at section start */
*(.RAM2_region)

. = ALIGN(8);
_eRAM2_region = .; /* define a global symbol at section end */
} >RAM2

/* User_heap_stack section, used to check that there is enough "SRAM1" Ram type memory left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM1

/* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}

.ARM.attributes 0 : { *(.ARM.attributes) }
}
Loading