aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-09-19 13:00:18 +1000
committerGitHub <noreply@github.com>2020-09-18 20:00:18 -0700
commit0140baf7e0b041df841f8782743344a4ebe4ebe1 (patch)
tree91d933bc255432b751e8535dff501bbb0206d7a3 /quantum
parentb0024470ed347271e29b2de4d0442f855a26345c (diff)
downloadqmk_firmware-0140baf7e0b041df841f8782743344a4ebe4ebe1.tar.gz
qmk_firmware-0140baf7e0b041df841f8782743344a4ebe4ebe1.zip
Add STM32F401/F411 to mcu_selection.mk (#10278)
* Reorder STM32 MCUs * Add STM32F4xx to mcu_selection.mk * Set MCU for phoenix and tkw/stoutgat/v2/f411
Diffstat (limited to 'quantum')
-rw-r--r--quantum/mcu_selection.mk126
1 files changed, 96 insertions, 30 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 33a0cabc8..6ec5dff5f 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -82,37 +82,37 @@ ifneq ($(findstring MK20DX256, $(MCU)),)
82 BOARD ?= PJRC_TEENSY_3_1 82 BOARD ?= PJRC_TEENSY_3_1
83endif 83endif
84 84
85ifneq ($(findstring STM32F303, $(MCU)),) 85ifneq ($(findstring STM32F042, $(MCU)),)
86 # Cortex version 86 # Cortex version
87 MCU = cortex-m4 87 MCU = cortex-m0
88 88
89 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 89 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
90 ARMV = 7 90 ARMV = 6
91 91
92 ## chip/board settings 92 ## chip/board settings
93 # - the next two should match the directories in 93 # - the next two should match the directories in
94 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) 94 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
95 MCU_FAMILY = STM32 95 MCU_FAMILY = STM32
96 MCU_SERIES = STM32F3xx 96 MCU_SERIES = STM32F0xx
97 97
98 # Linker script to use 98 # Linker script to use
99 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ 99 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
100 # or <keyboard_dir>/ld/ 100 # or <keyboard_dir>/ld/
101 MCU_LDSCRIPT ?= STM32F303xC 101 MCU_LDSCRIPT ?= STM32F042x6
102 102
103 # Startup code to use 103 # Startup code to use
104 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ 104 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
105 MCU_STARTUP ?= stm32f3xx 105 MCU_STARTUP ?= stm32f0xx
106 106
107 # Board: it should exist either in <chibios>/os/hal/boards/, 107 # Board: it should exist either in <chibios>/os/hal/boards/,
108 # <keyboard_dir>/boards/, or drivers/boards/ 108 # <keyboard_dir>/boards/, or drivers/boards/
109 BOARD ?= GENERIC_STM32_F303XC 109 BOARD ?= GENERIC_STM32_F042X6
110 110
111 USE_FPU ?= yes 111 USE_FPU ?= no
112 112
113 # Options to pass to dfu-util when flashing 113 # Options to pass to dfu-util when flashing
114 DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave 114 DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
115 DFU_SUFFIX_ARGS ?= -v 0483 -p df11 115 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
116endif 116endif
117 117
118ifneq ($(findstring STM32F072, $(MCU)),) 118ifneq ($(findstring STM32F072, $(MCU)),)
@@ -144,46 +144,46 @@ ifneq ($(findstring STM32F072, $(MCU)),)
144 USE_FPU ?= no 144 USE_FPU ?= no
145 145
146 # Options to pass to dfu-util when flashing 146 # Options to pass to dfu-util when flashing
147 DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave 147 DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
148 DFU_SUFFIX_ARGS ?= -v 0483 -p df11 148 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
149endif 149endif
150 150
151ifneq ($(findstring STM32F042, $(MCU)),) 151ifneq ($(findstring STM32F103, $(MCU)),)
152 # Cortex version 152 # Cortex version
153 MCU = cortex-m0 153 MCU = cortex-m3
154 154
155 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 155 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
156 ARMV = 6 156 ARMV = 7
157 157
158 ## chip/board settings 158 ## chip/board settings
159 # - the next two should match the directories in 159 # - the next two should match the directories in
160 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) 160 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
161 MCU_FAMILY = STM32 161 MCU_FAMILY = STM32
162 MCU_SERIES = STM32F0xx 162 MCU_SERIES = STM32F1xx
163 163
164 # Linker script to use 164 # Linker script to use
165 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ 165 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
166 # or <keyboard_dir>/ld/ 166 # or <keyboard_dir>/ld/
167 MCU_LDSCRIPT ?= STM32F042x6 167 MCU_LDSCRIPT ?= STM32F103x8
168 168
169 # Startup code to use 169 # Startup code to use
170 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ 170 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
171 MCU_STARTUP ?= stm32f0xx 171 MCU_STARTUP ?= stm32f1xx
172 172
173 # Board: it should exist either in <chibios>/os/hal/boards/, 173 # Board: it should exist either in <chibios>/os/hal/boards/,
174 # <keyboard_dir>/boards/, or drivers/boards/ 174 # <keyboard_dir>/boards/, or drivers/boards/
175 BOARD ?= GENERIC_STM32_F042X6 175 BOARD ?= GENERIC_STM32_F103
176 176
177 USE_FPU ?= no 177 USE_FPU ?= no
178 178
179 # Options to pass to dfu-util when flashing 179 # Options to pass to dfu-util when flashing
180 DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave 180 DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
181 DFU_SUFFIX_ARGS ?= -v 0483 -p df11 181 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
182endif 182endif
183 183
184ifneq ($(findstring STM32F103, $(MCU)),) 184ifneq ($(findstring STM32F303, $(MCU)),)
185 # Cortex version 185 # Cortex version
186 MCU = cortex-m3 186 MCU = cortex-m4
187 187
188 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 188 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
189 ARMV = 7 189 ARMV = 7
@@ -192,26 +192,92 @@ ifneq ($(findstring STM32F103, $(MCU)),)
192 # - the next two should match the directories in 192 # - the next two should match the directories in
193 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) 193 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
194 MCU_FAMILY = STM32 194 MCU_FAMILY = STM32
195 MCU_SERIES = STM32F1xx 195 MCU_SERIES = STM32F3xx
196 196
197 # Linker script to use 197 # Linker script to use
198 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ 198 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
199 # or <keyboard_dir>/ld/ 199 # or <keyboard_dir>/ld/
200 MCU_LDSCRIPT ?= STM32F103x8 200 MCU_LDSCRIPT ?= STM32F303xC
201 201
202 # Startup code to use 202 # Startup code to use
203 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ 203 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
204 MCU_STARTUP ?= stm32f1xx 204 MCU_STARTUP ?= stm32f3xx
205 205
206 # Board: it should exist either in <chibios>/os/hal/boards/, 206 # Board: it should exist either in <chibios>/os/hal/boards/,
207 # <keyboard_dir>/boards/, or drivers/boards/ 207 # <keyboard_dir>/boards/, or drivers/boards/
208 BOARD ?= GENERIC_STM32_F103 208 BOARD ?= GENERIC_STM32_F303XC
209 209
210 USE_FPU ?= no 210 USE_FPU ?= yes
211
212 # Options to pass to dfu-util when flashing
213 DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
214 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
215endif
216
217ifneq ($(findstring STM32F401, $(MCU)),)
218 # Cortex version
219 MCU = cortex-m4
220
221 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
222 ARMV = 7
223
224 ## chip/board settings
225 # - the next two should match the directories in
226 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
227 MCU_FAMILY = STM32
228 MCU_SERIES = STM32F4xx
229
230 # Linker script to use
231 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
232 # or <keyboard_dir>/ld/
233 MCU_LDSCRIPT ?= STM32F401xC
234
235 # Startup code to use
236 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
237 MCU_STARTUP ?= stm32f4xx
238
239 # Board: it should exist either in <chibios>/os/hal/boards/,
240 # <keyboard_dir>/boards/, or drivers/boards/
241 BOARD ?= BLACKPILL_STM32_F401
242
243 USE_FPU ?= yes
244
245 # Options to pass to dfu-util when flashing
246 DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
247 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
248endif
249
250ifneq ($(findstring STM32F411, $(MCU)),)
251 # Cortex version
252 MCU = cortex-m4
253
254 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
255 ARMV = 7
256
257 ## chip/board settings
258 # - the next two should match the directories in
259 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
260 MCU_FAMILY = STM32
261 MCU_SERIES = STM32F4xx
262
263 # Linker script to use
264 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
265 # or <keyboard_dir>/ld/
266 MCU_LDSCRIPT ?= STM32F411xE
267
268 # Startup code to use
269 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
270 MCU_STARTUP ?= stm32f4xx
271
272 # Board: it should exist either in <chibios>/os/hal/boards/,
273 # <keyboard_dir>/boards/, or drivers/boards/
274 BOARD ?= BLACKPILL_STM32_F411
275
276 USE_FPU ?= yes
211 277
212 # Options to pass to dfu-util when flashing 278 # Options to pass to dfu-util when flashing
213 DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave 279 DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
214 DFU_SUFFIX_ARGS ?= -v 0483 -p df11 280 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
215endif 281endif
216 282
217ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286)) 283ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286))