Skip to content
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

chore(c0): update to latest STM32CubeC0 v1.2.0 #2420

Merged
merged 8 commits into from
Jul 23, 2024
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
2 changes: 2 additions & 0 deletions cores/arduino/stm32/stm32_def_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define CMSIS_STARTUP_FILE "startup_stm32c011xx.s"
#elif defined(STM32C031xx)
#define CMSIS_STARTUP_FILE "startup_stm32c031xx.s"
#elif defined(STM32C071xx)
#define CMSIS_STARTUP_FILE "startup_stm32c071xx.s"
#elif defined(STM32F030x6)
#define CMSIS_STARTUP_FILE "startup_stm32f030x6.s"
#elif defined(STM32F030x8)
Expand Down
4 changes: 3 additions & 1 deletion libraries/SrcWrapper/inc/LL/stm32yyxx_ll_crs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#pragma GCC diagnostic ignored "-Wregister"
#endif

#ifdef STM32F0xx
#ifdef STM32C0xx
#include "stm32c0xx_ll_crs.h"
#elif STM32F0xx
#include "stm32f0xx_ll_crs.h"
#elif STM32G0xx
#include "stm32g0xx_ll_crs.h"
Expand Down
4 changes: 3 additions & 1 deletion libraries/SrcWrapper/inc/LL/stm32yyxx_ll_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#pragma GCC diagnostic ignored "-Wregister"
#endif

#ifdef STM32F0xx
#ifdef STM32C0xx
#include "stm32c0xx_ll_usb.h"
#elif STM32F0xx
#include "stm32f0xx_ll_usb.h"
#elif STM32F1xx
#include "stm32f1xx_ll_usb.h"
Expand Down
4 changes: 3 additions & 1 deletion libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"

#ifdef STM32F1xx
#ifdef STM32C0xx
#include "stm32c0xx_hal_hcd.c"
#elif STM32F1xx
#include "stm32f1xx_hal_hcd.c"
#elif STM32F2xx
#include "stm32f2xx_hal_hcd.c"
Expand Down
4 changes: 3 additions & 1 deletion libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"

#ifdef STM32F0xx
#ifdef STM32C0xx
#include "stm32c0xx_hal_pcd.c"
#elif STM32F0xx
#include "stm32f0xx_hal_pcd.c"
#elif STM32F1xx
#include "stm32f1xx_hal_pcd.c"
Expand Down
4 changes: 3 additions & 1 deletion libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pcd_ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"

#ifdef STM32F0xx
#ifdef STM32C0xx
#include "stm32c0xx_hal_pcd_ex.c"
#elif STM32F0xx
#include "stm32f0xx_hal_pcd_ex.c"
#elif STM32F1xx
#include "stm32f1xx_hal_pcd_ex.c"
Expand Down
4 changes: 3 additions & 1 deletion libraries/SrcWrapper/src/LL/stm32yyxx_ll_crs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"

#ifdef STM32F0xx
#ifdef STM32C0xx
#include "stm32c0xx_ll_crs.c"
#elif STM32F0xx
#include "stm32f0xx_ll_crs.c"
#elif STM32G0xx
#include "stm32g0xx_ll_crs.c"
Expand Down
4 changes: 3 additions & 1 deletion libraries/SrcWrapper/src/LL/stm32yyxx_ll_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"

#ifdef STM32F0xx
#ifdef STM32C0xx
#include "stm32c0xx_ll_usb.c"
#elif STM32F0xx
#include "stm32f0xx_ll_usb.c"
#elif STM32F1xx
#include "stm32f1xx_ll_usb.c"
Expand Down
254 changes: 91 additions & 163 deletions system/Drivers/CMSIS/Device/ST/STM32C0xx/Include/stm32c011xx.h

Large diffs are not rendered by default.

255 changes: 93 additions & 162 deletions system/Drivers/CMSIS/Device/ST/STM32C0xx/Include/stm32c031xx.h

Large diffs are not rendered by default.

7,739 changes: 7,739 additions & 0 deletions system/Drivers/CMSIS/Device/ST/STM32C0xx/Include/stm32c071xx.h

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions system/Drivers/CMSIS/Device/ST/STM32C0xx/Include/stm32c0xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@
application
*/

#if !defined (STM32C011xx) && !defined (STM32C031xx)
#if !defined (STM32C011xx) && !defined (STM32C031xx) && !defined (STM32C071xx)
/* #define STM32C011xx */ /*!< STM32C011xx Devices */
/* #define STM32C031xx */ /*!< STM32C031xx Devices */
/* #define STM32C071xx */ /*!< STM32C071xx Devices */
#endif

