1 ifneq ($(findstring STM32F303
, $(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)
12 MCU_SERIES
= STM32F3xx
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 MCU_LDSCRIPT ?
= STM32F303xC
20 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
21 MCU_STARTUP ?
= stm32f3xx
23 # Board: it should exist either in <chibios>/os/hal/boards/,
24 # <keyboard_dir>/boards/, or drivers/boards/
25 BOARD ?
= GENERIC_STM32_F303XC
29 # Options to pass to dfu-util when flashing
30 DFU_ARGS ?
= -d
0483:df11
-a
0 -s
0x08000000:leave
31 DFU_SUFFIX_ARGS ?
= -v
0483 -p df11
34 ifneq ($(findstring STM32F072
, $(MCU
)),)
38 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
41 ## chip/board settings
42 # - the next two should match the directories in
43 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
45 MCU_SERIES
= STM32F0xx
47 # Linker script to use
48 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
49 # or <keyboard_dir>/ld/
50 MCU_LDSCRIPT ?
= STM32F072xB
53 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
54 MCU_STARTUP ?
= stm32f0xx
56 # Board: it should exist either in <chibios>/os/hal/boards/,
57 # <keyboard_dir>/boards/, or drivers/boards/
58 BOARD ?
= ST_STM32F072B_DISCOVERY
62 # Options to pass to dfu-util when flashing
63 DFU_ARGS ?
= -d
0483:df11
-a
0 -s
0x08000000:leave
64 DFU_SUFFIX_ARGS ?
= -v
0483 -p df11
67 ifneq ($(findstring STM32F042
, $(MCU
)),)
71 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
74 ## chip/board settings
75 # - the next two should match the directories in
76 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
78 MCU_SERIES
= STM32F0xx
80 # Linker script to use
81 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
82 # or <keyboard_dir>/ld/
83 MCU_LDSCRIPT ?
= STM32F042x6
86 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
87 MCU_STARTUP ?
= stm32f0xx
89 # Board: it should exist either in <chibios>/os/hal/boards/,
90 # <keyboard_dir>/boards/, or drivers/boards/
91 BOARD ?
= GENERIC_STM32_F042X6
95 # Options to pass to dfu-util when flashing
96 DFU_ARGS ?
= -d
0483:df11
-a
0 -s
0x08000000:leave
97 DFU_SUFFIX_ARGS ?
= -v
0483 -p df11
100 ifneq ($(findstring STM32F103
, $(MCU
)),)
104 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
107 ## chip/board settings
108 # - the next two should match the directories in
109 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
111 MCU_SERIES
= STM32F1xx
113 # Linker script to use
114 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
115 # or <keyboard_dir>/ld/
116 MCU_LDSCRIPT ?
= STM32F103x8
118 # Startup code to use
119 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
120 MCU_STARTUP ?
= stm32f1xx
122 # Board: it should exist either in <chibios>/os/hal/boards/,
123 # <keyboard_dir>/boards/, or drivers/boards/
124 BOARD ?
= GENERIC_STM32_F103
128 # Options to pass to dfu-util when flashing
129 DFU_ARGS ?
= -d
0483:df11
-a
0 -s
0x08000000:leave
130 DFU_SUFFIX_ARGS ?
= -v
0483 -p df11
133 ifneq (,$(filter $(MCU
),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286
))
134 # Processor frequency.
135 # This will define a symbol, F_CPU, in all source code files equal to the
136 # processor frequency in Hz. You can then use this symbol in your source code to
137 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
138 # automatically to create a 32-bit value in your source code.
140 # This will be an integer division of F_USB below, as it is sourced by
141 # F_USB after it has run through any CPU prescalers. Note that this value
142 # does not *change* the processor frequency - it should merely be updated to
143 # reflect the processor speed set externally so that the code can use accurate
149 # Target architecture (see library "Board Types" documentation).
152 # Input clock frequency.
153 # This will define a symbol, F_USB, in all source code files equal to the
154 # input clock frequency (before any prescaling is performed) in Hz. This value may
155 # differ from F_CPU if prescaling is used on the latter, and is required as the
156 # raw input clock is fed directly to the PLL sections of the AVR for high speed
157 # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
158 # at the end, this will be done automatically to create a 32-bit value in your
161 # If no clock division is performed on the input clock inside the AVR (via the
162 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
165 # Interrupt driven control endpoint task
166 ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT
),yes
))
167 OPT_DEFS
+= -DINTERRUPT_CONTROL_ENDPOINT
171 ifneq (,$(filter $(MCU
),atmega32a
))
172 # MCU name for avrdude
177 # Processor frequency.
178 # This will define a symbol, F_CPU, in all source code files equal to the
179 # processor frequency in Hz. You can then use this symbol in your source code to
180 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
181 # automatically to create a 32-bit value in your source code.
184 # unsupported features for now
186 NO_SUSPEND_POWER_DOWN ?
= yes
189 ifneq (,$(filter $(MCU
),atmega328p
))
190 # MCU name for avrdude
195 # Processor frequency.
196 # This will define a symbol, F_CPU, in all source code files equal to the
197 # processor frequency in Hz. You can then use this symbol in your source code to
198 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
199 # automatically to create a 32-bit value in your source code.
202 # unsupported features for now
204 NO_SUSPEND_POWER_DOWN ?
= yes