qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

mcu_selection.mk (25505B)


      1 ifneq ($(findstring MKL26Z64, $(MCU)),)
      2   # Cortex version
      3   MCU = cortex-m0plus
      4 
      5   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
      6   ARMV = 6
      7 
      8   ## chip/board settings
      9   # - the next two should match the directories in
     10   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
     11   #   OR
     12   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
     13   MCU_FAMILY = KINETIS
     14   MCU_SERIES = KL2x
     15 
     16   # Linker script to use
     17   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
     18   #   or <keyboard_dir>/ld/
     19   MCU_LDSCRIPT ?= MKL26Z64
     20 
     21   # Startup code to use
     22   #  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
     23   MCU_STARTUP ?= kl2x
     24 
     25   # Board: it should exist either in <chibios>/os/hal/boards/,
     26   # <keyboard_dir>/boards/, or drivers/boards/
     27   BOARD ?= PJRC_TEENSY_LC
     28 endif
     29 
     30 ifneq ($(findstring MK20DX128, $(MCU)),)
     31   # Cortex version
     32   MCU = cortex-m4
     33 
     34   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
     35   ARMV = 7
     36 
     37   ## chip/board settings
     38   # - the next two should match the directories in
     39   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
     40   #   OR
     41   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
     42   MCU_FAMILY = KINETIS
     43   MCU_SERIES = K20x
     44 
     45   # Linker script to use
     46   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
     47   #   or <keyboard_dir>/ld/
     48   MCU_LDSCRIPT ?= MK20DX128
     49 
     50   # Startup code to use
     51   #  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
     52   MCU_STARTUP ?= k20x5
     53 
     54   # Board: it should exist either in <chibios>/os/hal/boards/,
     55   # <keyboard_dir>/boards/, or drivers/boards/
     56   BOARD ?= PJRC_TEENSY_3
     57 endif
     58 
     59 ifneq ($(findstring MK20DX256, $(MCU)),)
     60   # Cortex version
     61   MCU = cortex-m4
     62 
     63   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
     64   ARMV = 7
     65 
     66   ## chip/board settings
     67   # - the next two should match the directories in
     68   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
     69   #   OR
     70   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
     71   MCU_FAMILY = KINETIS
     72   MCU_SERIES = K20x
     73 
     74   # Linker script to use
     75   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
     76   #   or <keyboard_dir>/ld/
     77   MCU_LDSCRIPT ?= MK20DX256
     78 
     79   # Startup code to use
     80   #  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
     81   MCU_STARTUP ?= k20x7
     82 
     83   # Board: it should exist either in <chibios>/os/hal/boards/,
     84   # <keyboard_dir>/boards/, or drivers/boards/
     85   BOARD ?= PJRC_TEENSY_3_1
     86 endif
     87 
     88 ifneq ($(findstring MK64FX512, $(MCU)),)
     89   # Cortex version
     90   MCU = cortex-m4
     91 
     92   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
     93   ARMV = 7
     94 
     95   ## chip/board settings
     96   # - the next two should match the directories in
     97   #   <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
     98   MCU_FAMILY = KINETIS
     99   MCU_SERIES = K60x
    100 
    101   # Linker script to use
    102   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
    103   #   or <keyboard_dir>/ld/
    104   MCU_LDSCRIPT ?= MK64FX512
    105 
    106   # Startup code to use
    107   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    108   MCU_STARTUP ?= k60x
    109 
    110   # Board: it should exist either in <chibios>/os/hal/boards/,
    111   # <keyboard_dir>/boards/, or drivers/boards/
    112   BOARD ?= PJRC_TEENSY_3_5
    113 endif
    114 
    115 ifneq ($(findstring MK66FX1M0, $(MCU)),)
    116   # Cortex version
    117   MCU = cortex-m4
    118 
    119   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    120   ARMV = 7
    121 
    122   ## chip/board settings
    123   # - the next two should match the directories in
    124   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    125   #   OR
    126   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    127   MCU_FAMILY = KINETIS
    128   MCU_SERIES = MK66F18
    129 
    130   # Linker script to use
    131   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
    132   #   or <keyboard_dir>/ld/
    133   MCU_LDSCRIPT ?= MK66FX1M0
    134 
    135   # Startup code to use
    136   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    137   MCU_STARTUP ?= MK66F18
    138 
    139   # Board: it should exist either in <chibios>/os/hal/boards/,
    140   # <keyboard_dir>/boards/, or drivers/boards/
    141   BOARD ?= PJRC_TEENSY_3_6
    142 endif
    143 
    144 ifneq ($(findstring RP2040, $(MCU)),)
    145   # Cortex version
    146   MCU = cortex-m0plus
    147 
    148   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    149   CHIBIOS_PORT = ARMv6-M-RP2
    150 
    151   ## chip/board settings
    152   # - the next two should match the directories in
    153   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    154   #   OR
    155   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    156   MCU_FAMILY = RP
    157   MCU_SERIES = RP2040
    158 
    159   # Linker script to use
    160   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
    161   #   or <keyboard_dir>/ld/
    162   STARTUPLD_CONTRIB = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
    163   MCU_LDSCRIPT ?= RP2040_FLASH_TIMECRIT
    164   LDFLAGS += -L $(STARTUPLD_CONTRIB)
    165 
    166   # Startup code to use
    167   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    168   MCU_STARTUP ?= rp2040
    169 
    170   # Board: it should exist either in <chibios>/os/hal/boards/,
    171   # <keyboard_dir>/boards/, or drivers/boards/
    172   BOARD ?= GENERIC_PROMICRO_RP2040
    173 
    174   # Default UF2 Bootloader settings
    175   UF2_FAMILY ?= RP2040
    176   FIRMWARE_FORMAT ?= uf2
    177 endif
    178 
    179 ifneq ($(findstring STM32F042, $(MCU)),)
    180   # Cortex version
    181   MCU = cortex-m0
    182 
    183   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    184   ARMV = 6
    185 
    186   ## chip/board settings
    187   # - the next two should match the directories in
    188   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    189   #   OR
    190   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    191   MCU_FAMILY = STM32
    192   MCU_SERIES = STM32F0xx
    193 
    194   # Linker script to use
    195   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    196   #   or <keyboard_dir>/ld/
    197   MCU_LDSCRIPT ?= STM32F042x6
    198 
    199   # Startup code to use
    200   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    201   MCU_STARTUP ?= stm32f0xx
    202 
    203   # Board: it should exist either in <chibios>/os/hal/boards/,
    204   # <keyboard_dir>/boards/, or drivers/boards/
    205   BOARD ?= GENERIC_STM32_F042X6
    206 
    207   USE_FPU ?= no
    208 
    209   # UF2 settings
    210   UF2_FAMILY ?= STM32F0
    211 
    212   # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
    213   # This ensures that the EEPROM page buffer fits into RAM
    214   USE_PROCESS_STACKSIZE = 0x600
    215   USE_EXCEPTIONS_STACKSIZE = 0x300
    216 
    217   # Bootloader address for STM32 DFU
    218   STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC400
    219 endif
    220 
    221 ifneq ($(findstring STM32F072, $(MCU)),)
    222   # Cortex version
    223   MCU = cortex-m0
    224 
    225   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    226   ARMV = 6
    227 
    228   ## chip/board settings
    229   # - the next two should match the directories in
    230   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    231   #   OR
    232   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    233   MCU_FAMILY = STM32
    234   MCU_SERIES = STM32F0xx
    235 
    236   # Linker script to use
    237   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    238   #   or <keyboard_dir>/ld/
    239   MCU_LDSCRIPT ?= STM32F072xB
    240 
    241   # Startup code to use
    242   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    243   MCU_STARTUP ?= stm32f0xx
    244 
    245   # Board: it should exist either in <chibios>/os/hal/boards/,
    246   # <keyboard_dir>/boards/, or drivers/boards/
    247   BOARD ?= GENERIC_STM32_F072XB
    248 
    249   USE_FPU ?= no
    250 
    251   # UF2 settings
    252   UF2_FAMILY ?= STM32F0
    253 
    254   # Bootloader address for STM32 DFU
    255   STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC800
    256 endif
    257 
    258 ifneq ($(findstring STM32F103, $(MCU)),)
    259   # Cortex version
    260   MCU = cortex-m3
    261 
    262   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    263   ARMV = 7
    264 
    265   ## chip/board settings
    266   # - the next two should match the directories in
    267   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    268   #   OR
    269   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    270   MCU_FAMILY = STM32
    271   MCU_SERIES = STM32F1xx
    272 
    273   # Linker script to use
    274   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    275   #   or <keyboard_dir>/ld/
    276   MCU_LDSCRIPT ?= STM32F103x8
    277 
    278   # Startup code to use
    279   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    280   MCU_STARTUP ?= stm32f1xx
    281 
    282   # Board: it should exist either in <chibios>/os/hal/boards/,
    283   # <keyboard_dir>/boards/, or drivers/boards/
    284   BOARD ?= GENERIC_STM32_F103
    285 
    286   USE_FPU ?= no
    287 
    288   # UF2 settings
    289   UF2_FAMILY ?= STM32F1
    290 endif
    291 
    292 ifneq ($(findstring STM32F303, $(MCU)),)
    293   # Cortex version
    294   MCU = cortex-m4
    295 
    296   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    297   ARMV = 7
    298 
    299   ## chip/board settings
    300   # - the next two should match the directories in
    301   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    302   #   OR
    303   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    304   MCU_FAMILY = STM32
    305   MCU_SERIES = STM32F3xx
    306 
    307   # Linker script to use
    308   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    309   #   or <keyboard_dir>/ld/
    310   MCU_LDSCRIPT ?= STM32F303xC
    311 
    312   # Startup code to use
    313   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    314   MCU_STARTUP ?= stm32f3xx
    315 
    316   # Board: it should exist either in <chibios>/os/hal/boards/,
    317   # <keyboard_dir>/boards/, or drivers/boards/
    318   BOARD ?= GENERIC_STM32_F303XC
    319 
    320   USE_FPU ?= yes
    321 
    322   # UF2 settings
    323   UF2_FAMILY ?= STM32F3
    324 
    325   # Bootloader address for STM32 DFU
    326   STM32_BOOTLOADER_ADDRESS ?= 0x1FFFD800
    327 endif
    328 
    329 ifneq ($(findstring STM32F401, $(MCU)),)
    330   # Cortex version
    331   MCU = cortex-m4
    332 
    333   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    334   ARMV = 7
    335 
    336   ## chip/board settings
    337   # - the next two should match the directories in
    338   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    339   #   OR
    340   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    341   MCU_FAMILY = STM32
    342   MCU_SERIES = STM32F4xx
    343 
    344   # Linker script to use
    345   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    346   #   or <keyboard_dir>/ld/
    347   MCU_LDSCRIPT ?= STM32F401xC
    348 
    349   # Startup code to use
    350   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    351   MCU_STARTUP ?= stm32f4xx
    352 
    353   # Board: it should exist either in <chibios>/os/hal/boards/,
    354   # <keyboard_dir>/boards/, or drivers/boards/
    355   BOARD ?= GENERIC_STM32_F401XC
    356 
    357   USE_FPU ?= yes
    358 
    359   # UF2 settings
    360   UF2_FAMILY ?= STM32F4
    361 
    362   # Bootloader address for STM32 DFU
    363   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    364 endif
    365 
    366 ifneq ($(findstring STM32F405, $(MCU)),)
    367   # Cortex version
    368   MCU = cortex-m4
    369 
    370   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    371   ARMV = 7
    372 
    373   ## chip/board settings
    374   # - the next two should match the directories in
    375   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    376   #   OR
    377   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    378   MCU_FAMILY = STM32
    379   MCU_SERIES = STM32F4xx
    380 
    381   # Linker script to use
    382   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
    383   #   or <keyboard_dir>/ld/
    384   MCU_LDSCRIPT ?= STM32F405xG
    385 
    386   # Startup code to use
    387   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    388   MCU_STARTUP ?= stm32f4xx
    389 
    390   # Board: it should exist either in <chibios>/os/hal/boards/,
    391   # <keyboard_dir>/boards/, or drivers/boards/
    392   BOARD ?= GENERIC_STM32_F405XG
    393 
    394   USE_FPU ?= yes
    395 
    396   # UF2 settings
    397   UF2_FAMILY ?= STM32F4
    398 
    399   # Bootloader address for STM32 DFU
    400   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    401 endif
    402 
    403 ifneq ($(findstring STM32F407, $(MCU)),)
    404   # Cortex version
    405   MCU = cortex-m4
    406 
    407   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    408   ARMV = 7
    409 
    410   ## chip/board settings
    411   # - the next two should match the directories in
    412   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    413   #   OR
    414   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    415   MCU_FAMILY = STM32
    416   MCU_SERIES = STM32F4xx
    417 
    418   # Linker script to use
    419   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    420   #   or <keyboard_dir>/ld/
    421   MCU_LDSCRIPT ?= STM32F407xE
    422 
    423   # Startup code to use
    424   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    425   MCU_STARTUP ?= stm32f4xx
    426 
    427   # Board: it should exist either in <chibios>/os/hal/boards/,
    428   # <keyboard_dir>/boards/, or drivers/boards/
    429   BOARD ?= GENERIC_STM32_F407XE
    430 
    431   USE_FPU ?= yes
    432 
    433   # UF2 settings
    434   UF2_FAMILY ?= STM32F4
    435 
    436   # Bootloader address for STM32 DFU
    437   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    438 endif
    439 
    440 ifneq ($(findstring STM32F411, $(MCU)),)
    441   # Cortex version
    442   MCU = cortex-m4
    443 
    444   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    445   ARMV = 7
    446 
    447   ## chip/board settings
    448   # - the next two should match the directories in
    449   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    450   #   OR
    451   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    452   MCU_FAMILY = STM32
    453   MCU_SERIES = STM32F4xx
    454 
    455   # Linker script to use
    456   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    457   #   or <keyboard_dir>/ld/
    458   MCU_LDSCRIPT ?= STM32F411xE
    459 
    460   # Startup code to use
    461   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    462   MCU_STARTUP ?= stm32f4xx
    463 
    464   # Board: it should exist either in <chibios>/os/hal/boards/,
    465   # <keyboard_dir>/boards/, or drivers/boards/
    466   BOARD ?= GENERIC_STM32_F411XE
    467 
    468   USE_FPU ?= yes
    469 
    470   # UF2 settings
    471   UF2_FAMILY ?= STM32F4
    472 
    473   # Bootloader address for STM32 DFU
    474   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    475 endif
    476 
    477 ifneq ($(findstring STM32F446, $(MCU)),)
    478   # Cortex version
    479   MCU = cortex-m4
    480 
    481   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    482   ARMV = 7
    483 
    484   ## chip/board settings
    485   # - the next two should match the directories in
    486   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    487   #   OR
    488   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    489   MCU_FAMILY = STM32
    490   MCU_SERIES = STM32F4xx
    491 
    492   # Linker script to use
    493   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    494   #   or <keyboard_dir>/ld/
    495   MCU_LDSCRIPT ?= STM32F446xE
    496 
    497   # Startup code to use
    498   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    499   MCU_STARTUP ?= stm32f4xx
    500 
    501   # Board: it should exist either in <chibios>/os/hal/boards/,
    502   # <keyboard_dir>/boards/, or drivers/boards/
    503   BOARD ?= GENERIC_STM32_F446XE
    504 
    505   USE_FPU ?= yes
    506 
    507   # Bootloader address for STM32 DFU
    508   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    509 
    510   # Default as no chibios efl config
    511   EEPROM_DRIVER ?= transient
    512 endif
    513 
    514 ifneq ($(findstring STM32G0B1, $(MCU)),)
    515   # Cortex version
    516   MCU = cortex-m0plus
    517 
    518   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    519   ARMV = 6
    520 
    521   ## chip/board settings
    522   # - the next two should match the directories in
    523   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    524   #   OR
    525   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    526   MCU_FAMILY = STM32
    527   MCU_SERIES = STM32G0xx
    528 
    529   # Linker script to use
    530   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    531   #   or <keyboard_dir>/ld/
    532   MCU_LDSCRIPT ?= STM32G0B1xB
    533 
    534   # Startup code to use
    535   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    536   MCU_STARTUP ?= stm32g0xx
    537 
    538   # Board: it should exist either in <chibios>/os/hal/boards/,
    539   # <keyboard_dir>/boards/, or drivers/boards/
    540   BOARD ?= GENERIC_STM32_G0B1XB
    541 
    542   # UF2 settings
    543   UF2_FAMILY ?= STM32G0
    544 
    545   # Bootloader address for STM32 DFU
    546   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    547 endif
    548 
    549 ifneq ($(findstring STM32G431, $(MCU)),)
    550   # Cortex version
    551   MCU = cortex-m4
    552 
    553   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    554   ARMV = 7
    555 
    556   ## chip/board settings
    557   # - the next two should match the directories in
    558   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    559   #   OR
    560   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    561   MCU_FAMILY = STM32
    562   MCU_SERIES = STM32G4xx
    563 
    564   # Linker script to use
    565   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    566   #   or <keyboard_dir>/ld/
    567   MCU_LDSCRIPT ?= STM32G431xB
    568 
    569   # Startup code to use
    570   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    571   MCU_STARTUP ?= stm32g4xx
    572 
    573   # Board: it should exist either in <chibios>/os/hal/boards/,
    574   # <keyboard_dir>/boards/, or drivers/boards/
    575   BOARD ?= GENERIC_STM32_G431XB
    576 
    577   USE_FPU ?= yes
    578 
    579   # UF2 settings
    580   UF2_FAMILY ?= STM32G4
    581 
    582   # Bootloader address for STM32 DFU
    583   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    584 endif
    585 
    586 ifneq ($(findstring STM32G474, $(MCU)),)
    587   # Cortex version
    588   MCU = cortex-m4
    589 
    590   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    591   ARMV = 7
    592 
    593   ## chip/board settings
    594   # - the next two should match the directories in
    595   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    596   #   OR
    597   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    598   MCU_FAMILY = STM32
    599   MCU_SERIES = STM32G4xx
    600 
    601   # Linker script to use
    602   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    603   #   or <keyboard_dir>/ld/
    604   MCU_LDSCRIPT ?= STM32G474xE
    605 
    606   # Startup code to use
    607   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    608   MCU_STARTUP ?= stm32g4xx
    609 
    610   # Board: it should exist either in <chibios>/os/hal/boards/,
    611   # <keyboard_dir>/boards/, or drivers/boards/
    612   BOARD ?= GENERIC_STM32_G474XE
    613 
    614   USE_FPU ?= yes
    615 
    616   # UF2 settings
    617   UF2_FAMILY ?= STM32G4
    618 
    619   # Bootloader address for STM32 DFU
    620   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    621 endif
    622 
    623 ifneq (,$(filter $(MCU),STM32L432 STM32L442))
    624   # Cortex version
    625   MCU = cortex-m4
    626 
    627   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    628   ARMV = 7
    629 
    630   ## chip/board settings
    631   # - the next two should match the directories in
    632   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    633   #   OR
    634   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    635   MCU_FAMILY = STM32
    636   MCU_SERIES = STM32L4xx
    637 
    638   # Linker script to use
    639   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    640   #   or <keyboard_dir>/ld/
    641   MCU_LDSCRIPT ?= STM32L432xC
    642 
    643   # Startup code to use
    644   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    645   MCU_STARTUP ?= stm32l4xx
    646 
    647   # Board: it should exist either in <chibios>/os/hal/boards/,
    648   # <keyboard_dir>/boards/, or drivers/boards/
    649   BOARD ?= GENERIC_STM32_L432XC
    650 
    651   PLATFORM_NAME ?= platform_l432
    652 
    653   USE_FPU ?= yes
    654 
    655   # UF2 settings
    656   UF2_FAMILY ?= STM32L4
    657 
    658   # Bootloader address for STM32 DFU
    659   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    660 endif
    661 
    662 ifneq (,$(filter $(MCU),STM32L433 STM32L443))
    663   # Cortex version
    664   MCU = cortex-m4
    665 
    666   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    667   ARMV = 7
    668 
    669   ## chip/board settings
    670   # - the next two should match the directories in
    671   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    672   #   OR
    673   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    674   MCU_FAMILY = STM32
    675   MCU_SERIES = STM32L4xx
    676 
    677   # Linker script to use
    678   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    679   #   or <keyboard_dir>/ld/
    680   MCU_LDSCRIPT ?= STM32L432xC
    681 
    682   # Startup code to use
    683   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    684   MCU_STARTUP ?= stm32l4xx
    685 
    686   # Board: it should exist either in <chibios>/os/hal/boards/,
    687   # <keyboard_dir>/boards/, or drivers/boards/
    688   BOARD ?= GENERIC_STM32_L433XC
    689 
    690   PLATFORM_NAME ?= platform_l432
    691 
    692   USE_FPU ?= yes
    693 
    694   # UF2 settings
    695   UF2_FAMILY ?= STM32L4
    696 
    697   # Bootloader address for STM32 DFU
    698   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    699 endif
    700 
    701 ifneq (,$(filter $(MCU),STM32L412 STM32L422))
    702   # Cortex version
    703   MCU = cortex-m4
    704 
    705   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    706   ARMV = 7
    707 
    708   ## chip/board settings
    709   # - the next two should match the directories in
    710   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    711   #   OR
    712   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    713   MCU_FAMILY = STM32
    714   MCU_SERIES = STM32L4xx
    715 
    716   # Linker script to use
    717   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    718   #   or <keyboard_dir>/ld/
    719   MCU_LDSCRIPT ?= STM32L412xB
    720 
    721   # Startup code to use
    722   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    723   MCU_STARTUP ?= stm32l4xx
    724 
    725   # Board: it should exist either in <chibios>/os/hal/boards/,
    726   # <keyboard_dir>/boards/, or drivers/boards/
    727   BOARD ?= GENERIC_STM32_L412XB
    728 
    729   PLATFORM_NAME ?= platform_l412_l422
    730 
    731   USE_FPU ?= yes
    732 
    733   # UF2 settings
    734   UF2_FAMILY ?= STM32L4
    735 
    736   # Bootloader address for STM32 DFU
    737   STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
    738 endif
    739 
    740 ifneq (,$(filter $(MCU),STM32H723 STM32H733))
    741   # Cortex version
    742   MCU = cortex-m7
    743 
    744   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    745   ARMV = 7
    746 
    747   ## chip/board settings
    748   # - the next two should match the directories in
    749   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    750   #   OR
    751   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    752   MCU_FAMILY = STM32
    753   MCU_SERIES = STM32H7xx
    754 
    755   # Linker script to use
    756   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    757   #   or <keyboard_dir>/ld/
    758   MCU_LDSCRIPT ?= STM32H723xG_ITCM64k
    759 
    760   # Startup code to use
    761   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    762   MCU_STARTUP ?= stm32h7xx
    763 
    764   # Board: it should exist either in <chibios>/os/hal/boards/,
    765   # <keyboard_dir>/boards/, or drivers/boards/
    766   BOARD ?= GENERIC_STM32_H723XG
    767 
    768   PLATFORM_NAME ?= platform_type2
    769 
    770   USE_FPU ?= yes
    771 
    772   # UF2 settings
    773   UF2_FAMILY ?= STM32H7
    774 
    775   # Bootloader address for STM32 DFU
    776   STM32_BOOTLOADER_ADDRESS ?= 0x1FF09800
    777 endif
    778 
    779 ifneq ($(findstring WB32F3G71, $(MCU)),)
    780   # Cortex version
    781   MCU = cortex-m3
    782 
    783   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    784   ARMV = 7
    785 
    786   ## chip/board settings
    787   # - the next two should match the directories in
    788   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    789   #   OR
    790   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    791   MCU_FAMILY = WB32
    792   MCU_SERIES = WB32F3G71xx
    793 
    794   # Linker script to use
    795   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
    796   #   or <keyboard_dir>/ld/
    797   MCU_LDSCRIPT ?= WB32F3G71x9
    798 
    799   # Startup code to use
    800   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    801   MCU_STARTUP ?= wb32f3g71xx
    802 
    803   # Board: it should exist either in <chibios>/os/hal/boards/,
    804   # <keyboard_dir>/boards/, or drivers/boards/
    805   BOARD ?= GENERIC_WB32_F3G71XX
    806 
    807   USE_FPU ?= no
    808 
    809   # Bootloader address for WB32 DFU
    810   WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
    811 endif
    812 
    813 ifneq ($(findstring WB32FQ95, $(MCU)),)
    814   # Cortex version
    815   MCU = cortex-m3
    816 
    817   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    818   ARMV = 7
    819 
    820   ## chip/board settings
    821   # - the next two should match the directories in
    822   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    823   #   OR
    824   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    825   MCU_FAMILY = WB32
    826   MCU_SERIES = WB32FQ95xx
    827 
    828   # Linker script to use
    829   # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
    830   #   or <keyboard_dir>/ld/
    831   MCU_LDSCRIPT ?= WB32FQ95xB
    832 
    833   # Startup code to use
    834   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    835   MCU_STARTUP ?= wb32fq95xx
    836 
    837   # Board: it should exist either in <chibios>/os/hal/boards/,
    838   # <keyboard_dir>/boards/, or drivers/boards/
    839   BOARD ?= GENERIC_WB32_FQ95XX
    840 
    841   USE_FPU ?= no
    842 
    843   # Bootloader address for WB32 DFU
    844   WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
    845 endif
    846 
    847 ifneq ($(findstring AT32F415, $(MCU)),)
    848   # Cortex version
    849   MCU = cortex-m4
    850 
    851   # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
    852   ARMV = 7
    853 
    854   ## chip/board settings
    855   # - the next two should match the directories in
    856   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    857   #   OR
    858   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    859   MCU_FAMILY = AT32
    860   MCU_SERIES = AT32F415
    861 
    862   # Linker script to use
    863   # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
    864   #   or <keyboard_dir>/ld/
    865   MCU_LDSCRIPT ?= AT32F415xB
    866 
    867   # Startup code to use
    868   #  - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
    869   MCU_STARTUP ?= at32f415
    870 
    871   # Board: it should exist either in <chibios>/os/hal/boards/,
    872   # <keyboard_dir>/boards/, or drivers/boards/
    873   BOARD ?= GENERIC_AT32_F415XX
    874 
    875   USE_FPU ?= no
    876 
    877   # Bootloader address for AT32 DFU
    878   AT32_BOOTLOADER_ADDRESS ?= 0x1FFFAC00
    879 endif
    880 
    881 ifneq ($(findstring GD32VF103, $(MCU)),)
    882   # RISC-V
    883   MCU = risc-v
    884 
    885   # RISC-V extensions and abi configuration
    886   MCU_ARCH = rv32imac
    887   MCU_ABI = ilp32
    888   MCU_CMODEL = medlow
    889 
    890   ## chip/board settings
    891   # - the next two should match the directories in
    892   #   <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
    893   #   OR
    894   #   <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
    895   MCU_PORT_NAME = GD
    896   MCU_FAMILY = GD32V
    897   MCU_SERIES = GD32VF103
    898 
    899   # Linker script to use
    900   # - it should exist either in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/ld/
    901   #   or <keyboard_dir>/ld/
    902   MCU_LDSCRIPT ?= GD32VF103xB
    903 
    904   # Startup code to use
    905   #  - it should exist in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/mk/
    906   MCU_STARTUP ?= gd32vf103
    907 
    908   # Board: it should exist either in <chibios>/os/hal/boards/,
    909   # <keyboard_dir>/boards/, or drivers/boards/
    910   BOARD ?= SIPEED_LONGAN_NANO
    911 
    912   USE_FPU ?= no
    913 endif