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.

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