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.

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