/* Tip: To avoid modifying this file each time you need to switch between these
Expand All @@ -77,7 +78,7 @@
* @brief CMSIS Device version number V1.0.0
*/
#define __STM32C0_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32C0_CMSIS_VERSION_SUB1 (0x01U) /*!< [23:16] sub1 version */
#define __STM32C0_CMSIS_VERSION_SUB1 (0x02U) /*!< [23:16] sub1 version */
#define __STM32C0_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
#define __STM32C0_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32C0_CMSIS_VERSION ((__STM32C0_CMSIS_VERSION_MAIN << 24)\
Expand All @@ -97,6 +98,8 @@
#include "stm32c011xx.h"
#elif defined(STM32C031xx)
#include "stm32c031xx.h"
#elif defined(STM32C071xx)
#include "stm32c071xx.h"
#else
#error "Please select first the target STM32C0xx device used in your application (in stm32c0xx.h file)"
#endif
Expand Down
36 changes: 36 additions & 0 deletions system/Drivers/CMSIS/Device/ST/STM32C0xx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# STM32CubeC0 CMSIS Device MCU Component

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

## Overview

**STM32Cube** is a STMicroelectronics original initiative aimed at making life easier for developers by reducing effort, time and cost.

**STM32Cube** covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform delivered for each STM32 series.
* The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product.
* The STM32 HAL-LL drivers, an abstraction layer offering a set of APIs ensuring maximized portability across the STM32 portfolio.
* The BSP drivers of each evaluation, demonstration, or nucleo board provided for this STM32 series.
* A consistent set of middleware libraries such as LevelX, FileX, USBX, OpenBootloader...
* A full set of software projects (basic examples, applications, and demonstrations) for each board, each project developed in three flavors using three toolchains (EWARM, MDK-ARM, and STM32CubeIDE).

Two models of publication are proposed for the STM32Cube embedded software:
* The monolithic **MCU Package**: all STM32Cube software modules of one STM32 series are present (Drivers, Middleware, Projects, Utilities) in the repository (usual name **STM32Cubexx**, xx corresponding to the STM32 series).
* The **MCU component**: each STM32Cube software module being part of the STM32Cube MCU Package, is delivered as an individual repository, allowing the user to select and get only the required software functions.

## Description

This **cmsis_device_c0** MCU component repo is one element of the STM32CubeC0 MCU embedded software package, providing the **cmsis device** part.

## Release note

Details about the content of this release are available in the release note [here](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/cmsis_device_c0/blob/main/Release_Notes.html).

## Compatibility information

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/STM32CubeC0/blob/main/Release_Notes.html) release note.

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

