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.

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