mcu_selection.mk 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  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 STM32G431, $(MCU)),)
  397. # Cortex version
  398. MCU = cortex-m4
  399. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  400. ARMV = 7
  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 = STM32G4xx
  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 ?= STM32G431xB
  412. # Startup code to use
  413. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  414. MCU_STARTUP ?= stm32g4xx
  415. # Board: it should exist either in <chibios>/os/hal/boards/,
  416. # <keyboard_dir>/boards/, or drivers/boards/
  417. BOARD ?= GENERIC_STM32_G431XB
  418. USE_FPU ?= yes
  419. # UF2 settings
  420. UF2_FAMILY ?= STM32G4
  421. # Bootloader address for STM32 DFU
  422. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  423. endif
  424. ifneq ($(findstring STM32G474, $(MCU)),)
  425. # Cortex version
  426. MCU = cortex-m4
  427. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  428. ARMV = 7
  429. ## chip/board settings
  430. # - the next two should match the directories in
  431. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  432. # OR
  433. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  434. MCU_FAMILY = STM32
  435. MCU_SERIES = STM32G4xx
  436. # Linker script to use
  437. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  438. # or <keyboard_dir>/ld/
  439. MCU_LDSCRIPT ?= STM32G474xE
  440. # Startup code to use
  441. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  442. MCU_STARTUP ?= stm32g4xx
  443. # Board: it should exist either in <chibios>/os/hal/boards/,
  444. # <keyboard_dir>/boards/, or drivers/boards/
  445. BOARD ?= GENERIC_STM32_G474XE
  446. USE_FPU ?= yes
  447. # UF2 settings
  448. UF2_FAMILY ?= STM32G4
  449. # Bootloader address for STM32 DFU
  450. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  451. endif
  452. ifneq (,$(filter $(MCU),STM32L432 STM32L442))
  453. # Cortex version
  454. MCU = cortex-m4
  455. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  456. ARMV = 7
  457. ## chip/board settings
  458. # - the next two should match the directories in
  459. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  460. # OR
  461. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  462. MCU_FAMILY = STM32
  463. MCU_SERIES = STM32L4xx
  464. # Linker script to use
  465. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  466. # or <keyboard_dir>/ld/
  467. MCU_LDSCRIPT ?= STM32L432xC
  468. # Startup code to use
  469. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  470. MCU_STARTUP ?= stm32l4xx
  471. # Board: it should exist either in <chibios>/os/hal/boards/,
  472. # <keyboard_dir>/boards/, or drivers/boards/
  473. BOARD ?= GENERIC_STM32_L432XC
  474. PLATFORM_NAME ?= platform_l432
  475. USE_FPU ?= yes
  476. # UF2 settings
  477. UF2_FAMILY ?= STM32L4
  478. # Bootloader address for STM32 DFU
  479. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  480. endif
  481. ifneq (,$(filter $(MCU),STM32L433 STM32L443))
  482. # Cortex version
  483. MCU = cortex-m4
  484. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  485. ARMV = 7
  486. ## chip/board settings
  487. # - the next two should match the directories in
  488. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  489. # OR
  490. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  491. MCU_FAMILY = STM32
  492. MCU_SERIES = STM32L4xx
  493. # Linker script to use
  494. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  495. # or <keyboard_dir>/ld/
  496. MCU_LDSCRIPT ?= STM32L432xC
  497. # Startup code to use
  498. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  499. MCU_STARTUP ?= stm32l4xx
  500. # Board: it should exist either in <chibios>/os/hal/boards/,
  501. # <keyboard_dir>/boards/, or drivers/boards/
  502. BOARD ?= GENERIC_STM32_L433XC
  503. PLATFORM_NAME ?= platform_l432
  504. USE_FPU ?= yes
  505. # UF2 settings
  506. UF2_FAMILY ?= STM32L4
  507. # Bootloader address for STM32 DFU
  508. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  509. endif
  510. ifneq (,$(filter $(MCU),STM32L412 STM32L422))
  511. # Cortex version
  512. MCU = cortex-m4
  513. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  514. ARMV = 7
  515. ## chip/board settings
  516. # - the next two should match the directories in
  517. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  518. # OR
  519. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  520. MCU_FAMILY = STM32
  521. MCU_SERIES = STM32L4xx
  522. # Linker script to use
  523. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  524. # or <keyboard_dir>/ld/
  525. MCU_LDSCRIPT ?= STM32L412xB
  526. # Startup code to use
  527. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  528. MCU_STARTUP ?= stm32l4xx
  529. # Board: it should exist either in <chibios>/os/hal/boards/,
  530. # <keyboard_dir>/boards/, or drivers/boards/
  531. BOARD ?= GENERIC_STM32_L412XB
  532. PLATFORM_NAME ?= platform_l412_l422
  533. USE_FPU ?= yes
  534. # UF2 settings
  535. UF2_FAMILY ?= STM32L4
  536. # Bootloader address for STM32 DFU
  537. STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
  538. endif
  539. ifneq (,$(filter $(MCU),STM32H723 STM32H733))
  540. # Cortex version
  541. MCU = cortex-m7
  542. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  543. ARMV = 7
  544. ## chip/board settings
  545. # - the next two should match the directories in
  546. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  547. # OR
  548. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  549. MCU_FAMILY = STM32
  550. MCU_SERIES = STM32H7xx
  551. # Linker script to use
  552. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  553. # or <keyboard_dir>/ld/
  554. MCU_LDSCRIPT ?= STM32H723xG_ITCM64k
  555. # Startup code to use
  556. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  557. MCU_STARTUP ?= stm32h7xx
  558. # Board: it should exist either in <chibios>/os/hal/boards/,
  559. # <keyboard_dir>/boards/, or drivers/boards/
  560. BOARD ?= GENERIC_STM32_H723XG
  561. PLATFORM_NAME ?= platform_type2
  562. USE_FPU ?= yes
  563. # UF2 settings
  564. UF2_FAMILY ?= STM32H7
  565. # Bootloader address for STM32 DFU
  566. STM32_BOOTLOADER_ADDRESS ?= 0x1FF09800
  567. endif
  568. ifneq ($(findstring WB32F3G71, $(MCU)),)
  569. # Cortex version
  570. MCU = cortex-m3
  571. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  572. ARMV = 7
  573. ## chip/board settings
  574. # - the next two should match the directories in
  575. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  576. # OR
  577. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  578. MCU_FAMILY = WB32
  579. MCU_SERIES = WB32F3G71xx
  580. # Linker script to use
  581. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  582. # or <keyboard_dir>/ld/
  583. MCU_LDSCRIPT ?= WB32F3G71x9
  584. # Startup code to use
  585. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  586. MCU_STARTUP ?= wb32f3g71xx
  587. # Board: it should exist either in <chibios>/os/hal/boards/,
  588. # <keyboard_dir>/boards/, or drivers/boards/
  589. BOARD ?= GENERIC_WB32_F3G71XX
  590. USE_FPU ?= no
  591. # Bootloader address for WB32 DFU
  592. WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
  593. endif
  594. ifneq ($(findstring WB32FQ95, $(MCU)),)
  595. # Cortex version
  596. MCU = cortex-m3
  597. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  598. ARMV = 7
  599. ## chip/board settings
  600. # - the next two should match the directories in
  601. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  602. # OR
  603. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  604. MCU_FAMILY = WB32
  605. MCU_SERIES = WB32FQ95xx
  606. # Linker script to use
  607. # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
  608. # or <keyboard_dir>/ld/
  609. MCU_LDSCRIPT ?= WB32FQ95xB
  610. # Startup code to use
  611. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  612. MCU_STARTUP ?= wb32fq95xx
  613. # Board: it should exist either in <chibios>/os/hal/boards/,
  614. # <keyboard_dir>/boards/, or drivers/boards/
  615. BOARD ?= GENERIC_WB32_FQ95XX
  616. USE_FPU ?= no
  617. # Bootloader address for WB32 DFU
  618. WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
  619. endif
  620. ifneq ($(findstring AT32F415, $(MCU)),)
  621. # Cortex version
  622. MCU = cortex-m4
  623. # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
  624. ARMV = 7
  625. ## chip/board settings
  626. # - the next two should match the directories in
  627. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  628. # OR
  629. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  630. MCU_FAMILY = AT32
  631. MCU_SERIES = AT32F415
  632. # Linker script to use
  633. # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
  634. # or <keyboard_dir>/ld/
  635. MCU_LDSCRIPT ?= AT32F415xB
  636. # Startup code to use
  637. # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
  638. MCU_STARTUP ?= at32f415
  639. # Board: it should exist either in <chibios>/os/hal/boards/,
  640. # <keyboard_dir>/boards/, or drivers/boards/
  641. BOARD ?= GENERIC_AT32_F415XX
  642. USE_FPU ?= no
  643. # Bootloader address for AT32 DFU
  644. AT32_BOOTLOADER_ADDRESS ?= 0x1FFFAC00
  645. endif
  646. ifneq ($(findstring GD32VF103, $(MCU)),)
  647. # RISC-V
  648. MCU = risc-v
  649. # RISC-V extensions and abi configuration
  650. MCU_ARCH = rv32imac
  651. MCU_ABI = ilp32
  652. MCU_CMODEL = medlow
  653. ## chip/board settings
  654. # - the next two should match the directories in
  655. # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
  656. # OR
  657. # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
  658. MCU_PORT_NAME = GD
  659. MCU_FAMILY = GD32V
  660. MCU_SERIES = GD32VF103
  661. # Linker script to use
  662. # - it should exist either in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/ld/
  663. # or <keyboard_dir>/ld/
  664. MCU_LDSCRIPT ?= GD32VF103xB
  665. # Startup code to use
  666. # - it should exist in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/mk/
  667. MCU_STARTUP ?= gd32vf103
  668. # Board: it should exist either in <chibios>/os/hal/boards/,
  669. # <keyboard_dir>/boards/, or drivers/boards/
  670. BOARD ?= SIPEED_LONGAN_NANO
  671. USE_FPU ?= no
  672. endif