aboutsummaryrefslogtreecommitdiff
path: root/builddefs/mcu_selection.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-28 01:07:53 +0100
committerGitHub <noreply@github.com>2021-10-28 01:07:53 +0100
commitb780c797beb726839e99e3f4054f9b4c33331cdc (patch)
tree019aed772e8204149727afb0841f9043a7084eda /builddefs/mcu_selection.mk
parent6c507afcf212165dd5f3c3f6c026b517295c5090 (diff)
downloadqmk_firmware-b780c797beb726839e99e3f4054f9b4c33331cdc.tar.gz
qmk_firmware-b780c797beb726839e99e3f4054f9b4c33331cdc.zip
Migrate makefile utilities to sub-directory (#14917)
Diffstat (limited to 'builddefs/mcu_selection.mk')
-rw-r--r--builddefs/mcu_selection.mk668
1 files changed, 668 insertions, 0 deletions
diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk
new file mode 100644
index 000000000..1251b7a2b
--- /dev/null
+++ b/builddefs/mcu_selection.mk
@@ -0,0 +1,668 @@
1MCU_ORIG := $(MCU)
2
3ifneq ($(findstring MKL26Z64, $(MCU)),)
4 # Cortex version
5 MCU = cortex-m0plus
6
7 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
8 ARMV = 6
9
10 ## chip/board settings
11 # - the next two should match the directories in
12 # <chibios>/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
28endif
29
30ifneq ($(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>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
40 MCU_FAMILY = KINETIS
41 MCU_SERIES = K20x
42
43 # Linker script to use
44 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
45 # or <keyboard_dir>/ld/
46 MCU_LDSCRIPT ?= MK20DX128
47
48 # Startup code to use
49 # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
50 MCU_STARTUP ?= k20x5
51
52 # Board: it should exist either in <chibios>/os/hal/boards/,
53 # <keyboard_dir>/boards/, or drivers/boards/
54 BOARD ?= PJRC_TEENSY_3
55endif
56
57ifneq ($(findstring MK20DX256, $(MCU)),)
58 # Cortex version
59 MCU = cortex-m4
60
61 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
62 ARMV = 7
63
64 ## chip/board settings
65 # - the next two should match the directories in
66 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
67 MCU_FAMILY = KINETIS
68 MCU_SERIES = K20x
69
70 # Linker script to use
71 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
72 # or <keyboard_dir>/ld/
73 MCU_LDSCRIPT ?= MK20DX256
74
75 # Startup code to use
76 # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
77 MCU_STARTUP ?= k20x7
78
79 # Board: it should exist either in <chibios>/os/hal/boards/,
80 # <keyboard_dir>/boards/, or drivers/boards/
81 BOARD ?= PJRC_TEENSY_3_1
82endif
83
84ifneq ($(findstring MK66FX1M0, $(MCU)),)
85 # Cortex version
86 MCU = cortex-m4
87
88 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
89 ARMV = 7
90
91 ## chip/board settings
92 # - the next two should match the directories in
93 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
94 MCU_FAMILY = KINETIS
95 MCU_SERIES = MK66F18
96
97 # Linker script to use
98 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
99 # or <keyboard_dir>/ld/
100 MCU_LDSCRIPT ?= MK66FX1M0
101
102 # Startup code to use
103 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
104 MCU_STARTUP ?= MK66F18
105
106 # Board: it should exist either in <chibios>/os/hal/boards/,
107 # <keyboard_dir>/boards/, or drivers/boards/
108 BOARD ?= PJRC_TEENSY_3_6
109endif
110
111ifneq ($(findstring STM32F042, $(MCU)),)
112 # Cortex version
113 MCU = cortex-m0
114
115 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
116 ARMV = 6
117
118 ## chip/board settings
119 # - the next two should match the directories in
120 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
121 MCU_FAMILY = STM32
122 MCU_SERIES = STM32F0xx
123
124 # Linker script to use
125 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
126 # or <keyboard_dir>/ld/
127 MCU_LDSCRIPT ?= STM32F042x6
128
129 # Startup code to use
130 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
131 MCU_STARTUP ?= stm32f0xx
132
133 # Board: it should exist either in <chibios>/os/hal/boards/,
134 # <keyboard_dir>/boards/, or drivers/boards/
135 BOARD ?= GENERIC_STM32_F042X6
136
137 USE_FPU ?= no
138
139 # UF2 settings
140 UF2_FAMILY ?= STM32F0
141
142 # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
143 # This ensures that the EEPROM page buffer fits into RAM
144 USE_PROCESS_STACKSIZE = 0x600
145 USE_EXCEPTIONS_STACKSIZE = 0x300
146endif
147
148ifneq ($(findstring STM32F072, $(MCU)),)
149 # Cortex version
150 MCU = cortex-m0
151
152 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
153 ARMV = 6
154
155 ## chip/board settings
156 # - the next two should match the directories in
157 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
158 MCU_FAMILY = STM32
159 MCU_SERIES = STM32F0xx
160
161 # Linker script to use
162 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
163 # or <keyboard_dir>/ld/
164 MCU_LDSCRIPT ?= STM32F072xB
165
166 # Startup code to use
167 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
168 MCU_STARTUP ?= stm32f0xx
169
170 # Board: it should exist either in <chibios>/os/hal/boards/,
171 # <keyboard_dir>/boards/, or drivers/boards/
172 BOARD ?= GENERIC_STM32_F072XB
173
174 USE_FPU ?= no
175
176 # UF2 settings
177 UF2_FAMILY ?= STM32F0
178endif
179
180ifneq ($(findstring STM32F103, $(MCU)),)
181 # Cortex version
182 MCU = cortex-m3
183
184 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
185 ARMV = 7
186
187 ## chip/board settings
188 # - the next two should match the directories in
189 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
190 MCU_FAMILY = STM32
191 MCU_SERIES = STM32F1xx
192
193 # Linker script to use
194 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
195 # or <keyboard_dir>/ld/
196 MCU_LDSCRIPT ?= STM32F103x8
197
198 # Startup code to use
199 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
200 MCU_STARTUP ?= stm32f1xx
201
202 # Board: it should exist either in <chibios>/os/hal/boards/,
203 # <keyboard_dir>/boards/, or drivers/boards/
204 BOARD ?= GENERIC_STM32_F103
205
206 USE_FPU ?= no
207
208 # UF2 settings
209 UF2_FAMILY ?= STM32F1
210endif
211
212ifneq ($(findstring STM32F303, $(MCU)),)
213 # Cortex version
214 MCU = cortex-m4
215
216 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
217 ARMV = 7
218
219 ## chip/board settings
220 # - the next two should match the directories in
221 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
222 MCU_FAMILY = STM32
223 MCU_SERIES = STM32F3xx
224
225 # Linker script to use
226 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
227 # or <keyboard_dir>/ld/
228 MCU_LDSCRIPT ?= STM32F303xC
229
230 # Startup code to use
231 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
232 MCU_STARTUP ?= stm32f3xx
233
234 # Board: it should exist either in <chibios>/os/hal/boards/,
235 # <keyboard_dir>/boards/, or drivers/boards/
236 BOARD ?= GENERIC_STM32_F303XC
237
238 USE_FPU ?= yes
239
240 # UF2 settings
241 UF2_FAMILY ?= STM32F3
242endif
243
244ifneq ($(findstring STM32F401, $(MCU)),)
245 # Cortex version
246 MCU = cortex-m4
247
248 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
249 ARMV = 7
250
251 ## chip/board settings
252 # - the next two should match the directories in
253 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
254 MCU_FAMILY = STM32
255 MCU_SERIES = STM32F4xx
256
257 # Linker script to use
258 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
259 # or <keyboard_dir>/ld/
260 ifeq ($(strip $(BOOTLOADER)), tinyuf2)
261 MCU_LDSCRIPT ?= STM32F401xC_tinyuf2
262 FIRMWARE_FORMAT ?= uf2
263 else
264 MCU_LDSCRIPT ?= STM32F401xC
265 endif
266
267 # Startup code to use
268 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
269 MCU_STARTUP ?= stm32f4xx
270
271 # Board: it should exist either in <chibios>/os/hal/boards/,
272 # <keyboard_dir>/boards/, or drivers/boards/
273 BOARD ?= BLACKPILL_STM32_F401
274
275 USE_FPU ?= yes
276
277 # UF2 settings
278 UF2_FAMILY ?= STM32F4
279endif
280
281ifneq ($(findstring STM32F405, $(MCU)),)
282 # Cortex version
283 MCU = cortex-m4
284
285 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
286 ARMV = 7
287
288 ## chip/board settings
289 # - the next two should match the directories in
290 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
291 MCU_FAMILY = STM32
292 MCU_SERIES = STM32F4xx
293
294 # Linker script to use
295 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
296 # or <keyboard_dir>/ld/
297 MCU_LDSCRIPT ?= STM32F405xG
298
299 # Startup code to use
300 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
301 MCU_STARTUP ?= stm32f4xx
302
303 # Board: it should exist either in <chibios>/os/hal/boards/,
304 # <keyboard_dir>/boards/, or drivers/boards/
305 BOARD ?= GENERIC_STM32_F405XG
306
307 USE_FPU ?= yes
308
309 # UF2 settings
310 UF2_FAMILY ?= STM32F4
311endif
312
313ifneq ($(findstring STM32F407, $(MCU)),)
314 # Cortex version
315 MCU = cortex-m4
316
317 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
318 ARMV = 7
319
320 ## chip/board settings
321 # - the next two should match the directories in
322 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
323 MCU_FAMILY = STM32
324 MCU_SERIES = STM32F4xx
325
326 # Linker script to use
327 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
328 # or <keyboard_dir>/ld/
329 MCU_LDSCRIPT ?= STM32F407xE
330
331 # Startup code to use
332 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
333 MCU_STARTUP ?= stm32f4xx
334
335 # Board: it should exist either in <chibios>/os/hal/boards/,
336 # <keyboard_dir>/boards/, or drivers/boards/
337 BOARD ?= GENERIC_STM32_F407XE
338
339 USE_FPU ?= yes
340
341 # UF2 settings
342 UF2_FAMILY ?= STM32F4
343endif
344
345ifneq ($(findstring STM32F411, $(MCU)),)
346 # Cortex version
347 MCU = cortex-m4
348
349 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
350 ARMV = 7
351
352 ## chip/board settings
353 # - the next two should match the directories in
354 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
355 MCU_FAMILY = STM32
356 MCU_SERIES = STM32F4xx
357
358 # Linker script to use
359 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
360 # or <keyboard_dir>/ld/
361 ifeq ($(strip $(BOOTLOADER)), tinyuf2)
362 MCU_LDSCRIPT ?= STM32F411xE_tinyuf2
363 FIRMWARE_FORMAT ?= uf2
364 else
365 MCU_LDSCRIPT ?= STM32F411xE
366 endif
367
368 # Startup code to use
369 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
370 MCU_STARTUP ?= stm32f4xx
371
372 # Board: it should exist either in <chibios>/os/hal/boards/,
373 # <keyboard_dir>/boards/, or drivers/boards/
374 BOARD ?= BLACKPILL_STM32_F411
375
376 USE_FPU ?= yes
377
378 # UF2 settings
379 UF2_FAMILY ?= STM32F4
380endif
381
382ifneq ($(findstring STM32F446, $(MCU)),)
383 # Cortex version
384 MCU = cortex-m4
385
386 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
387 ARMV = 7
388
389 ## chip/board settings
390 # - the next two should match the directories in
391 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
392 MCU_FAMILY = STM32
393 MCU_SERIES = STM32F4xx
394
395 # Linker script to use
396 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
397 # or <keyboard_dir>/ld/
398 MCU_LDSCRIPT ?= STM32F446xE
399
400 # Startup code to use
401 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
402 MCU_STARTUP ?= stm32f4xx
403
404 # Board: it should exist either in <chibios>/os/hal/boards/,
405 # <keyboard_dir>/boards/, or drivers/boards/
406 BOARD ?= GENERIC_STM32_F446XE
407
408 USE_FPU ?= yes
409endif
410
411ifneq ($(findstring STM32G431, $(MCU)),)
412 # Cortex version
413 MCU = cortex-m4
414
415 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
416 ARMV = 7
417
418 ## chip/board settings
419 # - the next two should match the directories in
420 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
421 MCU_FAMILY = STM32
422 MCU_SERIES = STM32G4xx
423
424 # Linker script to use
425 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
426 # or <keyboard_dir>/ld/
427 MCU_LDSCRIPT ?= STM32G431xB
428
429 # Startup code to use
430 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
431 MCU_STARTUP ?= stm32g4xx
432
433 # Board: it should exist either in <chibios>/os/hal/boards/,
434 # <keyboard_dir>/boards/, or drivers/boards/
435 BOARD ?= GENERIC_STM32_G431XB
436
437 USE_FPU ?= yes
438
439 # UF2 settings
440 UF2_FAMILY ?= STM32G4
441endif
442
443ifneq ($(findstring STM32G474, $(MCU)),)
444 # Cortex version
445 MCU = cortex-m4
446
447 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
448 ARMV = 7
449
450 ## chip/board settings
451 # - the next two should match the directories in
452 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
453 MCU_FAMILY = STM32
454 MCU_SERIES = STM32G4xx
455
456 # Linker script to use
457 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
458 # or <keyboard_dir>/ld/
459 MCU_LDSCRIPT ?= STM32G474xE
460
461 # Startup code to use
462 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
463 MCU_STARTUP ?= stm32g4xx
464
465 # Board: it should exist either in <chibios>/os/hal/boards/,
466 # <keyboard_dir>/boards/, or drivers/boards/
467 BOARD ?= GENERIC_STM32_G474XE
468
469 USE_FPU ?= yes
470
471 # UF2 settings
472 UF2_FAMILY ?= STM32G4
473endif
474
475ifneq (,$(filter $(MCU),STM32L433 STM32L443))
476 # Cortex version
477 MCU = cortex-m4
478
479 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
480 ARMV = 7
481
482 ## chip/board settings
483 # - the next two should match the directories in
484 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
485 MCU_FAMILY = STM32
486 MCU_SERIES = STM32L4xx
487
488 # Linker script to use
489 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
490 # or <keyboard_dir>/ld/
491 MCU_LDSCRIPT ?= STM32L432xC
492
493 # Startup code to use
494 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
495 MCU_STARTUP ?= stm32l4xx
496
497 # Board: it should exist either in <chibios>/os/hal/boards/,
498 # <keyboard_dir>/boards/, or drivers/boards/
499 BOARD ?= GENERIC_STM32_L433XC
500
501 PLATFORM_NAME ?= platform_l432
502
503 USE_FPU ?= yes
504
505 # UF2 settings
506 UF2_FAMILY ?= STM32L4
507endif
508
509ifneq (,$(filter $(MCU),STM32L412 STM32L422))
510 # Cortex version
511 MCU = cortex-m4
512
513 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
514 ARMV = 7
515
516 ## chip/board settings
517 # - the next two should match the directories in
518 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
519 MCU_FAMILY = STM32
520 MCU_SERIES = STM32L4xx
521
522 # Linker script to use
523 # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
524 # or <keyboard_dir>/ld/
525 MCU_LDSCRIPT ?= STM32L412xB
526
527 # Startup code to use
528 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
529 MCU_STARTUP ?= stm32l4xx
530
531 # Board: it should exist either in <chibios>/os/hal/boards/,
532 # <keyboard_dir>/boards/, or drivers/boards/
533 BOARD ?= GENERIC_STM32_L412XB
534
535 PLATFORM_NAME ?= platform_l432
536
537 USE_FPU ?= yes
538
539 # UF2 settings
540 UF2_FAMILY ?= STM32L4
541endif
542
543ifneq ($(findstring GD32VF103, $(MCU)),)
544 # RISC-V
545 MCU = risc-v
546
547 # RISC-V extensions and abi configuration
548 MCU_ARCH = rv32imac
549 MCU_ABI = ilp32
550 MCU_CMODEL = medlow
551
552 ## chip/board settings
553 # - the next two should match the directories in
554 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
555 MCU_FAMILY = GD32V
556 MCU_SERIES = GD32VF103
557
558 # Linker script to use
559 # - it should exist either in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/ld/
560 # or <keyboard_dir>/ld/
561 MCU_LDSCRIPT ?= GD32VF103xB
562
563 # Startup code to use
564 # - it should exist in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/mk/
565 MCU_STARTUP ?= gd32vf103
566
567 # Board: it should exist either in <chibios>/os/hal/boards/,
568 # <keyboard_dir>/boards/, or drivers/boards/
569 BOARD ?= SIPEED_LONGAN_NANO
570
571 USE_FPU ?= no
572endif
573
574ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
575 PROTOCOL = LUFA
576
577 # Processor frequency.
578 # This will define a symbol, F_CPU, in all source code files equal to the
579 # processor frequency in Hz. You can then use this symbol in your source code to
580 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
581 # automatically to create a 32-bit value in your source code.
582 #
583 # This will be an integer division of F_USB below, as it is sourced by
584 # F_USB after it has run through any CPU prescalers. Note that this value
585 # does not *change* the processor frequency - it should merely be updated to
586 # reflect the processor speed set externally so that the code can use accurate
587 # software delays.
588 F_CPU ?= 16000000
589
590 # LUFA specific
591 #
592 # Target architecture (see library "Board Types" documentation).
593 ARCH = AVR8
594
595 # Input clock frequency.
596 # This will define a symbol, F_USB, in all source code files equal to the
597 # input clock frequency (before any prescaling is performed) in Hz. This value may
598 # differ from F_CPU if prescaling is used on the latter, and is required as the
599 # raw input clock is fed directly to the PLL sections of the AVR for high speed
600 # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
601 # at the end, this will be done automatically to create a 32-bit value in your
602 # source code.
603 #
604 # If no clock division is performed on the input clock inside the AVR (via the
605 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
606 F_USB ?= $(F_CPU)
607
608 # Interrupt driven control endpoint task
609 ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes))
610 OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
611 endif
612 ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2))
613 NO_I2C = yes
614 endif
615endif
616
617ifneq (,$(filter $(MCU),atmega32a))
618 # MCU name for avrdude
619 AVRDUDE_MCU = m32
620
621 PROTOCOL = VUSB
622
623 # Processor frequency.
624 # This will define a symbol, F_CPU, in all source code files equal to the
625 # processor frequency in Hz. You can then use this symbol in your source code to
626 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
627 # automatically to create a 32-bit value in your source code.
628 F_CPU ?= 12000000
629endif
630
631ifneq (,$(filter $(MCU),atmega328p))
632 # MCU name for avrdude
633 AVRDUDE_MCU = m328p
634
635 PROTOCOL = VUSB
636
637 # Processor frequency.
638 # This will define a symbol, F_CPU, in all source code files equal to the
639 # processor frequency in Hz. You can then use this symbol in your source code to
640 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
641 # automatically to create a 32-bit value in your source code.
642 F_CPU ?= 16000000
643endif
644
645ifneq (,$(filter $(MCU),atmega328))
646 # MCU name for avrdude
647 AVRDUDE_MCU = m328
648
649 PROTOCOL = VUSB
650
651 # Processor frequency.
652 # This will define a symbol, F_CPU, in all source code files equal to the
653 # processor frequency in Hz. You can then use this symbol in your source code to
654 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
655 # automatically to create a 32-bit value in your source code.
656 F_CPU ?= 16000000
657endif
658
659ifneq (,$(filter $(MCU),attiny85))
660 PROTOCOL = VUSB
661
662 # Processor frequency.
663 # This will define a symbol, F_CPU, in all source code files equal to the
664 # processor frequency in Hz. You can then use this symbol in your source code to
665 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
666 # automatically to create a 32-bit value in your source code.
667 F_CPU ?= 16500000
668endif