Skip to content

Commit 8d26d77

Browse files
authored
Merge pull request #12482 from AGlass0fMilk/add-nucleo-g474re
NUCLEO_G474RE: Add new platform
2 parents 59df4ef + 28e221d commit 8d26d77

File tree

264 files changed

+385308
-1
lines changed

Some content is hidden

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

264 files changed

+385308
-1
lines changed

targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMSIS/stm32g431xx.h

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

targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMSIS/stm32g441xx.h

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

targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMSIS/stm32g471xx.h

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

targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMSIS/stm32g473xx.h

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

targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMSIS/stm32g474xx.h

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

targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMSIS/stm32g483xx.h

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

targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMSIS/stm32g484xx.h

Lines changed: 18147 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32g4xx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS STM32G4xx Device Peripheral Access Layer Header File.
6+
*
7+
* The file is the unique include file that the application programmer
8+
* is using in the C source code, usually in main.c. This file contains:
9+
* - Configuration section that allows to select:
10+
* - The STM32G4xx device used in the target application
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
14+
* "#define USE_HAL_DRIVER"
15+
*
16+
******************************************************************************
17+
* @attention
18+
*
19+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
20+
* All rights reserved.</center></h2>
21+
*
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
26+
*
27+
******************************************************************************
28+
*/
29+
30+
/** @addtogroup CMSIS
31+
* @{
32+
*/
33+
34+
/** @addtogroup stm32g4xx
35+
* @{
36+
*/
37+
38+
#ifndef __STM32G4xx_H
39+
#define __STM32G4xx_H
40+
41+
#ifdef __cplusplus
42+
extern "C" {
43+
#endif /* __cplusplus */
44+
45+
/** @addtogroup Library_configuration_section
46+
* @{
47+
*/
48+
49+
/**
50+
* @brief STM32 Family
51+
*/
52+
#if !defined (STM32G4)
53+
#define STM32G4
54+
#endif /* STM32G4 */
55+
56+
/* Uncomment the line below according to the target STM32G4 device used in your
57+
application
58+
*/
59+
60+
#if !defined (STM32G431xx) && !defined (STM32G441xx) && \
61+
!defined (STM32G471xx) && !defined (STM32G473xx) && !defined (STM32G474xx) && !defined (STM32G483xx) && !defined (STM32G484xx) && !defined (STM32GBK1CB)
62+
/* #define STM32G431xx */ /*!< STM32G431xx Devices */
63+
/* #define STM32G441xx */ /*!< STM32G441xx Devices */
64+
/* #define STM32G471xx */ /*!< STM32G471xx Devices */
65+
/* #define STM32G473xx */ /*!< STM32G473xx Devices */
66+
/* #define STM32G483xx */ /*!< STM32G483xx Devices */
67+
/* #define STM32G474xx */ /*!< STM32G474xx Devices */
68+
/* #define STM32G484xx */ /*!< STM32G484xx Devices */
69+
/* #define STM32GBK1CB */ /*!< STM32GBK1CB Devices */
70+
#endif
71+
72+
/* Tip: To avoid modifying this file each time you need to switch between these
73+
devices, you can define the device in your toolchain compiler preprocessor.
74+
*/
75+
#if !defined (USE_HAL_DRIVER)
76+
/**
77+
* @brief Comment the line below if you will not use the peripherals drivers.
78+
In this case, these drivers will not be included and the application code will
79+
be based on direct access to peripherals registers
80+
*/
81+
/*#define USE_HAL_DRIVER */
82+
#endif /* USE_HAL_DRIVER */
83+
84+
/**
85+
* @brief CMSIS Device version number $VERSION$
86+
*/
87+
#define __STM32G4_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
88+
#define __STM32G4_CMSIS_VERSION_SUB1 (0x01U) /*!< [23:16] sub1 version */
89+
#define __STM32G4_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
90+
#define __STM32G4_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
91+
#define __STM32G4_CMSIS_VERSION ((__STM32G4_CMSIS_VERSION_MAIN << 24)\
92+
|(__STM32G4_CMSIS_VERSION_SUB1 << 16)\
93+
|(__STM32G4_CMSIS_VERSION_SUB2 << 8 )\
94+
|(__STM32G4_CMSIS_VERSION_RC))
95+
96+
/**
97+
* @}
98+
*/
99+
100+
/** @addtogroup Device_Included
101+
* @{
102+
*/
103+
104+
#if defined(STM32G431xx)
105+
#include "stm32g431xx.h"
106+
#elif defined(STM32G441xx)
107+
#include "stm32g441xx.h"
108+
#elif defined(STM32G471xx)
109+
#include "stm32g471xx.h"
110+
#elif defined(STM32G473xx)
111+
#include "stm32g473xx.h"
112+
#elif defined(STM32G483xx)
113+
#include "stm32g483xx.h"
114+
#elif defined(STM32G474xx)
115+
#include "stm32g474xx.h"
116+
#elif defined(STM32G484xx)
117+
#include "stm32g484xx.h"
118+
#elif defined(STM32GBK1CB)
119+
#include "stm32gbk1cb.h"
120+
#else
121+
#error "Please select first the target STM32G4xx device used in your application (in stm32g4xx.h file)"
122+
#endif
123+
124+
/**
125+
* @}
126+
*/
127+
128+
/** @addtogroup Exported_types
129+
* @{
130+
*/
131+
typedef enum
132+
{
133+
RESET = 0,
134+
SET = !RESET
135+
} FlagStatus, ITStatus;
136+
137+
typedef enum
138+
{
139+
DISABLE = 0,
140+
ENABLE = !DISABLE
141+
} FunctionalState;
142+
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
143+
144+
typedef enum
145+
{
146+
SUCCESS = 0,
147+
ERROR = !SUCCESS
148+
} ErrorStatus;
149+
150+
/**
151+
* @}
152+
*/
153+
154+
155+
/** @addtogroup Exported_macros
156+
* @{
157+
*/
158+
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
159+
160+
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
161+
162+
#define READ_BIT(REG, BIT) ((REG) & (BIT))
163+
164+
#define CLEAR_REG(REG) ((REG) = (0x0))
165+
166+
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
167+
168+
#define READ_REG(REG) ((REG))
169+
170+
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
171+
172+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
173+
174+
175+
/**
176+
* @}
177+
*/
178+
179+
#if defined (USE_HAL_DRIVER)
180+
#include "stm32g4xx_hal.h"
181+
#endif /* USE_HAL_DRIVER */
182+
183+
#ifdef __cplusplus
184+
}
185+
#endif /* __cplusplus */
186+
187+
#endif /* __STM32G4xx_H */
188+
/**
189+
* @}
190+
*/
191+
192+
/**
193+
* @}
194+
*/
195+
196+
197+
198+
199+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)