mcu_selection.mk 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  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. ifeq ($(strip $(BOOTLOADER)), uf2boot)
  218. MCU_LDSCRIPT ?= STM32F103xB_uf2boot
  219. else
  220. MCU_LDSCRIPT ?= STM32F103x8
  221. endif
  222. # Startup code to use
  223. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  224. MCU_STARTUP ?= stm32f1xx
  225. # Board: it should exist either in <chibios>/os/hal/boards/,
  226. # <keyboard_dir>/boards/, or drivers/boards/
  227. BOARD ?= GENERIC_STM32_F103
  228. USE_FPU ?= no
  229. # UF2 settings
  230. UF2_FAMILY ?= STM32F1
  231. endif
  232. ifneq ($(findstring STM32F303, $(MCU)),)
  233. # Cortex version
  234. MCU = cortex-m4
  235. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  236. ARMV = 7
  237. ## chip/board settings
  238. # - the next two should match the directories in
  239. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  240. # OR
  241. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  242. MCU_FAMILY = STM32
  243. MCU_SERIES = STM32F3xx
  244. # Linker script to use
  245. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  246. # or <keyboard_dir>/ld/
  247. ifeq ($(strip $(BOOTLOADER)), tinyuf2)
  248. MCU_LDSCRIPT ?= STM32F303xC_tinyuf2
  249. else
  250. MCU_LDSCRIPT ?= STM32F303xC
  251. endif
  252. # Startup code to use
  253. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  254. MCU_STARTUP ?= stm32f3xx
  255. # Board: it should exist either in <chibios>/os/hal/boards/,
  256. # <keyboard_dir>/boards/, or drivers/boards/
  257. BOARD ?= GENERIC_STM32_F303XC
  258. USE_FPU ?= yes
  259. # UF2 settings
  260. UF2_FAMILY ?= STM32F3
  261. # Bootloader address for STM32 DFU
  262. STM32_BOOTLOADER_ADDRESS ?= 0x1FFFD800
  263. endif
  264. ifneq ($(findstring STM32F401, $(MCU)),)
  265. # Cortex version
  266. MCU = cortex-m4
  267. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  268. ARMV = 7
  269. ## chip/board settings
  270. # - the next two should match the directories in
  271. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  272. # OR
  273. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  274. MCU_FAMILY = STM32
  275. MCU_SERIES = STM32F4xx
  276. # Linker script to use
  277. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  278. # or <keyboard_dir>/ld/
  279. ifeq ($(strip $(BOOTLOADER)), tinyuf2)
  280. MCU_LDSCRIPT ?= STM32F401xC_tinyuf2
  281. else
  282. MCU_LDSCRIPT ?= STM32F401xC
  283. endif
  284. # Startup code to use
  285. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  286. MCU_STARTUP ?= stm32f4xx
  287. # Board: it should exist either in <chibios>/os/hal/boards/,
  288. # <keyboard_dir>/boards/, or drivers/boards/
  289. BOARD ?= GENERIC_STM32_F401XC
  290. USE_FPU ?= yes
  291. # UF2 settings
  292. UF2_FAMILY ?= STM32F4
  293. # Bootloader address for STM32 DFU
  294. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  295. # Revert to legacy wear-leveling driver until ChibiOS's EFL driver is fixed with 128kB and 384kB variants.
  296. EEPROM_DRIVER ?= wear_leveling
  297. WEAR_LEVELING_DRIVER ?= legacy
  298. endif
  299. ifneq ($(findstring STM32F405, $(MCU)),)
  300. # Cortex version
  301. MCU = cortex-m4
  302. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  303. ARMV = 7
  304. ## chip/board settings
  305. # - the next two should match the directories in
  306. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  307. # OR
  308. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  309. MCU_FAMILY = STM32
  310. MCU_SERIES = STM32F4xx
  311. # Linker script to use
  312. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  313. # or <keyboard_dir>/ld/
  314. MCU_LDSCRIPT ?= STM32F405xG
  315. # Startup code to use
  316. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  317. MCU_STARTUP ?= stm32f4xx
  318. # Board: it should exist either in <chibios>/os/hal/boards/,
  319. # <keyboard_dir>/boards/, or drivers/boards/
  320. BOARD ?= GENERIC_STM32_F405XG
  321. USE_FPU ?= yes
  322. # UF2 settings
  323. UF2_FAMILY ?= STM32F4
  324. # Bootloader address for STM32 DFU
  325. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  326. endif
  327. ifneq ($(findstring STM32F407, $(MCU)),)
  328. # Cortex version
  329. MCU = cortex-m4
  330. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  331. ARMV = 7
  332. ## chip/board settings
  333. # - the next two should match the directories in
  334. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  335. # OR
  336. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  337. MCU_FAMILY = STM32
  338. MCU_SERIES = STM32F4xx
  339. # Linker script to use
  340. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  341. # or <keyboard_dir>/ld/
  342. MCU_LDSCRIPT ?= STM32F407xE
  343. # Startup code to use
  344. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  345. MCU_STARTUP ?= stm32f4xx
  346. # Board: it should exist either in <chibios>/os/hal/boards/,
  347. # <keyboard_dir>/boards/, or drivers/boards/
  348. BOARD ?= GENERIC_STM32_F407XE
  349. USE_FPU ?= yes
  350. # UF2 settings
  351. UF2_FAMILY ?= STM32F4
  352. # Bootloader address for STM32 DFU
  353. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  354. endif
  355. ifneq ($(findstring STM32F411, $(MCU)),)
  356. # Cortex version
  357. MCU = cortex-m4
  358. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  359. ARMV = 7
  360. ## chip/board settings
  361. # - the next two should match the directories in
  362. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  363. # OR
  364. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  365. MCU_FAMILY = STM32
  366. MCU_SERIES = STM32F4xx
  367. # Linker script to use
  368. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  369. # or <keyboard_dir>/ld/
  370. ifeq ($(strip $(BOOTLOADER)), tinyuf2)
  371. MCU_LDSCRIPT ?= STM32F411xE_tinyuf2
  372. else
  373. MCU_LDSCRIPT ?= STM32F411xE
  374. endif
  375. # Startup code to use
  376. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  377. MCU_STARTUP ?= stm32f4xx
  378. # Board: it should exist either in <chibios>/os/hal/boards/,
  379. # <keyboard_dir>/boards/, or drivers/boards/
  380. BOARD ?= GENERIC_STM32_F411XE
  381. USE_FPU ?= yes
  382. # UF2 settings
  383. UF2_FAMILY ?= STM32F4
  384. # Bootloader address for STM32 DFU
  385. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  386. endif
  387. ifneq ($(findstring STM32F446, $(MCU)),)
  388. # Cortex version
  389. MCU = cortex-m4
  390. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  391. ARMV = 7
  392. ## chip/board settings
  393. # - the next two should match the directories in
  394. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  395. # OR
  396. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  397. MCU_FAMILY = STM32
  398. MCU_SERIES = STM32F4xx
  399. # Linker script to use
  400. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  401. # or <keyboard_dir>/ld/
  402. MCU_LDSCRIPT ?= STM32F446xE
  403. # Startup code to use
  404. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  405. MCU_STARTUP ?= stm32f4xx
  406. # Board: it should exist either in <chibios>/os/hal/boards/,
  407. # <keyboard_dir>/boards/, or drivers/boards/
  408. BOARD ?= GENERIC_STM32_F446XE
  409. USE_FPU ?= yes
  410. # Bootloader address for STM32 DFU
  411. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  412. # Default as no chibios efl config
  413. EEPROM_DRIVER ?= transient
  414. endif
  415. ifneq ($(findstring STM32G431, $(MCU)),)
  416. # Cortex version
  417. MCU = cortex-m4
  418. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  419. ARMV = 7
  420. ## chip/board settings
  421. # - the next two should match the directories in
  422. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  423. # OR
  424. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  425. MCU_FAMILY = STM32
  426. MCU_SERIES = STM32G4xx
  427. # Linker script to use
  428. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  429. # or <keyboard_dir>/ld/
  430. MCU_LDSCRIPT ?= STM32G431xB
  431. # Startup code to use
  432. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  433. MCU_STARTUP ?= stm32g4xx
  434. # Board: it should exist either in <chibios>/os/hal/boards/,
  435. # <keyboard_dir>/boards/, or drivers/boards/
  436. BOARD ?= GENERIC_STM32_G431XB
  437. USE_FPU ?= yes
  438. # UF2 settings
  439. UF2_FAMILY ?= STM32G4
  440. # Bootloader address for STM32 DFU
  441. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  442. endif
  443. ifneq ($(findstring STM32G474, $(MCU)),)
  444. # Cortex version
  445. MCU = cortex-m4
  446. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  447. ARMV = 7
  448. ## chip/board settings
  449. # - the next two should match the directories in
  450. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  451. # OR
  452. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  453. MCU_FAMILY = STM32
  454. MCU_SERIES = STM32G4xx
  455. # Linker script to use
  456. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  457. # or <keyboard_dir>/ld/
  458. MCU_LDSCRIPT ?= STM32G474xE
  459. # Startup code to use
  460. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  461. MCU_STARTUP ?= stm32g4xx
  462. # Board: it should exist either in <chibios>/os/hal/boards/,
  463. # <keyboard_dir>/boards/, or drivers/boards/
  464. BOARD ?= GENERIC_STM32_G474XE
  465. USE_FPU ?= yes
  466. # UF2 settings
  467. UF2_FAMILY ?= STM32G4
  468. # Bootloader address for STM32 DFU
  469. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  470. endif
  471. ifneq (,$(filter $(MCU),STM32L432 STM32L442))
  472. # Cortex version
  473. MCU = cortex-m4
  474. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  475. ARMV = 7
  476. ## chip/board settings
  477. # - the next two should match the directories in
  478. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  479. # OR
  480. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  481. MCU_FAMILY = STM32
  482. MCU_SERIES = STM32L4xx
  483. # Linker script to use
  484. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  485. # or <keyboard_dir>/ld/
  486. MCU_LDSCRIPT ?= STM32L432xC
  487. # Startup code to use
  488. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  489. MCU_STARTUP ?= stm32l4xx
  490. # Board: it should exist either in <chibios>/os/hal/boards/,
  491. # <keyboard_dir>/boards/, or drivers/boards/
  492. BOARD ?= GENERIC_STM32_L432XC
  493. PLATFORM_NAME ?= platform_l432
  494. USE_FPU ?= yes
  495. # UF2 settings
  496. UF2_FAMILY ?= STM32L4
  497. # Bootloader address for STM32 DFU
  498. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  499. endif
  500. ifneq (,$(filter $(MCU),STM32L433 STM32L443))
  501. # Cortex version
  502. MCU = cortex-m4
  503. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  504. ARMV = 7
  505. ## chip/board settings
  506. # - the next two should match the directories in
  507. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  508. # OR
  509. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  510. MCU_FAMILY = STM32
  511. MCU_SERIES = STM32L4xx
  512. # Linker script to use
  513. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  514. # or <keyboard_dir>/ld/
  515. MCU_LDSCRIPT ?= STM32L432xC
  516. # Startup code to use
  517. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  518. MCU_STARTUP ?= stm32l4xx
  519. # Board: it should exist either in <chibios>/os/hal/boards/,
  520. # <keyboard_dir>/boards/, or drivers/boards/
  521. BOARD ?= GENERIC_STM32_L433XC
  522. PLATFORM_NAME ?= platform_l432
  523. USE_FPU ?= yes
  524. # UF2 settings
  525. UF2_FAMILY ?= STM32L4
  526. # Bootloader address for STM32 DFU
  527. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  528. endif
  529. ifneq (,$(filter $(MCU),STM32L412 STM32L422))
  530. # Cortex version
  531. MCU = cortex-m4
  532. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  533. ARMV = 7
  534. ## chip/board settings
  535. # - the next two should match the directories in
  536. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  537. # OR
  538. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  539. MCU_FAMILY = STM32
  540. MCU_SERIES = STM32L4xx
  541. # Linker script to use
  542. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  543. # or <keyboard_dir>/ld/
  544. MCU_LDSCRIPT ?= STM32L412xB
  545. # Startup code to use
  546. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  547. MCU_STARTUP ?= stm32l4xx
  548. # Board: it should exist either in <chibios>/os/hal/boards/,
  549. # <keyboard_dir>/boards/, or drivers/boards/
  550. BOARD ?= GENERIC_STM32_L412XB
  551. PLATFORM_NAME ?= platform_l412_l422
  552. USE_FPU ?= yes
  553. # UF2 settings
  554. UF2_FAMILY ?= STM32L4
  555. # Bootloader address for STM32 DFU
  556. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  557. endif
  558. ifneq ($(findstring WB32F3G71, $(MCU)),)
  559. # Cortex version
  560. MCU = cortex-m3
  561. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  562. ARMV = 7
  563. ## chip/board settings
  564. # - the next two should match the directories in
  565. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  566. # OR
  567. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  568. MCU_FAMILY = WB32
  569. MCU_SERIES = WB32F3G71xx
  570. # Linker script to use
  571. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  572. # or <keyboard_dir>/ld/
  573. MCU_LDSCRIPT ?= WB32F3G71x9
  574. # Startup code to use
  575. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  576. MCU_STARTUP ?= wb32f3g71xx
  577. # Board: it should exist either in <chibios>/os/hal/boards/,
  578. # <keyboard_dir>/boards/, or drivers/boards/
  579. BOARD ?= GENERIC_WB32_F3G71XX
  580. USE_FPU ?= no
  581. # Bootloader address for WB32 DFU
  582. WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
  583. endif
  584. ifneq ($(findstring WB32FQ95, $(MCU)),)
  585. # Cortex version
  586. MCU = cortex-m3
  587. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  588. ARMV = 7
  589. ## chip/board settings
  590. # - the next two should match the directories in
  591. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  592. # OR
  593. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  594. MCU_FAMILY = WB32
  595. MCU_SERIES = WB32FQ95xx
  596. # Linker script to use
  597. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  598. # or <keyboard_dir>/ld/
  599. MCU_LDSCRIPT ?= WB32FQ95xB
  600. # Startup code to use
  601. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  602. MCU_STARTUP ?= wb32fq95xx
  603. # Board: it should exist either in <chibios>/os/hal/boards/,
  604. # <keyboard_dir>/boards/, or drivers/boards/
  605. BOARD ?= GENERIC_WB32_FQ95XX
  606. USE_FPU ?= no
  607. # Bootloader address for WB32 DFU
  608. WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
  609. endif
  610. ifneq ($(findstring GD32VF103, $(MCU)),)
  611. # RISC-V
  612. MCU = risc-v
  613. # RISC-V extensions and abi configuration
  614. MCU_ARCH = rv32imac
  615. MCU_ABI = ilp32
  616. MCU_CMODEL = medlow
  617. ## chip/board settings
  618. # - the next two should match the directories in
  619. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  620. # OR
  621. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  622. MCU_PORT_NAME = GD
  623. MCU_FAMILY = GD32V
  624. MCU_SERIES = GD32VF103
  625. # Linker script to use
  626. # - it should exist either in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/ld/
  627. # or <keyboard_dir>/ld/
  628. MCU_LDSCRIPT ?= GD32VF103xB
  629. # Startup code to use
  630. # - it should exist in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/mk/
  631. MCU_STARTUP ?= gd32vf103
  632. # Board: it should exist either in <chibios>/os/hal/boards/,
  633. # <keyboard_dir>/boards/, or drivers/boards/
  634. BOARD ?= SIPEED_LONGAN_NANO
  635. USE_FPU ?= no
  636. endif