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.

774 lines
21 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 MK66FX1M0, $(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/startup/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. # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
  110. # This ensures that the EEPROM page buffer fits into RAM
  111. USE_PROCESS_STACKSIZE = 0x600
  112. USE_EXCEPTIONS_STACKSIZE = 0x300
  113. # Bootloader address for STM32 DFU
  114. STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC400
  115. endif
  116. ifneq ($(findstring STM32F072, $(MCU)),)
  117. # Cortex version
  118. MCU = cortex-m0
  119. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  120. ARMV = 6
  121. ## chip/board settings
  122. # - the next two should match the directories in
  123. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  124. MCU_FAMILY = STM32
  125. MCU_SERIES = STM32F0xx
  126. # Linker script to use
  127. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  128. # or <keyboard_dir>/ld/
  129. MCU_LDSCRIPT ?= STM32F072xB
  130. # Startup code to use
  131. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  132. MCU_STARTUP ?= stm32f0xx
  133. # Board: it should exist either in <chibios>/os/hal/boards/,
  134. # <keyboard_dir>/boards/, or drivers/boards/
  135. BOARD ?= GENERIC_STM32_F072XB
  136. USE_FPU ?= no
  137. # UF2 settings
  138. UF2_FAMILY ?= STM32F0
  139. # Bootloader address for STM32 DFU
  140. STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC800
  141. endif
  142. ifneq ($(findstring STM32F103, $(MCU)),)
  143. # Cortex version
  144. MCU = cortex-m3
  145. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  146. ARMV = 7
  147. ## chip/board settings
  148. # - the next two should match the directories in
  149. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  150. MCU_FAMILY = STM32
  151. MCU_SERIES = STM32F1xx
  152. # Linker script to use
  153. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  154. # or <keyboard_dir>/ld/
  155. MCU_LDSCRIPT ?= STM32F103x8
  156. # Startup code to use
  157. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  158. MCU_STARTUP ?= stm32f1xx
  159. # Board: it should exist either in <chibios>/os/hal/boards/,
  160. # <keyboard_dir>/boards/, or drivers/boards/
  161. BOARD ?= GENERIC_STM32_F103
  162. USE_FPU ?= no
  163. # UF2 settings
  164. UF2_FAMILY ?= STM32F1
  165. endif
  166. ifneq ($(findstring STM32F303, $(MCU)),)
  167. # Cortex version
  168. MCU = cortex-m4
  169. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  170. ARMV = 7
  171. ## chip/board settings
  172. # - the next two should match the directories in
  173. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  174. MCU_FAMILY = STM32
  175. MCU_SERIES = STM32F3xx
  176. # Linker script to use
  177. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  178. # or <keyboard_dir>/ld/
  179. MCU_LDSCRIPT ?= STM32F303xC
  180. # Startup code to use
  181. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  182. MCU_STARTUP ?= stm32f3xx
  183. # Board: it should exist either in <chibios>/os/hal/boards/,
  184. # <keyboard_dir>/boards/, or drivers/boards/
  185. BOARD ?= GENERIC_STM32_F303XC
  186. USE_FPU ?= yes
  187. # UF2 settings
  188. UF2_FAMILY ?= STM32F3
  189. # Bootloader address for STM32 DFU
  190. STM32_BOOTLOADER_ADDRESS ?= 0x1FFFD800
  191. endif
  192. ifneq ($(findstring STM32F401, $(MCU)),)
  193. # Cortex version
  194. MCU = cortex-m4
  195. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  196. ARMV = 7
  197. ## chip/board settings
  198. # - the next two should match the directories in
  199. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  200. MCU_FAMILY = STM32
  201. MCU_SERIES = STM32F4xx
  202. # Linker script to use
  203. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  204. # or <keyboard_dir>/ld/
  205. ifeq ($(strip $(BOOTLOADER)), tinyuf2)
  206. MCU_LDSCRIPT ?= STM32F401xC_tinyuf2
  207. FIRMWARE_FORMAT ?= uf2
  208. else
  209. MCU_LDSCRIPT ?= STM32F401xC
  210. endif
  211. # Startup code to use
  212. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  213. MCU_STARTUP ?= stm32f4xx
  214. # Board: it should exist either in <chibios>/os/hal/boards/,
  215. # <keyboard_dir>/boards/, or drivers/boards/
  216. BOARD ?= BLACKPILL_STM32_F401
  217. USE_FPU ?= yes
  218. # UF2 settings
  219. UF2_FAMILY ?= STM32F4
  220. # Bootloader address for STM32 DFU
  221. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  222. endif
  223. ifneq ($(findstring STM32F405, $(MCU)),)
  224. # Cortex version
  225. MCU = cortex-m4
  226. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  227. ARMV = 7
  228. ## chip/board settings
  229. # - the next two should match the directories in
  230. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  231. MCU_FAMILY = STM32
  232. MCU_SERIES = STM32F4xx
  233. # Linker script to use
  234. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  235. # or <keyboard_dir>/ld/
  236. MCU_LDSCRIPT ?= STM32F405xG
  237. # Startup code to use
  238. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  239. MCU_STARTUP ?= stm32f4xx
  240. # Board: it should exist either in <chibios>/os/hal/boards/,
  241. # <keyboard_dir>/boards/, or drivers/boards/
  242. BOARD ?= GENERIC_STM32_F405XG
  243. USE_FPU ?= yes
  244. # UF2 settings
  245. UF2_FAMILY ?= STM32F4
  246. # Bootloader address for STM32 DFU
  247. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  248. endif
  249. ifneq ($(findstring STM32F407, $(MCU)),)
  250. # Cortex version
  251. MCU = cortex-m4
  252. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  253. ARMV = 7
  254. ## chip/board settings
  255. # - the next two should match the directories in
  256. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  257. MCU_FAMILY = STM32
  258. MCU_SERIES = STM32F4xx
  259. # Linker script to use
  260. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  261. # or <keyboard_dir>/ld/
  262. MCU_LDSCRIPT ?= STM32F407xE
  263. # Startup code to use
  264. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  265. MCU_STARTUP ?= stm32f4xx
  266. # Board: it should exist either in <chibios>/os/hal/boards/,
  267. # <keyboard_dir>/boards/, or drivers/boards/
  268. BOARD ?= GENERIC_STM32_F407XE
  269. USE_FPU ?= yes
  270. # UF2 settings
  271. UF2_FAMILY ?= STM32F4
  272. # Bootloader address for STM32 DFU
  273. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  274. endif
  275. ifneq ($(findstring STM32F411, $(MCU)),)
  276. # Cortex version
  277. MCU = cortex-m4
  278. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  279. ARMV = 7
  280. ## chip/board settings
  281. # - the next two should match the directories in
  282. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  283. MCU_FAMILY = STM32
  284. MCU_SERIES = STM32F4xx
  285. # Linker script to use
  286. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  287. # or <keyboard_dir>/ld/
  288. ifeq ($(strip $(BOOTLOADER)), tinyuf2)
  289. MCU_LDSCRIPT ?= STM32F411xE_tinyuf2
  290. FIRMWARE_FORMAT ?= uf2
  291. else
  292. MCU_LDSCRIPT ?= STM32F411xE
  293. endif
  294. # Startup code to use
  295. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  296. MCU_STARTUP ?= stm32f4xx
  297. # Board: it should exist either in <chibios>/os/hal/boards/,
  298. # <keyboard_dir>/boards/, or drivers/boards/
  299. BOARD ?= BLACKPILL_STM32_F411
  300. USE_FPU ?= yes
  301. # UF2 settings
  302. UF2_FAMILY ?= STM32F4
  303. # Bootloader address for STM32 DFU
  304. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  305. endif
  306. ifneq ($(findstring STM32F446, $(MCU)),)
  307. # Cortex version
  308. MCU = cortex-m4
  309. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  310. ARMV = 7
  311. ## chip/board settings
  312. # - the next two should match the directories in
  313. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  314. MCU_FAMILY = STM32
  315. MCU_SERIES = STM32F4xx
  316. # Linker script to use
  317. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  318. # or <keyboard_dir>/ld/
  319. MCU_LDSCRIPT ?= STM32F446xE
  320. # Startup code to use
  321. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  322. MCU_STARTUP ?= stm32f4xx
  323. # Board: it should exist either in <chibios>/os/hal/boards/,
  324. # <keyboard_dir>/boards/, or drivers/boards/
  325. BOARD ?= GENERIC_STM32_F446XE
  326. USE_FPU ?= yes
  327. # Bootloader address for STM32 DFU
  328. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  329. endif
  330. ifneq ($(findstring STM32G431, $(MCU)),)
  331. # Cortex version
  332. MCU = cortex-m4
  333. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  334. ARMV = 7
  335. ## chip/board settings
  336. # - the next two should match the directories in
  337. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  338. MCU_FAMILY = STM32
  339. MCU_SERIES = STM32G4xx
  340. # Linker script to use
  341. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  342. # or <keyboard_dir>/ld/
  343. MCU_LDSCRIPT ?= STM32G431xB
  344. # Startup code to use
  345. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  346. MCU_STARTUP ?= stm32g4xx
  347. # Board: it should exist either in <chibios>/os/hal/boards/,
  348. # <keyboard_dir>/boards/, or drivers/boards/
  349. BOARD ?= GENERIC_STM32_G431XB
  350. USE_FPU ?= yes
  351. # UF2 settings
  352. UF2_FAMILY ?= STM32G4
  353. # Bootloader address for STM32 DFU
  354. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  355. endif
  356. ifneq ($(findstring STM32G474, $(MCU)),)
  357. # Cortex version
  358. MCU = cortex-m4
  359. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  360. ARMV = 7
  361. ## chip/board settings
  362. # - the next two should match the directories in
  363. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  364. MCU_FAMILY = STM32
  365. MCU_SERIES = STM32G4xx
  366. # Linker script to use
  367. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  368. # or <keyboard_dir>/ld/
  369. MCU_LDSCRIPT ?= STM32G474xE
  370. # Startup code to use
  371. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  372. MCU_STARTUP ?= stm32g4xx
  373. # Board: it should exist either in <chibios>/os/hal/boards/,
  374. # <keyboard_dir>/boards/, or drivers/boards/
  375. BOARD ?= GENERIC_STM32_G474XE
  376. USE_FPU ?= yes
  377. # UF2 settings
  378. UF2_FAMILY ?= STM32G4
  379. # Bootloader address for STM32 DFU
  380. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  381. endif
  382. ifneq (,$(filter $(MCU),STM32L432 STM32L442))
  383. # Cortex version
  384. MCU = cortex-m4
  385. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  386. ARMV = 7
  387. ## chip/board settings
  388. # - the next two should match the directories in
  389. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  390. MCU_FAMILY = STM32
  391. MCU_SERIES = STM32L4xx
  392. # Linker script to use
  393. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  394. # or <keyboard_dir>/ld/
  395. MCU_LDSCRIPT ?= STM32L432xC
  396. # Startup code to use
  397. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  398. MCU_STARTUP ?= stm32l4xx
  399. # Board: it should exist either in <chibios>/os/hal/boards/,
  400. # <keyboard_dir>/boards/, or drivers/boards/
  401. BOARD ?= GENERIC_STM32_L432XC
  402. PLATFORM_NAME ?= platform_l432
  403. USE_FPU ?= yes
  404. # UF2 settings
  405. UF2_FAMILY ?= STM32L4
  406. # Bootloader address for STM32 DFU
  407. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  408. endif
  409. ifneq (,$(filter $(MCU),STM32L433 STM32L443))
  410. # Cortex version
  411. MCU = cortex-m4
  412. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  413. ARMV = 7
  414. ## chip/board settings
  415. # - the next two should match the directories in
  416. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  417. MCU_FAMILY = STM32
  418. MCU_SERIES = STM32L4xx
  419. # Linker script to use
  420. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  421. # or <keyboard_dir>/ld/
  422. MCU_LDSCRIPT ?= STM32L432xC
  423. # Startup code to use
  424. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  425. MCU_STARTUP ?= stm32l4xx
  426. # Board: it should exist either in <chibios>/os/hal/boards/,
  427. # <keyboard_dir>/boards/, or drivers/boards/
  428. BOARD ?= GENERIC_STM32_L433XC
  429. PLATFORM_NAME ?= platform_l432
  430. USE_FPU ?= yes
  431. # UF2 settings
  432. UF2_FAMILY ?= STM32L4
  433. # Bootloader address for STM32 DFU
  434. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  435. endif
  436. ifneq (,$(filter $(MCU),STM32L412 STM32L422))
  437. # Cortex version
  438. MCU = cortex-m4
  439. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  440. ARMV = 7
  441. ## chip/board settings
  442. # - the next two should match the directories in
  443. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  444. MCU_FAMILY = STM32
  445. MCU_SERIES = STM32L4xx
  446. # Linker script to use
  447. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  448. # or <keyboard_dir>/ld/
  449. MCU_LDSCRIPT ?= STM32L412xB
  450. # Startup code to use
  451. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  452. MCU_STARTUP ?= stm32l4xx
  453. # Board: it should exist either in <chibios>/os/hal/boards/,
  454. # <keyboard_dir>/boards/, or drivers/boards/
  455. BOARD ?= GENERIC_STM32_L412XB
  456. PLATFORM_NAME ?= platform_l432
  457. USE_FPU ?= yes
  458. # UF2 settings
  459. UF2_FAMILY ?= STM32L4
  460. # Bootloader address for STM32 DFU
  461. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  462. endif
  463. ifneq ($(findstring WB32F3G71, $(MCU)),)
  464. # Cortex version
  465. MCU = cortex-m3
  466. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  467. ARMV = 7
  468. ## chip/board settings
  469. # - the next two should match the directories in
  470. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  471. MCU_FAMILY = WB32
  472. MCU_SERIES = WB32F3G71xx
  473. # Linker script to use
  474. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  475. # or <keyboard_dir>/ld/
  476. MCU_LDSCRIPT ?= WB32F3G71x9
  477. # Startup code to use
  478. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  479. MCU_STARTUP ?= wb32f3g71xx
  480. # Board: it should exist either in <chibios>/os/hal/boards/,
  481. # <keyboard_dir>/boards/, or drivers/boards/
  482. BOARD ?= GENERIC_WB32_F3G71XX
  483. USE_FPU ?= no
  484. # Bootloader address for WB32 DFU
  485. STM32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
  486. WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
  487. endif
  488. ifneq ($(findstring GD32VF103, $(MCU)),)
  489. # RISC-V
  490. MCU = risc-v
  491. # RISC-V extensions and abi configuration
  492. MCU_ARCH = rv32imac
  493. MCU_ABI = ilp32
  494. MCU_CMODEL = medlow
  495. ## chip/board settings
  496. # - the next two should match the directories in
  497. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  498. MCU_FAMILY = GD32V
  499. MCU_SERIES = GD32VF103
  500. # Linker script to use
  501. # - it should exist either in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/ld/
  502. # or <keyboard_dir>/ld/
  503. MCU_LDSCRIPT ?= GD32VF103xB
  504. # Startup code to use
  505. # - it should exist in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/mk/
  506. MCU_STARTUP ?= gd32vf103
  507. # Board: it should exist either in <chibios>/os/hal/boards/,
  508. # <keyboard_dir>/boards/, or drivers/boards/
  509. BOARD ?= SIPEED_LONGAN_NANO
  510. USE_FPU ?= no
  511. endif
  512. ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
  513. PROTOCOL = LUFA
  514. # Processor frequency.
  515. # This will define a symbol, F_CPU, in all source code files equal to the
  516. # processor frequency in Hz. You can then use this symbol in your source code to
  517. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  518. # automatically to create a 32-bit value in your source code.
  519. #
  520. # This will be an integer division of F_USB below, as it is sourced by
  521. # F_USB after it has run through any CPU prescalers. Note that this value
  522. # does not *change* the processor frequency - it should merely be updated to
  523. # reflect the processor speed set externally so that the code can use accurate
  524. # software delays.
  525. F_CPU ?= 16000000
  526. # LUFA specific
  527. #
  528. # Target architecture (see library "Board Types" documentation).
  529. ARCH = AVR8
  530. # Input clock frequency.
  531. # This will define a symbol, F_USB, in all source code files equal to the
  532. # input clock frequency (before any prescaling is performed) in Hz. This value may
  533. # differ from F_CPU if prescaling is used on the latter, and is required as the
  534. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  535. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  536. # at the end, this will be done automatically to create a 32-bit value in your
  537. # source code.
  538. #
  539. # If no clock division is performed on the input clock inside the AVR (via the
  540. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  541. F_USB ?= $(F_CPU)
  542. # Interrupt driven control endpoint task
  543. ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes))
  544. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  545. endif
  546. ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2))
  547. NO_I2C = yes
  548. endif
  549. endif
  550. ifneq (,$(filter $(MCU),atmega32a))
  551. # MCU name for avrdude
  552. AVRDUDE_MCU = m32
  553. PROTOCOL = VUSB
  554. # Processor frequency.
  555. # This will define a symbol, F_CPU, in all source code files equal to the
  556. # processor frequency in Hz. You can then use this symbol in your source code to
  557. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  558. # automatically to create a 32-bit value in your source code.
  559. F_CPU ?= 12000000
  560. endif
  561. ifneq (,$(filter $(MCU),atmega328p))
  562. # MCU name for avrdude
  563. AVRDUDE_MCU = m328p
  564. PROTOCOL = VUSB
  565. # Processor frequency.
  566. # This will define a symbol, F_CPU, in all source code files equal to the
  567. # processor frequency in Hz. You can then use this symbol in your source code to
  568. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  569. # automatically to create a 32-bit value in your source code.
  570. F_CPU ?= 16000000
  571. endif
  572. ifneq (,$(filter $(MCU),atmega328))
  573. # MCU name for avrdude
  574. AVRDUDE_MCU = m328
  575. PROTOCOL = VUSB
  576. # Processor frequency.
  577. # This will define a symbol, F_CPU, in all source code files equal to the
  578. # processor frequency in Hz. You can then use this symbol in your source code to
  579. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  580. # automatically to create a 32-bit value in your source code.
  581. F_CPU ?= 16000000
  582. endif
  583. ifneq (,$(filter $(MCU),attiny85))
  584. PROTOCOL = VUSB
  585. # Processor frequency.
  586. # This will define a symbol, F_CPU, in all source code files equal to the
  587. # processor frequency in Hz. You can then use this symbol in your source code to
  588. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  589. # automatically to create a 32-bit value in your source code.
  590. F_CPU ?= 16500000
  591. endif