logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

mcu_selection.mk (25505B)


  1. ifneq ($(findstring MKL26Z64, $(MCU)),)
  2. # Cortex version
  3. MCU = cortex-m0plus
  4. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  5. ARMV = 6
  6. ## chip/board settings
  7. # - the next two should match the directories in
  8. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  9. # OR
  10. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  11. MCU_FAMILY = KINETIS
  12. MCU_SERIES = KL2x
  13. # Linker script to use
  14. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  15. # or <keyboard_dir>/ld/
  16. MCU_LDSCRIPT ?= MKL26Z64
  17. # Startup code to use
  18. # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
  19. MCU_STARTUP ?= kl2x
  20. # Board: it should exist either in <chibios>/os/hal/boards/,
  21. # <keyboard_dir>/boards/, or drivers/boards/
  22. BOARD ?= PJRC_TEENSY_LC
  23. endif
  24. ifneq ($(findstring MK20DX128, $(MCU)),)
  25. # Cortex version
  26. MCU = cortex-m4
  27. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  28. ARMV = 7
  29. ## chip/board settings
  30. # - the next two should match the directories in
  31. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  32. # OR
  33. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  34. MCU_FAMILY = KINETIS
  35. MCU_SERIES = K20x
  36. # Linker script to use
  37. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  38. # or <keyboard_dir>/ld/
  39. MCU_LDSCRIPT ?= MK20DX128
  40. # Startup code to use
  41. # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
  42. MCU_STARTUP ?= k20x5
  43. # Board: it should exist either in <chibios>/os/hal/boards/,
  44. # <keyboard_dir>/boards/, or drivers/boards/
  45. BOARD ?= PJRC_TEENSY_3
  46. endif
  47. ifneq ($(findstring MK20DX256, $(MCU)),)
  48. # Cortex version
  49. MCU = cortex-m4
  50. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  51. ARMV = 7
  52. ## chip/board settings
  53. # - the next two should match the directories in
  54. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  55. # OR
  56. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  57. MCU_FAMILY = KINETIS
  58. MCU_SERIES = K20x
  59. # Linker script to use
  60. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  61. # or <keyboard_dir>/ld/
  62. MCU_LDSCRIPT ?= MK20DX256
  63. # Startup code to use
  64. # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
  65. MCU_STARTUP ?= k20x7
  66. # Board: it should exist either in <chibios>/os/hal/boards/,
  67. # <keyboard_dir>/boards/, or drivers/boards/
  68. BOARD ?= PJRC_TEENSY_3_1
  69. endif
  70. ifneq ($(findstring MK64FX512, $(MCU)),)
  71. # Cortex version
  72. MCU = cortex-m4
  73. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  74. ARMV = 7
  75. ## chip/board settings
  76. # - the next two should match the directories in
  77. # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  78. MCU_FAMILY = KINETIS
  79. MCU_SERIES = K60x
  80. # Linker script to use
  81. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  82. # or <keyboard_dir>/ld/
  83. MCU_LDSCRIPT ?= MK64FX512
  84. # Startup code to use
  85. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  86. MCU_STARTUP ?= k60x
  87. # Board: it should exist either in <chibios>/os/hal/boards/,
  88. # <keyboard_dir>/boards/, or drivers/boards/
  89. BOARD ?= PJRC_TEENSY_3_5
  90. endif
  91. ifneq ($(findstring MK66FX1M0, $(MCU)),)
  92. # Cortex version
  93. MCU = cortex-m4
  94. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  95. ARMV = 7
  96. ## chip/board settings
  97. # - the next two should match the directories in
  98. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  99. # OR
  100. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  101. MCU_FAMILY = KINETIS
  102. MCU_SERIES = MK66F18
  103. # Linker script to use
  104. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  105. # or <keyboard_dir>/ld/
  106. MCU_LDSCRIPT ?= MK66FX1M0
  107. # Startup code to use
  108. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  109. MCU_STARTUP ?= MK66F18
  110. # Board: it should exist either in <chibios>/os/hal/boards/,
  111. # <keyboard_dir>/boards/, or drivers/boards/
  112. BOARD ?= PJRC_TEENSY_3_6
  113. endif
  114. ifneq ($(findstring RP2040, $(MCU)),)
  115. # Cortex version
  116. MCU = cortex-m0plus
  117. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  118. CHIBIOS_PORT = ARMv6-M-RP2
  119. ## chip/board settings
  120. # - the next two should match the directories in
  121. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  122. # OR
  123. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  124. MCU_FAMILY = RP
  125. MCU_SERIES = RP2040
  126. # Linker script to use
  127. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  128. # or <keyboard_dir>/ld/
  129. STARTUPLD_CONTRIB = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
  130. MCU_LDSCRIPT ?= RP2040_FLASH_TIMECRIT
  131. LDFLAGS += -L $(STARTUPLD_CONTRIB)
  132. # Startup code to use
  133. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  134. MCU_STARTUP ?= rp2040
  135. # Board: it should exist either in <chibios>/os/hal/boards/,
  136. # <keyboard_dir>/boards/, or drivers/boards/
  137. BOARD ?= GENERIC_PROMICRO_RP2040
  138. # Default UF2 Bootloader settings
  139. UF2_FAMILY ?= RP2040
  140. FIRMWARE_FORMAT ?= uf2
  141. endif
  142. ifneq ($(findstring STM32F042, $(MCU)),)
  143. # Cortex version
  144. MCU = cortex-m0
  145. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  146. ARMV = 6
  147. ## chip/board settings
  148. # - the next two should match the directories in
  149. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  150. # OR
  151. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  152. MCU_FAMILY = STM32
  153. MCU_SERIES = STM32F0xx
  154. # Linker script to use
  155. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  156. # or <keyboard_dir>/ld/
  157. MCU_LDSCRIPT ?= STM32F042x6
  158. # Startup code to use
  159. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  160. MCU_STARTUP ?= stm32f0xx
  161. # Board: it should exist either in <chibios>/os/hal/boards/,
  162. # <keyboard_dir>/boards/, or drivers/boards/
  163. BOARD ?= GENERIC_STM32_F042X6
  164. USE_FPU ?= no
  165. # UF2 settings
  166. UF2_FAMILY ?= STM32F0
  167. # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
  168. # This ensures that the EEPROM page buffer fits into RAM
  169. USE_PROCESS_STACKSIZE = 0x600
  170. USE_EXCEPTIONS_STACKSIZE = 0x300
  171. # Bootloader address for STM32 DFU
  172. STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC400
  173. endif
  174. ifneq ($(findstring STM32F072, $(MCU)),)
  175. # Cortex version
  176. MCU = cortex-m0
  177. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  178. ARMV = 6
  179. ## chip/board settings
  180. # - the next two should match the directories in
  181. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  182. # OR
  183. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  184. MCU_FAMILY = STM32
  185. MCU_SERIES = STM32F0xx
  186. # Linker script to use
  187. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  188. # or <keyboard_dir>/ld/
  189. MCU_LDSCRIPT ?= STM32F072xB
  190. # Startup code to use
  191. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  192. MCU_STARTUP ?= stm32f0xx
  193. # Board: it should exist either in <chibios>/os/hal/boards/,
  194. # <keyboard_dir>/boards/, or drivers/boards/
  195. BOARD ?= GENERIC_STM32_F072XB
  196. USE_FPU ?= no
  197. # UF2 settings
  198. UF2_FAMILY ?= STM32F0
  199. # Bootloader address for STM32 DFU
  200. STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC800
  201. endif
  202. ifneq ($(findstring STM32F103, $(MCU)),)
  203. # Cortex version
  204. MCU = cortex-m3
  205. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  206. ARMV = 7
  207. ## chip/board settings
  208. # - the next two should match the directories in
  209. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  210. # OR
  211. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  212. MCU_FAMILY = STM32
  213. MCU_SERIES = STM32F1xx
  214. # Linker script to use
  215. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  216. # or <keyboard_dir>/ld/
  217. MCU_LDSCRIPT ?= STM32F103x8
  218. # Startup code to use
  219. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  220. MCU_STARTUP ?= stm32f1xx
  221. # Board: it should exist either in <chibios>/os/hal/boards/,
  222. # <keyboard_dir>/boards/, or drivers/boards/
  223. BOARD ?= GENERIC_STM32_F103
  224. USE_FPU ?= no
  225. # UF2 settings
  226. UF2_FAMILY ?= STM32F1
  227. endif
  228. ifneq ($(findstring STM32F303, $(MCU)),)
  229. # Cortex version
  230. MCU = cortex-m4
  231. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  232. ARMV = 7
  233. ## chip/board settings
  234. # - the next two should match the directories in
  235. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  236. # OR
  237. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  238. MCU_FAMILY = STM32
  239. MCU_SERIES = STM32F3xx
  240. # Linker script to use
  241. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  242. # or <keyboard_dir>/ld/
  243. MCU_LDSCRIPT ?= STM32F303xC
  244. # Startup code to use
  245. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  246. MCU_STARTUP ?= stm32f3xx
  247. # Board: it should exist either in <chibios>/os/hal/boards/,
  248. # <keyboard_dir>/boards/, or drivers/boards/
  249. BOARD ?= GENERIC_STM32_F303XC
  250. USE_FPU ?= yes
  251. # UF2 settings
  252. UF2_FAMILY ?= STM32F3
  253. # Bootloader address for STM32 DFU
  254. STM32_BOOTLOADER_ADDRESS ?= 0x1FFFD800
  255. endif
  256. ifneq ($(findstring STM32F401, $(MCU)),)
  257. # Cortex version
  258. MCU = cortex-m4
  259. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  260. ARMV = 7
  261. ## chip/board settings
  262. # - the next two should match the directories in
  263. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  264. # OR
  265. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  266. MCU_FAMILY = STM32
  267. MCU_SERIES = STM32F4xx
  268. # Linker script to use
  269. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  270. # or <keyboard_dir>/ld/
  271. MCU_LDSCRIPT ?= STM32F401xC
  272. # Startup code to use
  273. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  274. MCU_STARTUP ?= stm32f4xx
  275. # Board: it should exist either in <chibios>/os/hal/boards/,
  276. # <keyboard_dir>/boards/, or drivers/boards/
  277. BOARD ?= GENERIC_STM32_F401XC
  278. USE_FPU ?= yes
  279. # UF2 settings
  280. UF2_FAMILY ?= STM32F4
  281. # Bootloader address for STM32 DFU
  282. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  283. endif
  284. ifneq ($(findstring STM32F405, $(MCU)),)
  285. # Cortex version
  286. MCU = cortex-m4
  287. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  288. ARMV = 7
  289. ## chip/board settings
  290. # - the next two should match the directories in
  291. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  292. # OR
  293. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  294. MCU_FAMILY = STM32
  295. MCU_SERIES = STM32F4xx
  296. # Linker script to use
  297. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  298. # or <keyboard_dir>/ld/
  299. MCU_LDSCRIPT ?= STM32F405xG
  300. # Startup code to use
  301. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  302. MCU_STARTUP ?= stm32f4xx
  303. # Board: it should exist either in <chibios>/os/hal/boards/,
  304. # <keyboard_dir>/boards/, or drivers/boards/
  305. BOARD ?= GENERIC_STM32_F405XG
  306. USE_FPU ?= yes
  307. # UF2 settings
  308. UF2_FAMILY ?= STM32F4
  309. # Bootloader address for STM32 DFU
  310. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  311. endif
  312. ifneq ($(findstring STM32F407, $(MCU)),)
  313. # Cortex version
  314. MCU = cortex-m4
  315. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  316. ARMV = 7
  317. ## chip/board settings
  318. # - the next two should match the directories in
  319. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  320. # OR
  321. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  322. MCU_FAMILY = STM32
  323. MCU_SERIES = STM32F4xx
  324. # Linker script to use
  325. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  326. # or <keyboard_dir>/ld/
  327. MCU_LDSCRIPT ?= STM32F407xE
  328. # Startup code to use
  329. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  330. MCU_STARTUP ?= stm32f4xx
  331. # Board: it should exist either in <chibios>/os/hal/boards/,
  332. # <keyboard_dir>/boards/, or drivers/boards/
  333. BOARD ?= GENERIC_STM32_F407XE
  334. USE_FPU ?= yes
  335. # UF2 settings
  336. UF2_FAMILY ?= STM32F4
  337. # Bootloader address for STM32 DFU
  338. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  339. endif
  340. ifneq ($(findstring STM32F411, $(MCU)),)
  341. # Cortex version
  342. MCU = cortex-m4
  343. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  344. ARMV = 7
  345. ## chip/board settings
  346. # - the next two should match the directories in
  347. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  348. # OR
  349. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  350. MCU_FAMILY = STM32
  351. MCU_SERIES = STM32F4xx
  352. # Linker script to use
  353. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  354. # or <keyboard_dir>/ld/
  355. MCU_LDSCRIPT ?= STM32F411xE
  356. # Startup code to use
  357. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  358. MCU_STARTUP ?= stm32f4xx
  359. # Board: it should exist either in <chibios>/os/hal/boards/,
  360. # <keyboard_dir>/boards/, or drivers/boards/
  361. BOARD ?= GENERIC_STM32_F411XE
  362. USE_FPU ?= yes
  363. # UF2 settings
  364. UF2_FAMILY ?= STM32F4
  365. # Bootloader address for STM32 DFU
  366. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  367. endif
  368. ifneq ($(findstring STM32F446, $(MCU)),)
  369. # Cortex version
  370. MCU = cortex-m4
  371. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  372. ARMV = 7
  373. ## chip/board settings
  374. # - the next two should match the directories in
  375. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  376. # OR
  377. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  378. MCU_FAMILY = STM32
  379. MCU_SERIES = STM32F4xx
  380. # Linker script to use
  381. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  382. # or <keyboard_dir>/ld/
  383. MCU_LDSCRIPT ?= STM32F446xE
  384. # Startup code to use
  385. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  386. MCU_STARTUP ?= stm32f4xx
  387. # Board: it should exist either in <chibios>/os/hal/boards/,
  388. # <keyboard_dir>/boards/, or drivers/boards/
  389. BOARD ?= GENERIC_STM32_F446XE
  390. USE_FPU ?= yes
  391. # Bootloader address for STM32 DFU
  392. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  393. # Default as no chibios efl config
  394. EEPROM_DRIVER ?= transient
  395. endif
  396. ifneq ($(findstring STM32G0B1, $(MCU)),)
  397. # Cortex version
  398. MCU = cortex-m0plus
  399. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  400. ARMV = 6
  401. ## chip/board settings
  402. # - the next two should match the directories in
  403. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  404. # OR
  405. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  406. MCU_FAMILY = STM32
  407. MCU_SERIES = STM32G0xx
  408. # Linker script to use
  409. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  410. # or <keyboard_dir>/ld/
  411. MCU_LDSCRIPT ?= STM32G0B1xB
  412. # Startup code to use
  413. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  414. MCU_STARTUP ?= stm32g0xx
  415. # Board: it should exist either in <chibios>/os/hal/boards/,
  416. # <keyboard_dir>/boards/, or drivers/boards/
  417. BOARD ?= GENERIC_STM32_G0B1XB
  418. # UF2 settings
  419. UF2_FAMILY ?= STM32G0
  420. # Bootloader address for STM32 DFU
  421. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  422. endif
  423. ifneq ($(findstring STM32G431, $(MCU)),)
  424. # Cortex version
  425. MCU = cortex-m4
  426. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  427. ARMV = 7
  428. ## chip/board settings
  429. # - the next two should match the directories in
  430. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  431. # OR
  432. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  433. MCU_FAMILY = STM32
  434. MCU_SERIES = STM32G4xx
  435. # Linker script to use
  436. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  437. # or <keyboard_dir>/ld/
  438. MCU_LDSCRIPT ?= STM32G431xB
  439. # Startup code to use
  440. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  441. MCU_STARTUP ?= stm32g4xx
  442. # Board: it should exist either in <chibios>/os/hal/boards/,
  443. # <keyboard_dir>/boards/, or drivers/boards/
  444. BOARD ?= GENERIC_STM32_G431XB
  445. USE_FPU ?= yes
  446. # UF2 settings
  447. UF2_FAMILY ?= STM32G4
  448. # Bootloader address for STM32 DFU
  449. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  450. endif
  451. ifneq ($(findstring STM32G474, $(MCU)),)
  452. # Cortex version
  453. MCU = cortex-m4
  454. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  455. ARMV = 7
  456. ## chip/board settings
  457. # - the next two should match the directories in
  458. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  459. # OR
  460. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  461. MCU_FAMILY = STM32
  462. MCU_SERIES = STM32G4xx
  463. # Linker script to use
  464. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  465. # or <keyboard_dir>/ld/
  466. MCU_LDSCRIPT ?= STM32G474xE
  467. # Startup code to use
  468. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  469. MCU_STARTUP ?= stm32g4xx
  470. # Board: it should exist either in <chibios>/os/hal/boards/,
  471. # <keyboard_dir>/boards/, or drivers/boards/
  472. BOARD ?= GENERIC_STM32_G474XE
  473. USE_FPU ?= yes
  474. # UF2 settings
  475. UF2_FAMILY ?= STM32G4
  476. # Bootloader address for STM32 DFU
  477. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  478. endif
  479. ifneq (,$(filter $(MCU),STM32L432 STM32L442))
  480. # Cortex version
  481. MCU = cortex-m4
  482. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  483. ARMV = 7
  484. ## chip/board settings
  485. # - the next two should match the directories in
  486. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  487. # OR
  488. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  489. MCU_FAMILY = STM32
  490. MCU_SERIES = STM32L4xx
  491. # Linker script to use
  492. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  493. # or <keyboard_dir>/ld/
  494. MCU_LDSCRIPT ?= STM32L432xC
  495. # Startup code to use
  496. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  497. MCU_STARTUP ?= stm32l4xx
  498. # Board: it should exist either in <chibios>/os/hal/boards/,
  499. # <keyboard_dir>/boards/, or drivers/boards/
  500. BOARD ?= GENERIC_STM32_L432XC
  501. PLATFORM_NAME ?= platform_l432
  502. USE_FPU ?= yes
  503. # UF2 settings
  504. UF2_FAMILY ?= STM32L4
  505. # Bootloader address for STM32 DFU
  506. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  507. endif
  508. ifneq (,$(filter $(MCU),STM32L433 STM32L443))
  509. # Cortex version
  510. MCU = cortex-m4
  511. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  512. ARMV = 7
  513. ## chip/board settings
  514. # - the next two should match the directories in
  515. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  516. # OR
  517. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  518. MCU_FAMILY = STM32
  519. MCU_SERIES = STM32L4xx
  520. # Linker script to use
  521. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  522. # or <keyboard_dir>/ld/
  523. MCU_LDSCRIPT ?= STM32L432xC
  524. # Startup code to use
  525. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  526. MCU_STARTUP ?= stm32l4xx
  527. # Board: it should exist either in <chibios>/os/hal/boards/,
  528. # <keyboard_dir>/boards/, or drivers/boards/
  529. BOARD ?= GENERIC_STM32_L433XC
  530. PLATFORM_NAME ?= platform_l432
  531. USE_FPU ?= yes
  532. # UF2 settings
  533. UF2_FAMILY ?= STM32L4
  534. # Bootloader address for STM32 DFU
  535. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  536. endif
  537. ifneq (,$(filter $(MCU),STM32L412 STM32L422))
  538. # Cortex version
  539. MCU = cortex-m4
  540. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  541. ARMV = 7
  542. ## chip/board settings
  543. # - the next two should match the directories in
  544. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  545. # OR
  546. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  547. MCU_FAMILY = STM32
  548. MCU_SERIES = STM32L4xx
  549. # Linker script to use
  550. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  551. # or <keyboard_dir>/ld/
  552. MCU_LDSCRIPT ?= STM32L412xB
  553. # Startup code to use
  554. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  555. MCU_STARTUP ?= stm32l4xx
  556. # Board: it should exist either in <chibios>/os/hal/boards/,
  557. # <keyboard_dir>/boards/, or drivers/boards/
  558. BOARD ?= GENERIC_STM32_L412XB
  559. PLATFORM_NAME ?= platform_l412_l422
  560. USE_FPU ?= yes
  561. # UF2 settings
  562. UF2_FAMILY ?= STM32L4
  563. # Bootloader address for STM32 DFU
  564. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  565. endif
  566. ifneq (,$(filter $(MCU),STM32H723 STM32H733))
  567. # Cortex version
  568. MCU = cortex-m7
  569. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  570. ARMV = 7
  571. ## chip/board settings
  572. # - the next two should match the directories in
  573. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  574. # OR
  575. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  576. MCU_FAMILY = STM32
  577. MCU_SERIES = STM32H7xx
  578. # Linker script to use
  579. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  580. # or <keyboard_dir>/ld/
  581. MCU_LDSCRIPT ?= STM32H723xG_ITCM64k
  582. # Startup code to use
  583. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  584. MCU_STARTUP ?= stm32h7xx
  585. # Board: it should exist either in <chibios>/os/hal/boards/,
  586. # <keyboard_dir>/boards/, or drivers/boards/
  587. BOARD ?= GENERIC_STM32_H723XG
  588. PLATFORM_NAME ?= platform_type2
  589. USE_FPU ?= yes
  590. # UF2 settings
  591. UF2_FAMILY ?= STM32H7
  592. # Bootloader address for STM32 DFU
  593. STM32_BOOTLOADER_ADDRESS ?= 0x1FF09800
  594. endif
  595. ifneq ($(findstring WB32F3G71, $(MCU)),)
  596. # Cortex version
  597. MCU = cortex-m3
  598. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  599. ARMV = 7
  600. ## chip/board settings
  601. # - the next two should match the directories in
  602. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  603. # OR
  604. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  605. MCU_FAMILY = WB32
  606. MCU_SERIES = WB32F3G71xx
  607. # Linker script to use
  608. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  609. # or <keyboard_dir>/ld/
  610. MCU_LDSCRIPT ?= WB32F3G71x9
  611. # Startup code to use
  612. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  613. MCU_STARTUP ?= wb32f3g71xx
  614. # Board: it should exist either in <chibios>/os/hal/boards/,
  615. # <keyboard_dir>/boards/, or drivers/boards/
  616. BOARD ?= GENERIC_WB32_F3G71XX
  617. USE_FPU ?= no
  618. # Bootloader address for WB32 DFU
  619. WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
  620. endif
  621. ifneq ($(findstring WB32FQ95, $(MCU)),)
  622. # Cortex version
  623. MCU = cortex-m3
  624. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  625. ARMV = 7
  626. ## chip/board settings
  627. # - the next two should match the directories in
  628. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  629. # OR
  630. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  631. MCU_FAMILY = WB32
  632. MCU_SERIES = WB32FQ95xx
  633. # Linker script to use
  634. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  635. # or <keyboard_dir>/ld/
  636. MCU_LDSCRIPT ?= WB32FQ95xB
  637. # Startup code to use
  638. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  639. MCU_STARTUP ?= wb32fq95xx
  640. # Board: it should exist either in <chibios>/os/hal/boards/,
  641. # <keyboard_dir>/boards/, or drivers/boards/
  642. BOARD ?= GENERIC_WB32_FQ95XX
  643. USE_FPU ?= no
  644. # Bootloader address for WB32 DFU
  645. WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
  646. endif
  647. ifneq ($(findstring AT32F415, $(MCU)),)
  648. # Cortex version
  649. MCU = cortex-m4
  650. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  651. ARMV = 7
  652. ## chip/board settings
  653. # - the next two should match the directories in
  654. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  655. # OR
  656. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  657. MCU_FAMILY = AT32
  658. MCU_SERIES = AT32F415
  659. # Linker script to use
  660. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  661. # or <keyboard_dir>/ld/
  662. MCU_LDSCRIPT ?= AT32F415xB
  663. # Startup code to use
  664. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  665. MCU_STARTUP ?= at32f415
  666. # Board: it should exist either in <chibios>/os/hal/boards/,
  667. # <keyboard_dir>/boards/, or drivers/boards/
  668. BOARD ?= GENERIC_AT32_F415XX
  669. USE_FPU ?= no
  670. # Bootloader address for AT32 DFU
  671. AT32_BOOTLOADER_ADDRESS ?= 0x1FFFAC00
  672. endif
  673. ifneq ($(findstring GD32VF103, $(MCU)),)
  674. # RISC-V
  675. MCU = risc-v
  676. # RISC-V extensions and abi configuration
  677. MCU_ARCH = rv32imac
  678. MCU_ABI = ilp32
  679. MCU_CMODEL = medlow
  680. ## chip/board settings
  681. # - the next two should match the directories in
  682. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  683. # OR
  684. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  685. MCU_PORT_NAME = GD
  686. MCU_FAMILY = GD32V
  687. MCU_SERIES = GD32VF103
  688. # Linker script to use
  689. # - it should exist either in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/ld/
  690. # or <keyboard_dir>/ld/
  691. MCU_LDSCRIPT ?= GD32VF103xB
  692. # Startup code to use
  693. # - it should exist in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/mk/
  694. MCU_STARTUP ?= gd32vf103
  695. # Board: it should exist either in <chibios>/os/hal/boards/,
  696. # <keyboard_dir>/boards/, or drivers/boards/
  697. BOARD ?= SIPEED_LONGAN_NANO
  698. USE_FPU ?= no
  699. endif