You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

601 lines
17 KiB

2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
  1. MCU_ORIG := $(MCU)
  2. ifneq ($(findstring MKL26Z64, $(MCU)),)
  3. # Cortex version
  4. MCU = cortex-m0plus
  5. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  6. ARMV = 6
  7. ## chip/board settings
  8. # - the next two should match the directories in
  9. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  10. MCU_FAMILY = KINETIS
  11. MCU_SERIES = KL2x
  12. # Linker script to use
  13. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  14. # or <keyboard_dir>/ld/
  15. MCU_LDSCRIPT ?= MKL26Z64
  16. # Startup code to use
  17. # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
  18. MCU_STARTUP ?= kl2x
  19. # Board: it should exist either in <chibios>/os/hal/boards/,
  20. # <keyboard_dir>/boards/, or drivers/boards/
  21. BOARD ?= PJRC_TEENSY_LC
  22. endif
  23. ifneq ($(findstring MK20DX128, $(MCU)),)
  24. # Cortex version
  25. MCU = cortex-m4
  26. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  27. ARMV = 7
  28. ## chip/board settings
  29. # - the next two should match the directories in
  30. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  31. MCU_FAMILY = KINETIS
  32. MCU_SERIES = K20x
  33. # Linker script to use
  34. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  35. # or <keyboard_dir>/ld/
  36. MCU_LDSCRIPT ?= MK20DX128
  37. # Startup code to use
  38. # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
  39. MCU_STARTUP ?= k20x5
  40. # Board: it should exist either in <chibios>/os/hal/boards/,
  41. # <keyboard_dir>/boards/, or drivers/boards/
  42. BOARD ?= PJRC_TEENSY_3
  43. endif
  44. ifneq ($(findstring MK20DX256, $(MCU)),)
  45. # Cortex version
  46. MCU = cortex-m4
  47. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  48. ARMV = 7
  49. ## chip/board settings
  50. # - the next two should match the directories in
  51. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  52. MCU_FAMILY = KINETIS
  53. MCU_SERIES = K20x
  54. # Linker script to use
  55. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  56. # or <keyboard_dir>/ld/
  57. MCU_LDSCRIPT ?= MK20DX256
  58. # Startup code to use
  59. # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
  60. MCU_STARTUP ?= k20x7
  61. # Board: it should exist either in <chibios>/os/hal/boards/,
  62. # <keyboard_dir>/boards/, or drivers/boards/
  63. BOARD ?= PJRC_TEENSY_3_1
  64. endif
  65. ifneq ($(findstring MK66F18, $(MCU)),)
  66. # Cortex version
  67. MCU = cortex-m4
  68. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  69. ARMV = 7
  70. ## chip/board settings
  71. # - the next two should match the directories in
  72. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  73. MCU_FAMILY = KINETIS
  74. MCU_SERIES = MK66F18
  75. # Linker script to use
  76. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  77. # or <keyboard_dir>/ld/
  78. MCU_LDSCRIPT ?= MK66FX1M0
  79. # Startup code to use
  80. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  81. MCU_STARTUP ?= MK66F18
  82. # Board: it should exist either in <chibios>/os/hal/boards/,
  83. # <keyboard_dir>/boards/, or drivers/boards/
  84. BOARD ?= PJRC_TEENSY_3_6
  85. endif
  86. ifneq ($(findstring STM32F042, $(MCU)),)
  87. # Cortex version
  88. MCU = cortex-m0
  89. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  90. ARMV = 6
  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 = STM32
  95. MCU_SERIES = STM32F0xx
  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 ?= STM32F042x6
  100. # Startup code to use
  101. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  102. MCU_STARTUP ?= stm32f0xx
  103. # Board: it should exist either in <chibios>/os/hal/boards/,
  104. # <keyboard_dir>/boards/, or drivers/boards/
  105. BOARD ?= GENERIC_STM32_F042X6
  106. USE_FPU ?= no
  107. # UF2 settings
  108. UF2_FAMILY ?= STM32F0
  109. endif
  110. ifneq ($(findstring STM32F072, $(MCU)),)
  111. # Cortex version
  112. MCU = cortex-m0
  113. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  114. ARMV = 6
  115. ## chip/board settings
  116. # - the next two should match the directories in
  117. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  118. MCU_FAMILY = STM32
  119. MCU_SERIES = STM32F0xx
  120. # Linker script to use
  121. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  122. # or <keyboard_dir>/ld/
  123. MCU_LDSCRIPT ?= STM32F072xB
  124. # Startup code to use
  125. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  126. MCU_STARTUP ?= stm32f0xx
  127. # Board: it should exist either in <chibios>/os/hal/boards/,
  128. # <keyboard_dir>/boards/, or drivers/boards/
  129. BOARD ?= GENERIC_STM32_F072XB
  130. USE_FPU ?= no
  131. # UF2 settings
  132. UF2_FAMILY ?= STM32F0
  133. endif
  134. ifneq ($(findstring STM32F103, $(MCU)),)
  135. # Cortex version
  136. MCU = cortex-m3
  137. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  138. ARMV = 7
  139. ## chip/board settings
  140. # - the next two should match the directories in
  141. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  142. MCU_FAMILY = STM32
  143. MCU_SERIES = STM32F1xx
  144. # Linker script to use
  145. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  146. # or <keyboard_dir>/ld/
  147. MCU_LDSCRIPT ?= STM32F103x8
  148. # Startup code to use
  149. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  150. MCU_STARTUP ?= stm32f1xx
  151. # Board: it should exist either in <chibios>/os/hal/boards/,
  152. # <keyboard_dir>/boards/, or drivers/boards/
  153. BOARD ?= GENERIC_STM32_F103
  154. USE_FPU ?= no
  155. # UF2 settings
  156. UF2_FAMILY ?= STM32F1
  157. endif
  158. ifneq ($(findstring STM32F303, $(MCU)),)
  159. # Cortex version
  160. MCU = cortex-m4
  161. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  162. ARMV = 7
  163. ## chip/board settings
  164. # - the next two should match the directories in
  165. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  166. MCU_FAMILY = STM32
  167. MCU_SERIES = STM32F3xx
  168. # Linker script to use
  169. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  170. # or <keyboard_dir>/ld/
  171. MCU_LDSCRIPT ?= STM32F303xC
  172. # Startup code to use
  173. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  174. MCU_STARTUP ?= stm32f3xx
  175. # Board: it should exist either in <chibios>/os/hal/boards/,
  176. # <keyboard_dir>/boards/, or drivers/boards/
  177. BOARD ?= GENERIC_STM32_F303XC
  178. USE_FPU ?= yes
  179. # UF2 settings
  180. UF2_FAMILY ?= STM32F3
  181. endif
  182. ifneq ($(findstring STM32F401, $(MCU)),)
  183. # Cortex version
  184. MCU = cortex-m4
  185. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  186. ARMV = 7
  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 = STM32F4xx
  192. # Linker script to use
  193. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  194. # or <keyboard_dir>/ld/
  195. ifeq ($(strip $(BOOTLOADER)), tinyuf2)
  196. MCU_LDSCRIPT ?= STM32F401xC_tinyuf2
  197. FIRMWARE_FORMAT ?= uf2
  198. else
  199. MCU_LDSCRIPT ?= STM32F401xC
  200. endif
  201. # Startup code to use
  202. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  203. MCU_STARTUP ?= stm32f4xx
  204. # Board: it should exist either in <chibios>/os/hal/boards/,
  205. # <keyboard_dir>/boards/, or drivers/boards/
  206. BOARD ?= BLACKPILL_STM32_F401
  207. USE_FPU ?= yes
  208. # UF2 settings
  209. UF2_FAMILY ?= STM32F4
  210. endif
  211. ifneq ($(findstring STM32F407, $(MCU)),)
  212. # Cortex version
  213. MCU = cortex-m4
  214. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  215. ARMV = 7
  216. ## chip/board settings
  217. # - the next two should match the directories in
  218. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  219. MCU_FAMILY = STM32
  220. MCU_SERIES = STM32F4xx
  221. # Linker script to use
  222. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  223. # or <keyboard_dir>/ld/
  224. MCU_LDSCRIPT ?= STM32F407xE
  225. # Startup code to use
  226. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  227. MCU_STARTUP ?= stm32f4xx
  228. # Board: it should exist either in <chibios>/os/hal/boards/,
  229. # <keyboard_dir>/boards/, or drivers/boards/
  230. BOARD ?= GENERIC_STM32_F407XE
  231. USE_FPU ?= yes
  232. # UF2 settings
  233. UF2_FAMILY ?= STM32F4
  234. endif
  235. ifneq ($(findstring STM32F411, $(MCU)),)
  236. # Cortex version
  237. MCU = cortex-m4
  238. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  239. ARMV = 7
  240. ## chip/board settings
  241. # - the next two should match the directories in
  242. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  243. MCU_FAMILY = STM32
  244. MCU_SERIES = STM32F4xx
  245. # Linker script to use
  246. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  247. # or <keyboard_dir>/ld/
  248. ifeq ($(strip $(BOOTLOADER)), tinyuf2)
  249. MCU_LDSCRIPT ?= STM32F411xE_tinyuf2
  250. FIRMWARE_FORMAT ?= uf2
  251. else
  252. MCU_LDSCRIPT ?= STM32F411xE
  253. endif
  254. # Startup code to use
  255. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  256. MCU_STARTUP ?= stm32f4xx
  257. # Board: it should exist either in <chibios>/os/hal/boards/,
  258. # <keyboard_dir>/boards/, or drivers/boards/
  259. BOARD ?= BLACKPILL_STM32_F411
  260. USE_FPU ?= yes
  261. # UF2 settings
  262. UF2_FAMILY ?= STM32F4
  263. endif
  264. ifneq ($(findstring STM32F446, $(MCU)),)
  265. # Cortex version
  266. MCU = cortex-m4
  267. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  268. ARMV = 7
  269. ## chip/board settings
  270. # - the next two should match the directories in
  271. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  272. MCU_FAMILY = STM32
  273. MCU_SERIES = STM32F4xx
  274. # Linker script to use
  275. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  276. # or <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  277. # or <keyboard_dir>/ld/
  278. MCU_LDSCRIPT ?= STM32F446xE
  279. # Startup code to use
  280. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  281. MCU_STARTUP ?= stm32f4xx
  282. # Board: it should exist either in <chibios>/os/hal/boards/,
  283. # <keyboard_dir>/boards/, or drivers/boards/
  284. BOARD ?= GENERIC_STM32_F446XE
  285. USE_FPU ?= yes
  286. endif
  287. ifneq ($(findstring STM32G431, $(MCU)),)
  288. # Cortex version
  289. MCU = cortex-m4
  290. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  291. ARMV = 7
  292. ## chip/board settings
  293. # - the next two should match the directories in
  294. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  295. MCU_FAMILY = STM32
  296. MCU_SERIES = STM32G4xx
  297. # Linker script to use
  298. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  299. # or <keyboard_dir>/ld/
  300. MCU_LDSCRIPT ?= STM32G431xB
  301. # Startup code to use
  302. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  303. MCU_STARTUP ?= stm32g4xx
  304. # Board: it should exist either in <chibios>/os/hal/boards/,
  305. # <keyboard_dir>/boards/, or drivers/boards/
  306. BOARD ?= GENERIC_STM32_G431XB
  307. USE_FPU ?= yes
  308. # UF2 settings
  309. UF2_FAMILY ?= STM32G4
  310. endif
  311. ifneq ($(findstring STM32G474, $(MCU)),)
  312. # Cortex version
  313. MCU = cortex-m4
  314. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  315. ARMV = 7
  316. ## chip/board settings
  317. # - the next two should match the directories in
  318. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  319. MCU_FAMILY = STM32
  320. MCU_SERIES = STM32G4xx
  321. # Linker script to use
  322. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  323. # or <keyboard_dir>/ld/
  324. MCU_LDSCRIPT ?= STM32G474xE
  325. # Startup code to use
  326. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  327. MCU_STARTUP ?= stm32g4xx
  328. # Board: it should exist either in <chibios>/os/hal/boards/,
  329. # <keyboard_dir>/boards/, or drivers/boards/
  330. BOARD ?= GENERIC_STM32_G474XE
  331. USE_FPU ?= yes
  332. # UF2 settings
  333. UF2_FAMILY ?= STM32G4
  334. endif
  335. ifneq (,$(filter $(MCU),STM32L433 STM32L443))
  336. # Cortex version
  337. MCU = cortex-m4
  338. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  339. ARMV = 7
  340. ## chip/board settings
  341. # - the next two should match the directories in
  342. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  343. MCU_FAMILY = STM32
  344. MCU_SERIES = STM32L4xx
  345. # Linker script to use
  346. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  347. # or <keyboard_dir>/ld/
  348. MCU_LDSCRIPT ?= STM32L432xC
  349. # Startup code to use
  350. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  351. MCU_STARTUP ?= stm32l4xx
  352. # Board: it should exist either in <chibios>/os/hal/boards/,
  353. # <keyboard_dir>/boards/, or drivers/boards/
  354. BOARD ?= GENERIC_STM32_L433XC
  355. PLATFORM_NAME ?= platform_l432
  356. USE_FPU ?= yes
  357. # UF2 settings
  358. UF2_FAMILY ?= STM32L4
  359. endif
  360. ifneq (,$(filter $(MCU),STM32L412 STM32L422))
  361. # Cortex version
  362. MCU = cortex-m4
  363. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  364. ARMV = 7
  365. ## chip/board settings
  366. # - the next two should match the directories in
  367. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  368. MCU_FAMILY = STM32
  369. MCU_SERIES = STM32L4xx
  370. # Linker script to use
  371. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  372. # or <keyboard_dir>/ld/
  373. MCU_LDSCRIPT ?= STM32L412xB
  374. # Startup code to use
  375. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  376. MCU_STARTUP ?= stm32l4xx
  377. # Board: it should exist either in <chibios>/os/hal/boards/,
  378. # <keyboard_dir>/boards/, or drivers/boards/
  379. BOARD ?= GENERIC_STM32_L412XB
  380. PLATFORM_NAME ?= platform_l432
  381. USE_FPU ?= yes
  382. # UF2 settings
  383. UF2_FAMILY ?= STM32L4
  384. endif
  385. ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
  386. PROTOCOL = LUFA
  387. # Processor frequency.
  388. # This will define a symbol, F_CPU, in all source code files equal to the
  389. # processor frequency in Hz. You can then use this symbol in your source code to
  390. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  391. # automatically to create a 32-bit value in your source code.
  392. #
  393. # This will be an integer division of F_USB below, as it is sourced by
  394. # F_USB after it has run through any CPU prescalers. Note that this value
  395. # does not *change* the processor frequency - it should merely be updated to
  396. # reflect the processor speed set externally so that the code can use accurate
  397. # software delays.
  398. F_CPU ?= 16000000
  399. # LUFA specific
  400. #
  401. # Target architecture (see library "Board Types" documentation).
  402. ARCH = AVR8
  403. # Input clock frequency.
  404. # This will define a symbol, F_USB, in all source code files equal to the
  405. # input clock frequency (before any prescaling is performed) in Hz. This value may
  406. # differ from F_CPU if prescaling is used on the latter, and is required as the
  407. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  408. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  409. # at the end, this will be done automatically to create a 32-bit value in your
  410. # source code.
  411. #
  412. # If no clock division is performed on the input clock inside the AVR (via the
  413. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  414. F_USB ?= $(F_CPU)
  415. # Interrupt driven control endpoint task
  416. ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes))
  417. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  418. endif
  419. ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2))
  420. NO_I2C = yes
  421. endif
  422. endif
  423. ifneq (,$(filter $(MCU),atmega32a))
  424. # MCU name for avrdude
  425. AVRDUDE_MCU = m32
  426. PROTOCOL = VUSB
  427. # Processor frequency.
  428. # This will define a symbol, F_CPU, in all source code files equal to the
  429. # processor frequency in Hz. You can then use this symbol in your source code to
  430. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  431. # automatically to create a 32-bit value in your source code.
  432. F_CPU ?= 12000000
  433. endif
  434. ifneq (,$(filter $(MCU),atmega328p))
  435. # MCU name for avrdude
  436. AVRDUDE_MCU = m328p
  437. PROTOCOL = VUSB
  438. # Processor frequency.
  439. # This will define a symbol, F_CPU, in all source code files equal to the
  440. # processor frequency in Hz. You can then use this symbol in your source code to
  441. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  442. # automatically to create a 32-bit value in your source code.
  443. F_CPU ?= 16000000
  444. endif
  445. ifneq (,$(filter $(MCU),atmega328))
  446. # MCU name for avrdude
  447. AVRDUDE_MCU = m328
  448. PROTOCOL = VUSB
  449. # Processor frequency.
  450. # This will define a symbol, F_CPU, in all source code files equal to the
  451. # processor frequency in Hz. You can then use this symbol in your source code to
  452. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  453. # automatically to create a 32-bit value in your source code.
  454. F_CPU ?= 16000000
  455. endif
  456. ifneq (,$(filter $(MCU),attiny85))
  457. PROTOCOL = VUSB
  458. # Processor frequency.
  459. # This will define a symbol, F_CPU, in all source code files equal to the
  460. # processor frequency in Hz. You can then use this symbol in your source code to
  461. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  462. # automatically to create a 32-bit value in your source code.
  463. F_CPU ?= 16500000
  464. endif