## Troubleshooting

Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) guide.
94 changes: 82 additions & 12 deletions system/Drivers/CMSIS/Device/ST/STM32C0xx/Release_Notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<link rel="stylesheet" href="_htmresc/mini-st_2020.css" />
<link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
<link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
</head>
<body>
<div class="row">
Expand All @@ -33,27 +36,94 @@ <h1 id="release-notes-for-stm32c0xx-cmsis">Release Notes for
<mark> STM32C0xx CMSIS </mark></h1>
<p>Copyright © 2022 STMicroelectronics<br />
</p>
<a href="https://www.st.com" class="logo"><img src="_htmresc/st_logo_2020.png" alt="ST logo" /></a>
<a href="https://www.st.com" class="logo"><img
src="_htmresc/st_logo_2020.png" alt="ST logo" /></a>
</center>
</div>
<div class="col-sm-12 col-lg-8">
<h1 id="update-history">Update History</h1>
<section id="update-history" class="col-sm-12 col-lg-8">
<h1><strong>Update History</strong></h1>
<div class="collapse">
<input type="checkbox" id="collapse-section2" checked aria-hidden="true"> <label for="collapse-section2" checked aria-hidden="true"><strong>V1.1.0 / 07-June-2023</strong></label>
<input type="checkbox" id="collapse-section3" checked aria-hidden="true">
<label for="collapse-section3" checked aria-hidden="true"><strong>V1.2.0
/ 05-June-2024</strong></label>
<div>
<h2 id="main-changes">Main Changes</h2>
<p>Align flash register address with STM32C0 reference manual</p>
<ul>
<li>First official release of STM32C0xx CMSIS drivers to support
<strong>STM32C071xx</strong> devices</li>
<li>General updates to fix known defects and enhance implementation</li>
<li>Align version of bit and registers definition with the STM32C0
reference manual</li>
</ul>
<h2 id="contents">Contents</h2>
<ul>
<li><strong>Support of STM32C071xx devices</strong>:
<ul>
<li>Add “stm32c071xx.h” file</li>
<li>Add startup files “startup_stm32c071xx.s” for EWARM, STM32CubeIDE
and MDK-ARM toolchains</li>
<li>Add STM32C071xx devices linker files for EWARM and STM32CubeIDE
toolchains</li>
</ul></li>
<li><strong>Registers and bit field definitions updates</strong> :
<ul>
<li>Add DMAMUX1_RequestGenerator3_BASE and DMAMUX1_RequestGenerator3
definitions</li>
<li>Remove DMA_IFCR_CGIF4, DMA_IFCR_CTCIF4, DMA_IFCR_CHTIF4 and
DMA_IFCR_CTEIF4 definitions</li>
<li>Add ADC_AWD2CR_AWD2CH_19, ADC_AWD2CR_AWD2CH_20, ADC_AWD2CR_AWD2CH_21
and ADC_AWD2CR_AWD2CH_22 bits definitions</li>
<li>Add ADC_AWD3CR_AWD3CH_19, ADC_AWD3CR_AWD3CH_20,
ADC_AWD3CR_AWD3CH_21, ADC_AWD3CR_AWD3CH_22 bits definitions</li>
<li>Add FLASH_OPTR_SECURE_MUXING_EN bit definition</li>
<li>Correct Flash page number section mask (FLASH_CR_PNB_Msk)</li>
<li>Remove extra FLASH_ECCR register bits definitions</li>
<li>Correct masks values of FLASH_PCROP1ASR, FLASH_WRP1AR, FLASH_WRP1BR,
FLASH_WRP1BR, FLASH_PCROP1BER registers</li>
<li>Add FLASH_SIZE macro to compute Flash size value</li>
<li>Fix correct FLASH_OPTR_BORF_LEV and FLASH_OPTR_BORR_LEV
positions</li>
<li>Remove SYSCFG_CFGR1_BOOSTEN bit definition</li>
<li>Correct SYSCFG_CFGR3 register bits masks values</li>
<li>Change SYSCFG_ITLINE0_SR_EWDG bit definition naming by
SYSCFG_ITLINE0_SR_WWDG to be aligned with the reference manual</li>
<li>Change SYSCFG_ITLINE4_SR_CLK_CTRL bit definition naming by
SYSCFG_ITLINE4_SR_RCC to be aligned with the reference manual</li>
<li>Update IS_TIM_REMAP_INSTANCE and IS_TIM_ETRSEL_INSTANCE macros</li>
<li>Update TIM Capture/Compare masks values</li>
<li>Remove extra EXTI interrupts and events Masks</li>
<li>Remove extra PWR_SR2_REGLPF bits definition</li>
<li>Update some RCC_CFGR bit definitions
<ul>
<li>Remove RCC_CFGR_MCO2PRE_3 and RCC_CFGR_MCOPRE_3 bits definitions as
reserved</li>
<li>Update RCC_CFGR_MCO2PRE_Msk and RCC_CFGR_MCOPRE_Msk masks
values</li>
</ul></li>
</ul></li>
</ul>
<h2 id="supported-devices">Supported Devices</h2>
<ul>
<li>STM32C011xx, STM32C031xx and STM32C071xx devices</li>
</ul>
</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 / 09-February-2022</strong></label>
<div>
<input type="checkbox" id="collapse-section2" aria-hidden="true">
<label for="collapse-section2" aria-hidden="true"><strong>V1.1.0 /
07-June-2023</strong></label>
<h2 id="main-changes-1">Main Changes</h2>
<p>First official release version of bits and registers definition aligned with STM32C0 reference manual</p>
</div>
<p>Align flash register address with STM32C0 reference manual</p>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section1" aria-hidden="true">
<label for="collapse-section1" aria-hidden="true"><strong>V1.0.0 /
09-February-2022</strong></label>
<h2 id="main-changes-2">Main Changes</h2>
<p>First official release version of bits and registers definition
aligned with STM32C0 reference manual</p>
</div>

</section>
</div>
<footer class="sticky">
This release note uses up to date web standards and, for this reason,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Infinite_Loop:
******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
.size g_pfnVectors, .-g_pfnVectors


g_pfnVectors:
Expand Down Expand Up @@ -170,6 +169,8 @@ g_pfnVectors:
.word 0 /* reserved */
.word 0 /* reserved */
.word 0 /* reserved */

.size g_pfnVectors, .-g_pfnVectors
/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Infinite_Loop:
******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
.size g_pfnVectors, .-g_pfnVectors


g_pfnVectors:
Expand Down Expand Up @@ -170,6 +169,8 @@ g_pfnVectors:
.word 0 /* reserved */
.word 0 /* reserved */
.word 0 /* reserved */

.size g_pfnVectors, .-g_pfnVectors
/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
Expand Down
Loading
Loading