diff options
Diffstat (limited to 'quantum/mcu_selection.mk')
| -rw-r--r-- | quantum/mcu_selection.mk | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 6b11eb498..81c467c65 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk | |||
| @@ -279,7 +279,73 @@ ifneq ($(findstring STM32F411, $(MCU)),) | |||
| 279 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 279 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
| 280 | endif | 280 | endif |
| 281 | 281 | ||
| 282 | ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) | 282 | ifneq ($(findstring STM32G431, $(MCU)),) |
| 283 | # Cortex version | ||
| 284 | MCU = cortex-m4 | ||
| 285 | |||
| 286 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
| 287 | ARMV = 7 | ||
| 288 | |||
| 289 | ## chip/board settings | ||
| 290 | # - the next two should match the directories in | ||
| 291 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
| 292 | MCU_FAMILY = STM32 | ||
| 293 | MCU_SERIES = STM32G4xx | ||
| 294 | |||
| 295 | # Linker script to use | ||
| 296 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
| 297 | # or <keyboard_dir>/ld/ | ||
| 298 | MCU_LDSCRIPT ?= STM32G431xB | ||
| 299 | |||
| 300 | # Startup code to use | ||
| 301 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
| 302 | MCU_STARTUP ?= stm32g4xx | ||
| 303 | |||
| 304 | # Board: it should exist either in <chibios>/os/hal/boards/, | ||
| 305 | # <keyboard_dir>/boards/, or drivers/boards/ | ||
| 306 | BOARD ?= GENERIC_STM32_G431XB | ||
| 307 | |||
| 308 | USE_FPU ?= yes | ||
| 309 | |||
| 310 | # Options to pass to dfu-util when flashing | ||
| 311 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 312 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 313 | endif | ||
| 314 | |||
| 315 | ifneq ($(findstring STM32G474, $(MCU)),) | ||
| 316 | # Cortex version | ||
| 317 | MCU = cortex-m4 | ||
| 318 | |||
| 319 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
| 320 | ARMV = 7 | ||
| 321 | |||
| 322 | ## chip/board settings | ||
| 323 | # - the next two should match the directories in | ||
| 324 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
| 325 | MCU_FAMILY = STM32 | ||
| 326 | MCU_SERIES = STM32G4xx | ||
| 327 | |||
| 328 | # Linker script to use | ||
| 329 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
| 330 | # or <keyboard_dir>/ld/ | ||
| 331 | MCU_LDSCRIPT ?= STM32G474xE | ||
| 332 | |||
| 333 | # Startup code to use | ||
| 334 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
| 335 | MCU_STARTUP ?= stm32g4xx | ||
| 336 | |||
| 337 | # Board: it should exist either in <chibios>/os/hal/boards/, | ||
| 338 | # <keyboard_dir>/boards/, or drivers/boards/ | ||
| 339 | BOARD ?= GENERIC_STM32_G474XE | ||
| 340 | |||
| 341 | USE_FPU ?= yes | ||
| 342 | |||
| 343 | # Options to pass to dfu-util when flashing | ||
| 344 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 345 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 346 | endif | ||
| 347 | |||
| 348 | ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) | ||
| 283 | PROTOCOL = LUFA | 349 | PROTOCOL = LUFA |
| 284 | 350 | ||
| 285 | # Processor frequency. | 351 | # Processor frequency. |
| @@ -317,7 +383,7 @@ ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 a | |||
| 317 | ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes)) | 383 | ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes)) |
| 318 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | 384 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT |
| 319 | endif | 385 | endif |
| 320 | ifneq (,$(filter $(MCU),atmega16u2 atmega32u2)) | 386 | ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2)) |
| 321 | NO_I2C = yes | 387 | NO_I2C = yes |
| 322 | endif | 388 | endif |
| 323 | endif | 389 | endif |
