Skip to content

Commit deb52b0

Browse files
raiden00plxiaoxiang781216
authored andcommitted
!arch/arm/src/stm32: remove STM32_USE_LEGACY_PINMAP
BREAKING CHANGE: remove STM32_USE_LEGACY_PINMAP and all references Signed-off-by: raiden00pl <raiden00@railab.me>
1 parent cebdcdc commit deb52b0

319 files changed

Lines changed: 24 additions & 13907 deletions

File tree

Some content is hidden

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

arch/arm/src/stm32/Kconfig

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3481,26 +3481,6 @@ config STM32_NOEXT_VECTORS
34813481
Sometimes you may not need any Vector support beyond SysTick
34823482
and wish to save memory. This applies only to ARMv7-M architectures.
34833483

3484-
config STM32_USE_LEGACY_PINMAP
3485-
bool "Use the legacy pinmap with GPIO_SPEED_xxx included."
3486-
default y
3487-
---help---
3488-
In the past, pinmap files included GPIO_SPEED_xxxMhz. These speed
3489-
settings should have come from the board.h as it describes the wiring
3490-
of the SoC to the board. The speed is really slew rate control and
3491-
therefore is related to the layout and can only be properly set
3492-
in board.h.
3493-
3494-
STM32_USE_LEGACY_PINMAP is provided, to allow lazy migration to
3495-
using pinmaps without speeds. The work required to do this can be aided
3496-
by running tools/stm32_pinmap_tool.py. The tools will take a board.h
3497-
file and a legacy pinmap and output the required changes that one needs
3498-
to make to a board.h file.
3499-
3500-
Eventually, STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
3501-
pinmaps removed from NuttX. Any new boards added should set
3502-
STM32_USE_LEGACY_PINMAP=n and fully define the pins in board.h
3503-
35043484
config STM32_SYSCFG_IOCOMPENSATION
35053485
bool "SYSCFG I/O Compensation"
35063486
default n

arch/arm/src/stm32/hardware/stm32_pinmap.h

Lines changed: 8 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@
3636
/* STM32L15xx family */
3737

3838
# if defined(CONFIG_STM32_STM32L15XX)
39-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
40-
# include "hardware/stm32l15xxx_pinmap_legacy.h"
41-
# else
42-
# include "hardware/stm32l15xxx_pinmap.h"
43-
# endif
39+
# include "hardware/stm32l15xxx_pinmap.h"
4440
# else
4541
# error "Unsupported EnergyLite chip"
4642
# endif
@@ -52,29 +48,17 @@
5248
/* STM32F100 Value Line */
5349

5450
# if defined(CONFIG_STM32_VALUELINE)
55-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
56-
# include "hardware/stm32f100_pinmap_legacy.h"
57-
# else
5851
# include "hardware/stm32f100_pinmap.h"
59-
# endif
6052

6153
/* STM32 F102 USB Access Medium Density Family */
6254
# elif defined(CONFIG_ARCH_CHIP_STM32F102CB)
63-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
64-
# include "hardware/stm32f102_pinmap_legacy.h"
65-
# else
6655
# include "hardware/stm32f102_pinmap.h"
67-
# endif
6856

6957
/* STM32 F103 Low / Medium Density Family */
7058
# elif defined(CONFIG_ARCH_CHIP_STM32F103C4) || \
7159
defined(CONFIG_ARCH_CHIP_STM32F103C8) || \
7260
defined(CONFIG_ARCH_CHIP_STM32F103CB)
73-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
74-
# include "hardware/stm32f103c_pinmap_legacy.h"
75-
# else
7661
# include "hardware/stm32f103c_pinmap.h"
77-
# endif
7862

7963
/* STM32 F103 High Density Family */
8064

@@ -87,105 +71,58 @@
8771
defined(CONFIG_ARCH_CHIP_STM32F103RD) || \
8872
defined(CONFIG_ARCH_CHIP_STM32F103RE) || \
8973
defined(CONFIG_ARCH_CHIP_STM32F103RG)
90-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
91-
# include "hardware/stm32f103r_pinmap_legacy.h"
92-
# else
9374
# include "hardware/stm32f103r_pinmap.h"
94-
# endif
9575

9676
/* STM32F103VC, STM32F103VD, and STM32F103VE are all provided in 100 pin
9777
* packages and differ only in the available FLASH and SRAM.
9878
*/
9979

