1 ifneq ($(findstring MKL26Z64
, $(MCU
)),)
5 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
9 # - the next two should match the directories in
10 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
14 # Linker script to use
15 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
16 # or <keyboard_dir>/ld/
17 # - NOTE: a custom ld script is needed for EEPROM on Teensy LC
18 MCU_LDSCRIPT ?
= MKL26Z64
21 # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
24 # Board: it should exist either in <chibios>/os/hal/boards/,
25 # <keyboard_dir>/boards/, or drivers/boards/
26 BOARD ?
= PJRC_TEENSY_LC
29 ifneq ($(findstring MK20DX128
, $(MCU
)),)
33 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
36 ## chip/board settings
37 # - the next two should match the directories in
38 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
42 # Linker script to use
43 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
44 # or <keyboard_dir>/ld/
45 MCU_LDSCRIPT ?
= MK20DX128
48 # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
51 # Board: it should exist either in <chibios>/os/hal/boards/,
52 # <keyboard_dir>/boards/, or drivers/boards/
53 BOARD ?
= PJRC_TEENSY_3
56 ifneq ($(findstring MK20DX256
, $(MCU
)),)
60 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
63 ## chip/board settings
64 # - the next two should match the directories in
65 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
69 # Linker script to use
70 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
71 # or <keyboard_dir>/ld/
72 MCU_LDSCRIPT ?
= MK20DX256
75 # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
78 # Board: it should exist either in <chibios>/os/hal/boards/,
79 # <keyboard_dir>/boards/, or drivers/boards/
80 BOARD ?
= PJRC_TEENSY_3_1
83 ifneq ($(findstring STM32F303
, $(MCU
)),)
87 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
90 ## chip/board settings
91 # - the next two should match the directories in
92 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
94 MCU_SERIES
= STM32F3xx
96 # Linker script to use
97 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
98 # or <keyboard_dir>/ld/
99 MCU_LDSCRIPT ?
= STM32F303xC
101 # Startup code to use
102 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
103 MCU_STARTUP ?
= stm32f3xx
105 # Board: it should exist either in <chibios>/os/hal/boards/,
106 # <keyboard_dir>/boards/, or drivers/boards/
107 BOARD ?
= GENERIC_STM32_F303XC
111 # Options to pass to dfu-util when flashing
112 DFU_ARGS ?
= -d
0483:df11
-a
0 -s
0x08000000:leave
113 DFU_SUFFIX_ARGS ?
= -v
0483 -p df11
116 ifneq ($(findstring STM32F072
, $(MCU
)),)
120 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
123 ## chip/board settings
124 # - the next two should match the directories in
125 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
127 MCU_SERIES
= STM32F0xx
129 # Linker script to use
130 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
131 # or <keyboard_dir>/ld/
132 MCU_LDSCRIPT ?
= STM32F072xB
134 # Startup code to use
135 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
136 MCU_STARTUP ?
= stm32f0xx
138 # Board: it should exist either in <chibios>/os/hal/boards/,
139 # <keyboard_dir>/boards/, or drivers/boards/
140 BOARD ?
= GENERIC_STM32_F072XB
144 # Options to pass to dfu-util when flashing
145 DFU_ARGS ?
= -d
0483:df11
-a
0 -s
0x08000000:leave
146 DFU_SUFFIX_ARGS ?
= -v
0483 -p df11
149 ifneq ($(findstring STM32F042
, $(MCU
)),)
153 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
156 ## chip/board settings
157 # - the next two should match the directories in
158 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
160 MCU_SERIES
= STM32F0xx
162 # Linker script to use
163 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
164 # or <keyboard_dir>/ld/
165 MCU_LDSCRIPT ?
= STM32F042x6
167 # Startup code to use
168 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
169 MCU_STARTUP ?
= stm32f0xx
171 # Board: it should exist either in <chibios>/os/hal/boards/,
172 # <keyboard_dir>/boards/, or drivers/boards/
173 BOARD ?
= GENERIC_STM32_F042X6
177 # Options to pass to dfu-util when flashing
178 DFU_ARGS ?
= -d
0483:df11
-a
0 -s
0x08000000:leave
179 DFU_SUFFIX_ARGS ?
= -v
0483 -p df11
182 ifneq ($(findstring STM32F103
, $(MCU
)),)
186 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
189 ## chip/board settings
190 # - the next two should match the directories in
191 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
193 MCU_SERIES
= STM32F1xx
195 # Linker script to use
196 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
197 # or <keyboard_dir>/ld/
198 MCU_LDSCRIPT ?
= STM32F103x8
200 # Startup code to use
201 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
202 MCU_STARTUP ?
= stm32f1xx
204 # Board: it should exist either in <chibios>/os/hal/boards/,
205 # <keyboard_dir>/boards/, or drivers/boards/
206 BOARD ?
= GENERIC_STM32_F103
210 # Options to pass to dfu-util when flashing
211 DFU_ARGS ?
= -d
0483:df11
-a
0 -s
0x08000000:leave
212 DFU_SUFFIX_ARGS ?
= -v
0483 -p df11
215 ifneq (,$(filter $(MCU
),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286
))
216 # Processor frequency.
217 # This will define a symbol, F_CPU, in all source code files equal to the
218 # processor frequency in Hz. You can then use this symbol in your source code to
219 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
220 # automatically to create a 32-bit value in your source code.
222 # This will be an integer division of F_USB below, as it is sourced by
223 # F_USB after it has run through any CPU prescalers. Note that this value
224 # does not *change* the processor frequency - it should merely be updated to
225 # reflect the processor speed set externally so that the code can use accurate
231 # Target architecture (see library "Board Types" documentation).
234 # Input clock frequency.
235 # This will define a symbol, F_USB, in all source code files equal to the
236 # input clock frequency (before any prescaling is performed) in Hz. This value may
237 # differ from F_CPU if prescaling is used on the latter, and is required as the
238 # raw input clock is fed directly to the PLL sections of the AVR for high speed
239 # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
240 # at the end, this will be done automatically to create a 32-bit value in your
243 # If no clock division is performed on the input clock inside the AVR (via the
244 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
247 # Interrupt driven control endpoint task
248 ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT
),yes
))
249 OPT_DEFS
+= -DINTERRUPT_CONTROL_ENDPOINT
253 ifneq (,$(filter $(MCU
),atmega32a
))
254 # MCU name for avrdude
259 # Processor frequency.
260 # This will define a symbol, F_CPU, in all source code files equal to the
261 # processor frequency in Hz. You can then use this symbol in your source code to
262 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
263 # automatically to create a 32-bit value in your source code.
266 # unsupported features for now
268 NO_SUSPEND_POWER_DOWN ?
= yes
271 ifneq (,$(filter $(MCU
),atmega328p
))
272 # MCU name for avrdude
277 # Processor frequency.
278 # This will define a symbol, F_CPU, in all source code files equal to the
279 # processor frequency in Hz. You can then use this symbol in your source code to
280 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
281 # automatically to create a 32-bit value in your source code.
284 # unsupported features for now
286 NO_SUSPEND_POWER_DOWN ?
= yes