Skip to content

Commit b7c6395

Browse files
authored
Merge pull request #14066 from jeromecoutant/DEV_F2
STM32F2 update drivers version to CUBE V1.9.2
2 parents ec32283 + c4cccce commit b7c6395

File tree

198 files changed

+120650
-58715
lines changed

Some content is hidden

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

198 files changed

+120650
-58715
lines changed

targets/TARGET_STM/TARGET_STM32F2/CMakeLists.txt

Lines changed: 7 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
if("NUCLEO_F207ZG" IN_LIST MBED_TARGET_LABELS)
5-
add_subdirectory(TARGET_NUCLEO_F207ZG)
5+
add_subdirectory(TARGET_STM32F207xG)
66
endif()
77

88
target_sources(mbed-core
@@ -15,73 +15,15 @@ target_sources(mbed-core
1515
serial_device.c
1616
spi_api.c
1717

18-
device/stm32f2xx_hal.c
19-
device/stm32f2xx_hal_adc.c
20-
device/stm32f2xx_hal_adc_ex.c
21-
device/stm32f2xx_hal_can.c
22-
device/stm32f2xx_hal_cortex.c
23-
device/stm32f2xx_hal_crc.c
24-
device/stm32f2xx_hal_cryp.c
25-
device/stm32f2xx_hal_dac.c
26-
device/stm32f2xx_hal_dac_ex.c
27-
device/stm32f2xx_hal_dcmi.c
28-
device/stm32f2xx_hal_dma.c
29-
device/stm32f2xx_hal_dma_ex.c
30-
device/stm32f2xx_hal_eth.c
31-
device/stm32f2xx_hal_flash.c
32-
device/stm32f2xx_hal_flash_ex.c
33-
device/stm32f2xx_hal_gpio.c
34-
device/stm32f2xx_hal_hash.c
35-
device/stm32f2xx_hal_hcd.c
36-
device/stm32f2xx_hal_i2c.c
37-
device/stm32f2xx_hal_i2s.c
38-
device/stm32f2xx_hal_irda.c
39-
device/stm32f2xx_hal_iwdg.c
40-
device/stm32f2xx_hal_mmc.c
41-
device/stm32f2xx_hal_nand.c
42-
device/stm32f2xx_hal_nor.c
43-
device/stm32f2xx_hal_pccard.c
44-
device/stm32f2xx_hal_pcd.c
45-
device/stm32f2xx_hal_pcd_ex.c
46-
device/stm32f2xx_hal_pwr.c
47-
device/stm32f2xx_hal_pwr_ex.c
48-
device/stm32f2xx_hal_rcc.c
49-
device/stm32f2xx_hal_rcc_ex.c
50-
device/stm32f2xx_hal_rng.c
51-
device/stm32f2xx_hal_rtc.c
52-
device/stm32f2xx_hal_rtc_ex.c
53-
device/stm32f2xx_hal_sd.c
54-
device/stm32f2xx_hal_smartcard.c
55-
device/stm32f2xx_hal_spi.c
56-
device/stm32f2xx_hal_sram.c
57-
device/stm32f2xx_hal_tim.c
58-
device/stm32f2xx_hal_tim_ex.c
59-
device/stm32f2xx_hal_uart.c
60-
device/stm32f2xx_hal_usart.c
61-
device/stm32f2xx_hal_wwdg.c
62-
device/stm32f2xx_ll_adc.c
63-
device/stm32f2xx_ll_crc.c
64-
device/stm32f2xx_ll_dac.c
65-
device/stm32f2xx_ll_dma.c
66-
device/stm32f2xx_ll_exti.c
67-
device/stm32f2xx_ll_fsmc.c
68-
device/stm32f2xx_ll_gpio.c
69-
device/stm32f2xx_ll_i2c.c
70-
device/stm32f2xx_ll_pwr.c
71-
device/stm32f2xx_ll_rcc.c
72-
device/stm32f2xx_ll_rng.c
73-
device/stm32f2xx_ll_rtc.c
74-
device/stm32f2xx_ll_sdmmc.c
75-
device/stm32f2xx_ll_spi.c
76-
device/stm32f2xx_ll_tim.c
77-
device/stm32f2xx_ll_usart.c
78-
device/stm32f2xx_ll_usb.c
79-
device/stm32f2xx_ll_utils.c
80-
device/system_stm32f2xx.c
8118
)
8219

20+
add_subdirectory(STM32Cube_FW)
21+
8322
target_include_directories(mbed-core
8423
INTERFACE
8524
.
86-
device
25+
./STM32Cube_FW
26+
./STM32Cube_FW/CMSIS
27+
./STM32Cube_FW/STM32F2xx_HAL_Driver
28+
./STM32Cube_FW/STM32F2xx_HAL_Driver/Legacy
8729
)

targets/TARGET_STM/TARGET_STM32F2/STM32Cube_FW/CMSIS/stm32f205xx.h

Lines changed: 13714 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/device/stm32f207xx.h renamed to targets/TARGET_STM/TARGET_STM32F2/STM32Cube_FW/CMSIS/stm32f207xx.h

Lines changed: 5164 additions & 5161 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F2/STM32Cube_FW/CMSIS/stm32f215xx.h

Lines changed: 13969 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F2/STM32Cube_FW/CMSIS/stm32f217xx.h

Lines changed: 15260 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/device/stm32f2xx.h renamed to targets/TARGET_STM/TARGET_STM32F2/STM32Cube_FW/CMSIS/stm32f2xx.h

Lines changed: 51 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,27 @@
22
******************************************************************************
33
* @file stm32f2xx.h
44
* @author MCD Application Team
5-
* @version V2.2.0
6-
* @date 17-March-2017
7-
* @brief CMSIS STM32F2xx Device Peripheral Access Layer Header File.
5+
* @brief CMSIS STM32F2xx Device Peripheral Access Layer Header File.
86
*
97
* The file is the unique include file that the application programmer
108
* is using in the C source code, usually in main.c. This file contains:
119
* - Configuration section that allows to select:
1210
* - The STM32F2xx device used in the target application
13-
* - To use or not the peripheral’s drivers in application code(i.e.
14-
* code will be based on direct access to peripheral’s registers
15-
* rather than drivers API), this option is controlled by
11+
* - To use or not the peripheral’s drivers in application code(i.e.
12+
* code will be based on direct access to peripheral’s registers
13+
* rather than drivers API), this option is controlled by
1614
* "#define USE_HAL_DRIVER"
17-
*
15+
*
1816
******************************************************************************
1917
* @attention
2018
*
21-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
22-
*
23-
* Redistribution and use in source and binary forms, with or without modification,
24-
* are permitted provided that the following conditions are met:
25-
* 1. Redistributions of source code must retain the above copyright notice,
26-
* this list of conditions and the following disclaimer.
27-
* 2. Redistributions in binary form must reproduce the above copyright notice,
28-
* this list of conditions and the following disclaimer in the documentation
29-
* and/or other materials provided with the distribution.
30-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
31-
* may be used to endorse or promote products derived from this software
32-
* without specific prior written permission.
19+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
20+
* All rights reserved.</center></h2>
3321
*
34-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
35-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
38-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
39-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
40-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
41-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
42-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
43-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22+
* This software component is licensed by ST under BSD 3-Clause license,
23+
* the "License"; You may not use this file except in compliance with the
24+
* License. You may obtain a copy of the License at:
25+
* opensource.org/licenses/BSD-3-Clause
4426
*
4527
******************************************************************************
4628
*/
@@ -52,14 +34,14 @@
5234
/** @addtogroup stm32f2xx
5335
* @{
5436
*/
55-
37+
5638
#ifndef __STM32F2xx_H
5739
#define __STM32F2xx_H
5840

5941
#ifdef __cplusplus
60-
extern "C" {
42+
extern "C" {
6143
#endif /* __cplusplus */
62-
44+
6345
/** @addtogroup Library_configuration_section
6446
* @{
6547
*/
@@ -70,40 +52,40 @@ extern "C" {
7052
#if !defined (STM32F2)
7153
#define STM32F2
7254
#endif /* STM32F2 */
73-
55+
7456
/* Uncomment the line below according to the target STM32 device used in your
75-
application
57+
application
7658
*/
7759
#if !defined (STM32F205xx) && !defined (STM32F215xx) && !defined (STM32F207xx) && !defined (STM32F217xx)
7860

79-
/* #define STM32F205xx */ /*!< STM32F205RG, STM32F205VG, STM32F205ZG, STM32F205RF, STM32F205VF, STM32F205ZF,
80-
STM32F205RE, STM32F205VE, STM32F205ZE, STM32F205RC, STM32F205VC, STM32F205ZC,
81-
STM32F205RB and STM32F205VB Devices */
82-
/* #define STM32F215xx */ /*!< STM32F215RG, STM32F215VG, STM32F215ZG, STM32F215RE, STM32F215VE and STM32F215ZE Devices */
83-
#define STM32F207xx /*!< STM32F207VG, STM32F207ZG, STM32F207IG, STM32F207VF, STM32F207ZF, STM32F207IF,
61+
/* #define STM32F205xx */ /*!< STM32F205RG, STM32F205VG, STM32F205ZG, STM32F205RF, STM32F205VF, STM32F205ZF,
62+
STM32F205RE, STM32F205VE, STM32F205ZE, STM32F205RC, STM32F205VC, STM32F205ZC,
63+
STM32F205RB and STM32F205VB Devices */
64+
/* #define STM32F215xx */ /*!< STM32F215RG, STM32F215VG, STM32F215ZG, STM32F215RE, STM32F215VE and STM32F215ZE Devices */
65+
/* #define STM32F207xx */ /*!< STM32F207VG, STM32F207ZG, STM32F207IG, STM32F207VF, STM32F207ZF, STM32F207IF,
8466
STM32F207VE, STM32F207ZE, STM32F207IE, STM32F207VC, STM32F207ZC and STM32F207IC Devices */
85-
/* #define STM32F217xx */ /*!< STM32F217VG, STM32F217ZG, STM32F217IG, STM32F217VE, STM32F217ZE and STM32F217IE Devices */
86-
67+
/* #define STM32F217xx */ /*!< STM32F217VG, STM32F217ZG, STM32F217IG, STM32F217VE, STM32F217ZE and STM32F217IE Devices */
68+
8769
#endif
88-
70+
8971
/* Tip: To avoid modifying this file each time you need to switch between these
9072
devices, you can define the device in your toolchain compiler preprocessor.
9173
*/
9274
#if !defined (USE_HAL_DRIVER)
9375
/**
9476
* @brief Comment the line below if you will not use the peripherals drivers.
95-
In this case, these drivers will not be included and the application code will
96-
be based on direct access to peripherals registers
77+
In this case, these drivers will not be included and the application code will
78+
be based on direct access to peripherals registers
9779
*/
98-
#define USE_HAL_DRIVER
80+
/*#define USE_HAL_DRIVER */
9981
#endif /* USE_HAL_DRIVER */
10082

10183
/**
102-
* @brief CMSIS Device version number V2.2.0
84+
* @brief CMSIS Device version number V2.2.4
10385
*/
10486
#define __STM32F2xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
10587
#define __STM32F2xx_CMSIS_VERSION_SUB1 (0x02U) /*!< [23:16] sub1 version */
106-
#define __STM32F2xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
88+
#define __STM32F2xx_CMSIS_VERSION_SUB2 (0x04U) /*!< [15:8] sub2 version */
10789
#define __STM32F2xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
10890
#define __STM32F2xx_CMSIS_VERSION ((__STM32F2xx_CMSIS_VERSION_MAIN << 24)\
10991
|(__STM32F2xx_CMSIS_VERSION_SUB1 << 16)\
@@ -119,15 +101,15 @@ extern "C" {
119101
*/
120102

121103
#if defined(STM32F205xx)
122-
#include "stm32f205xx.h"
104+
#include "stm32f205xx.h"
123105
#elif defined(STM32F215xx)
124-
#include "stm32f215xx.h"
106+
#include "stm32f215xx.h"
125107
#elif defined(STM32F207xx)
126-
#include "stm32f207xx.h"
108+
#include "stm32f207xx.h"
127109
#elif defined(STM32F217xx)
128-
#include "stm32f217xx.h"
110+
#include "stm32f217xx.h"
129111
#else
130-
#error "Please select first the target STM32F2xx device used in your application (in stm32f2xx.h file)"
112+
#error "Please select first the target STM32F2xx device used in your application (in stm32f2xx.h file)"
131113
#endif
132114

133115
/**
@@ -136,21 +118,24 @@ extern "C" {
136118

137119
/** @addtogroup Exported_types
138120
* @{
139-
*/
140-
typedef enum {
141-
RESET = 0,
142-
SET = !RESET
121+
*/
122+
typedef enum
123+
{
124+
RESET = 0U,
125+
SET = !RESET
143126
} FlagStatus, ITStatus;
144127

145-
typedef enum {
146-
DISABLE = 0,
147-
ENABLE = !DISABLE
128+
typedef enum
129+
{
130+
DISABLE = 0U,
131+
ENABLE = !DISABLE
148132
} FunctionalState;
149133
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
150134

151-
typedef enum {
152-
ERROR = 0,
153-
SUCCESS = !ERROR
135+
typedef enum
136+
{
137+
SUCCESS = 0U,
138+
ERROR = !SUCCESS
154139
} ErrorStatus;
155140

156141
/**
@@ -175,15 +160,15 @@ typedef enum {
175160

176161
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
177162

178-
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
163+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
179164

180165

181166
/**
182167
* @}
183168
*/
184-
169+
185170
#if defined (USE_HAL_DRIVER)
186-
#include "stm32f2xx_hal.h"
171+
#include "stm32f2xx_hal.h"
187172
#endif /* USE_HAL_DRIVER */
188173

189174
#ifdef __cplusplus
@@ -199,7 +184,7 @@ typedef enum {
199184
/**
200185
* @}
201186
*/
202-
187+
203188

204189

205190

0 commit comments

Comments
 (0)