10080
# elif defined(CONFIG_ARCH_CHIP_STM32F103VC) || defined(CONFIG_ARCH_CHIP_STM32F103VE)
101-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
102-
# include "hardware/stm32f103v_pinmap_legacy.h"
103-
# else
10481
# include "hardware/stm32f103v_pinmap.h"
105-
# endif
10682

10783
/* STM32F103ZC, STM32F103ZD, and STM32F103ZE are all provided in 144 pin
10884
* packages and differ only in the available FLASH and SRAM.
10985
*/
11086
# elif defined(CONFIG_ARCH_CHIP_STM32F103ZE)
111-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
112-
# include "hardware/stm32f103z_pinmap_legacy.h"
113-
# else
11487
# include "hardware/stm32f103z_pinmap.h"
115-
# endif
11688

11789
/* STM32 F105/F107 Connectivity Line */
11890

11991
# elif defined(CONFIG_ARCH_CHIP_STM32F105VB)
120-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
121-
# include "hardware/stm32f105v_pinmap_legacy.h"
122-
# else
12392
# include "hardware/stm32f105v_pinmap.h"
124-
# endif
12593

12694
# elif defined(CONFIG_ARCH_CHIP_STM32F105RB)
127-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
128-
# include "hardware/stm32f105r_pinmap_legacy.h"
129-
# else
13095
# include "hardware/stm32f105r_pinmap.h"
131-
# endif
13296

13397
# elif defined(CONFIG_ARCH_CHIP_STM32F107VC)
134-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
135-
# include "hardware/stm32f107v_pinmap_legacy.h"
136-
# else
13798
# include "hardware/stm32f107v_pinmap.h"
138-
# endif
13999
# else
140100
# error "Unsupported STM32F10XXX chip"
141101
# endif
142102

143103
/* STM32 F2 Family **********************************************************/
144104

145105
#elif defined(CONFIG_STM32_STM32F20XX)
146-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
147-
# include "hardware/stm32f20xxx_pinmap_legacy.h"
148-
# else
149-
# include "hardware/stm32f20xxx_pinmap.h"
150-
# endif
106+
# include "hardware/stm32f20xxx_pinmap.h"
107+
151108
/* STM32 F3 Family **********************************************************/
152109

153110
#elif defined(CONFIG_STM32_STM32F30XX)
154-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
155-
# include "hardware/stm32f30xxx_pinmap_legacy.h"
156-
# else
157-
# include "hardware/stm32f30xxx_pinmap.h"
158-
# endif
111+
# include "hardware/stm32f30xxx_pinmap.h"
159112
#elif defined(CONFIG_STM32_STM32F33XX)
160-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
161-
# include "hardware/stm32f33xxx_pinmap_legacy.h"
162-
# else
163-
# include "hardware/stm32f33xxx_pinmap.h"
164-
# endif
113+
# include "hardware/stm32f33xxx_pinmap.h"
165114
#elif defined(CONFIG_STM32_STM32F37XX)
166-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
167-
# include "hardware/stm32f37xxx_pinmap_legacy.h"
168-
# else
169-
# include "hardware/stm32f37xxx_pinmap.h"
170-
# endif
115+
# include "hardware/stm32f37xxx_pinmap.h"
171116

172117
/* STM32 F412 Family ********************************************************/
173118

174119
#elif defined(CONFIG_STM32_STM32F412)
175-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
176-
# include "hardware/stm32f412xx_pinmap_legacy.h"
177-
# else
178-
# include "hardware/stm32f412xx_pinmap.h"
179-
# endif
120+
# include "hardware/stm32f412xx_pinmap.h"
180121

181122
/* STM32 F4 Family **********************************************************/
182123

183124
#elif defined(CONFIG_STM32_STM32F4XXX)
184-
# if defined(CONFIG_STM32_USE_LEGACY_PINMAP)
185-
# include "hardware/stm32f40xxx_pinmap_legacy.h"
186-
# else
187-
# include "hardware/stm32f40xxx_pinmap.h"
188-
# endif
125+
# include "hardware/stm32f40xxx_pinmap.h"
189126

190127
/* STM32 G4 Family **********************************************************/
191128

0 commit comments

Comments
 (0)