My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

stm32f4.ini 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. #################################
  6. #
  7. # STM32F4 Architecture
  8. #
  9. # Naming Example: STM32F401RGT6
  10. #
  11. # F : Foundation (sometimes High Performance F2/F4)
  12. # 4 : Cortex M4 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
  13. # 01 : Line/Features
  14. # R : 64 or 66 pins (T:36, C:48 or 49, M:81, V:100, Z:144, I:176)
  15. # G : 1024KB Flash-memory (B:128KB, C:256KB, D:384KB, E:512KB)
  16. # T : LQFP package
  17. # 6 : -40...85°C (7: ...105°C)
  18. #
  19. #################################
  20. #
  21. # ARMED (STM32)
  22. #
  23. [env:ARMED]
  24. extends = common_stm32
  25. board = armed_v1
  26. build_flags = ${common_stm32.build_flags}
  27. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
  28. #
  29. # STM32F401RC
  30. #
  31. [env:FYSETC_CHEETAH_V20]
  32. extends = stm32_variant
  33. board = marlin_FYSETC_CHEETAH_V20
  34. board_build.offset = 0x8000
  35. build_flags = ${stm32_variant.build_flags} -DSTM32F401xC
  36. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  37. #
  38. # FLYF407ZG
  39. #
  40. [env:FLYF407ZG]
  41. extends = stm32_variant
  42. board = marlin_STM32F407ZGT6
  43. board_build.variant = MARLIN_FLY_F407ZG
  44. board_build.offset = 0x8000
  45. upload_protocol = dfu
  46. #
  47. # FYSETC S6 (STM32F446RET6 ARM Cortex-M4)
  48. #
  49. [env:FYSETC_S6]
  50. extends = stm32_variant
  51. board = marlin_fysetc_s6
  52. board_build.offset = 0x10000
  53. board_upload.offset_address = 0x08010000
  54. build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED
  55. debug_tool = stlink
  56. upload_protocol = dfu
  57. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  58. #
  59. # FYSETC S6 new bootloader
  60. #
  61. [env:FYSETC_S6_8000]
  62. extends = env:FYSETC_S6
  63. board = marlin_fysetc_s6
  64. board_build.offset = 0x8000
  65. board_upload.offset_address = 0x08008000
  66. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  67. #
  68. # FYSETC SPIDER KING407 (STM32F407ZGT6 ARM Cortex-M4)
  69. #
  70. [env:FYSETC_SPIDER_KING407]
  71. extends = stm32_variant
  72. board = marlin_STM32F407ZGT6
  73. board_build.variant = MARLIN_FYSETC_SPIDER_KING407
  74. board_build.offset = 0x8000
  75. upload_protocol = dfu
  76. #
  77. # STM32F407VET6 with RAMPS-like shield
  78. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  79. # Shield - https://github.com/jmz52/Hardware
  80. #
  81. [env:STM32F407VE_black]
  82. extends = stm32_variant
  83. board = marlin_blackSTM32F407VET6
  84. build_flags = ${stm32_variant.build_flags}
  85. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  86. #
  87. # STM32F407VET6 Opulo Lumen REV3
  88. #
  89. [env:Opulo_Lumen_REV3]
  90. extends = stm32_variant
  91. board = marlin_opulo_lumen_rev3
  92. build_flags = ${stm32_variant.build_flags}
  93. -DARDUINO_BLACK_F407VE
  94. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  95. extra_scripts = ${stm32_variant.extra_scripts}
  96. #
  97. # STM32F407VET6 Opulo Lumen REV4
  98. #
  99. [env:Opulo_Lumen_REV4]
  100. extends = stm32_variant
  101. board = marlin_opulo_lumen_rev4
  102. build_flags = ${stm32_variant.build_flags}
  103. -DARDUINO_BLACK_F407VE
  104. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  105. extra_scripts = ${stm32_variant.extra_scripts}
  106. #
  107. # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
  108. #
  109. [Anet_ET4]
  110. extends = stm32_variant
  111. board = marlin_STM32F407VGT6_CCM
  112. board_build.variant = MARLIN_F4x7Vx
  113. build_flags = ${stm32_variant.build_flags}
  114. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  115. build_unflags = ${stm32_variant.build_unflags}
  116. -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  117. #
  118. # Anet ET4 directly flashed via ST-Link
  119. #
  120. [env:Anet_ET4_no_bootloader]
  121. extends = Anet_ET4
  122. debug_tool = stlink
  123. upload_protocol = stlink
  124. #
  125. # Anet ET4 with OpenBLT from https://github.com/davidtgbe/openblt/releases
  126. #
  127. [env:Anet_ET4_OpenBLT]
  128. extends = Anet_ET4
  129. board_build.encode = firmware.srec
  130. board_build.offset = 0x10000
  131. board_upload.offset_address = 0x08010000
  132. extra_scripts = ${stm32_variant.extra_scripts}
  133. buildroot/share/PlatformIO/scripts/openblt.py
  134. #
  135. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  136. #
  137. [env:BIGTREE_SKR_PRO]
  138. extends = stm32_variant
  139. board = marlin_BigTree_SKR_Pro
  140. board_build.offset = 0x8000
  141. build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX
  142. debug_tool = stlink
  143. upload_protocol = stlink
  144. #
  145. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  146. #
  147. [env:BIGTREE_SKR_PRO_usb_flash_drive]
  148. extends = env:BIGTREE_SKR_PRO
  149. platform_packages = ${stm_flash_drive.platform_packages}
  150. build_flags = ${stm_flash_drive.build_flags} -DSTM32F407_5ZX
  151. build_unflags = ${env:BIGTREE_SKR_PRO.build_unflags} -DUSBCON -DUSBD_USE_CDC
  152. #
  153. # BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4)
  154. #
  155. [env:BIGTREE_E3_RRF]
  156. extends = stm32_variant
  157. board = marlin_STM32F407VGT6_CCM
  158. board_build.variant = MARLIN_BIGTREE_E3_RRF
  159. board_build.offset = 0x8000
  160. build_flags = ${stm32_variant.build_flags}
  161. -DSTM32F407_5VX
  162. -DMF_RX_BUFFER_SIZE=255
  163. -DMF_TX_BUFFER_SIZE=255
  164. #
  165. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  166. #
  167. [env:BIGTREE_GTR_V1_0]
  168. extends = stm32_variant
  169. board = marlin_BigTree_GTR_v1
  170. board_build.offset = 0x8000
  171. build_flags = ${stm32_variant.build_flags} -DSTM32F407IX
  172. #
  173. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support
  174. #
  175. [env:BIGTREE_GTR_V1_0_usb_flash_drive]
  176. extends = env:BIGTREE_GTR_V1_0
  177. platform_packages = ${stm_flash_drive.platform_packages}
  178. build_flags = ${stm_flash_drive.build_flags} -DSTM32F407IX
  179. build_unflags = ${env:BIGTREE_GTR_V1_0.build_unflags} -DUSBCON -DUSBD_USE_CDC
  180. #
  181. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  182. #
  183. [env:BIGTREE_BTT002]
  184. extends = stm32_variant
  185. board = marlin_BigTree_BTT002
  186. board_build.offset = 0x8000
  187. build_flags = ${stm32_variant.build_flags}
  188. -DSTM32F407_5VX
  189. -DHAVE_HWSERIAL2
  190. -DHAVE_HWSERIAL3
  191. -DPIN_SERIAL2_RX=PD_6
  192. -DPIN_SERIAL2_TX=PD_5
  193. #
  194. # BigTreeTech BTT002 V1.x with 512k of flash (STM32F407VET6 ARM Cortex-M4)
  195. #
  196. [env:BIGTREE_BTT002_VET6]
  197. extends = env:BIGTREE_BTT002
  198. board = marlin_BigTree_BTT002_VET6
  199. #
  200. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support
  201. #
  202. [env:BIGTREE_SKR_2]
  203. extends = stm32_variant
  204. platform_packages = ${stm_flash_drive.platform_packages}
  205. board = marlin_STM32F407VGT6_CCM
  206. board_build.variant = MARLIN_F4x7Vx
  207. board_build.offset = 0x8000
  208. board_upload.offset_address = 0x08008000
  209. build_flags = ${stm_flash_drive.build_flags}
  210. -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS
  211. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  212. -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
  213. -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8
  214. upload_protocol = stlink
  215. #
  216. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support
  217. #
  218. [env:BIGTREE_SKR_2_USB]
  219. extends = env:BIGTREE_SKR_2
  220. build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC
  221. build_unflags = ${env:BIGTREE_SKR_2.build_unflags} -DUSBD_USE_CDC
  222. [env:BIGTREE_SKR_2_USB_debug]
  223. extends = env:BIGTREE_SKR_2_USB
  224. build_flags = ${env:BIGTREE_SKR_2_USB.build_flags} -O0
  225. build_unflags = ${env:BIGTREE_SKR_2_USB.build_unflags} -Os -NDEBUG
  226. #
  227. # Bigtreetech SKR V2.0 F429 (STM32F429VGT6 ARM Cortex-M4) with USB Flash Drive Support
  228. #
  229. [env:BIGTREE_SKR_2_F429]
  230. extends = env:BIGTREE_SKR_2
  231. board = marlin_STM32F429VGT6
  232. #
  233. # BigTreeTech SKR V2.0 F429 (STM32F429VGT6 ARM Cortex-M4) with USB Media Share Support
  234. #
  235. [env:BIGTREE_SKR_2_F429_USB]
  236. extends = env:BIGTREE_SKR_2_F429
  237. build_flags = ${env:BIGTREE_SKR_2_F429.build_flags} -DUSBD_USE_CDC_MSC
  238. build_unflags = ${env:BIGTREE_SKR_2_F429.build_unflags} -DUSBD_USE_CDC
  239. [env:BIGTREE_SKR_2_F429_USB_debug]
  240. extends = env:BIGTREE_SKR_2_F429_USB
  241. build_flags = ${env:BIGTREE_SKR_2_F429_USB.build_flags} -O0
  242. build_unflags = ${env:BIGTREE_SKR_2_F429_USB.build_unflags} -Os -NDEBUG
  243. #
  244. # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4)
  245. #
  246. [env:BIGTREE_OCTOPUS_V1]
  247. extends = stm32_variant
  248. board = marlin_BigTree_Octopus_v1
  249. board_build.offset = 0x8000
  250. board_upload.offset_address = 0x08008000
  251. debug_tool = stlink
  252. upload_protocol = stlink
  253. build_flags = ${stm32_variant.build_flags}
  254. -DSTM32F446_5VX -DUSE_USB_HS_IN_FS
  255. #
  256. # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
  257. #
  258. [env:BIGTREE_OCTOPUS_V1_USB]
  259. extends = env:BIGTREE_OCTOPUS_V1
  260. platform_packages = ${stm_flash_drive.platform_packages}
  261. build_unflags = -DUSBD_USE_CDC
  262. build_flags = ${stm_flash_drive.build_flags}
  263. -DSTM32F446_5VX -DUSE_USB_HS_IN_FS
  264. -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5
  265. -DUSBD_IRQ_SUBPRIO=6
  266. -DUSBD_USE_CDC_MSC
  267. #
  268. # BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4)
  269. #
  270. [env:BIGTREE_OCTOPUS_PRO_V1_F429]
  271. extends = stm32_variant
  272. board = marlin_BigTree_Octopus_Pro_v1_F429
  273. board_build.offset = 0x8000
  274. board_upload.offset_address = 0x08008000
  275. debug_tool = stlink
  276. upload_protocol = stlink
  277. build_flags = ${stm32_variant.build_flags}
  278. -DUSE_USB_HS_IN_FS
  279. #
  280. # BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  281. #
  282. [env:BIGTREE_OCTOPUS_PRO_V1_F429_USB]
  283. extends = env:BIGTREE_OCTOPUS_PRO_V1_F429
  284. platform_packages = ${stm_flash_drive.platform_packages}
  285. build_unflags = -DUSBD_USE_CDC
  286. build_flags = ${stm_flash_drive.build_flags}
  287. -DUSE_USB_HS_IN_FS -DUSE_USBHOST_HS
  288. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  289. -DUSBD_USE_CDC_MSC
  290. #
  291. # Lerdge base
  292. #
  293. [lerdge_common]
  294. extends = stm32_variant
  295. board = marlin_STM32F407ZGT6
  296. board_build.variant = MARLIN_LERDGE
  297. board_build.crypt_lerdge = firmware.bin
  298. board_build.offset = 0x10000
  299. build_flags = ${stm32_variant.build_flags}
  300. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  301. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DLERDGE_TFT35
  302. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  303. extra_scripts = ${stm32_variant.extra_scripts}
  304. buildroot/share/PlatformIO/scripts/lerdge.py
  305. #
  306. # Lerdge X (STM32F407VE)
  307. #
  308. [env:LERDGEX]
  309. extends = lerdge_common
  310. board_build.crypt_lerdge = Lerdge_X_firmware_force.bin
  311. #
  312. # Lerdge X with USB Flash Drive Support
  313. #
  314. [env:LERDGEX_usb_flash_drive]
  315. extends = env:LERDGEX
  316. platform_packages = ${stm_flash_drive.platform_packages}
  317. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  318. #
  319. # Lerdge S (STM32F407ZG)
  320. #
  321. [env:LERDGES]
  322. extends = lerdge_common
  323. board_build.crypt_lerdge = Lerdge_firmware_force.bin
  324. #
  325. # Lerdge S with USB Flash Drive Support
  326. #
  327. [env:LERDGES_usb_flash_drive]
  328. extends = env:LERDGES
  329. platform_packages = ${stm_flash_drive.platform_packages}
  330. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  331. #
  332. # Lerdge K (STM32F407ZG)
  333. #
  334. [env:LERDGEK]
  335. extends = lerdge_common
  336. board_build.crypt_lerdge = Lerdge_K_firmware_force.bin
  337. build_flags = ${lerdge_common.build_flags} -DLERDGEK
  338. #
  339. # Lerdge K with USB Flash Drive Support
  340. #
  341. [env:LERDGEK_usb_flash_drive]
  342. extends = env:LERDGEK
  343. platform_packages = ${stm_flash_drive.platform_packages}
  344. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  345. #
  346. # RUMBA32
  347. #
  348. [env:rumba32]
  349. extends = stm32_variant
  350. board = rumba32_f446ve
  351. board_build.variant = MARLIN_F446VE
  352. board_build.offset = 0x0000
  353. build_flags = ${stm32_variant.build_flags}
  354. -Os -DHAL_PCD_MODULE_ENABLED
  355. -DDISABLE_GENERIC_SERIALUSB
  356. -DHAL_UART_MODULE_ENABLED
  357. -DTIMER_SERIAL=TIM9
  358. monitor_speed = 500000
  359. upload_protocol = dfu
  360. #
  361. # MKS Robin Pro V2
  362. #
  363. [env:mks_robin_pro2]
  364. extends = stm32_variant
  365. platform_packages = ${stm_flash_drive.platform_packages}
  366. board = genericSTM32F407VET6
  367. board_build.variant = MARLIN_F4x7Vx
  368. board_build.offset = 0x0000
  369. board_upload.offset_address = 0x08000000
  370. build_flags = ${stm_flash_drive.build_flags}
  371. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  372. debug_tool = jlink
  373. upload_protocol = jlink
  374. #
  375. # This I2C1(PB6:I2C1_SCL PB7:I2C1_SDA) is used by Robin Nano V3
  376. #
  377. [stm32f4_I2C1]
  378. build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
  379. #
  380. # MKS Robin Nano V3
  381. #
  382. [env:mks_robin_nano_v3]
  383. extends = stm32_variant
  384. board = marlin_STM32F407VGT6_CCM
  385. board_build.variant = MARLIN_F4x7Vx
  386. board_build.offset = 0xC000
  387. board_upload.offset_address = 0x0800C000
  388. board_build.rename = Robin_nano_v3.bin
  389. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
  390. -DHAL_PCD_MODULE_ENABLED
  391. debug_tool = jlink
  392. upload_protocol = jlink
  393. #
  394. # MKS Robin Nano V3 with USB Flash Drive Support
  395. # Currently, using a STM32duino fork, until USB Host get merged
  396. #
  397. [env:mks_robin_nano_v3_usb_flash_drive]
  398. extends = env:mks_robin_nano_v3
  399. platform_packages = ${stm_flash_drive.platform_packages}
  400. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  401. -DUSE_USBHOST_HS
  402. -DUSBD_IRQ_PRIO=5
  403. -DUSBD_IRQ_SUBPRIO=6
  404. -DUSE_USB_HS_IN_FS
  405. #
  406. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  407. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  408. #
  409. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  410. extends = env:mks_robin_nano_v3_usb_flash_drive
  411. build_flags = ${env:mks_robin_nano_v3_usb_flash_drive.build_flags}
  412. -DUSBD_USE_CDC_MSC
  413. build_unflags = -DUSBD_USE_CDC
  414. #
  415. # MKS Robin Nano V3_1
  416. #
  417. [env:mks_robin_nano_v3_1]
  418. extends = env:mks_robin_nano_v3
  419. board = marlin_STM32F407VET6_CCM
  420. #
  421. # MKS Robin Nano V3.1 with USB Flash Drive Support
  422. # Currently, using a STM32duino fork, until USB Host get merged
  423. #
  424. [env:mks_robin_nano_v3_1_usb_flash_drive]
  425. extends = env:mks_robin_nano_v3_usb_flash_drive
  426. board = marlin_STM32F407VET6_CCM
  427. #
  428. # MKS Robin Nano V3.1 with USB Flash Drive Support and Shared Media
  429. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  430. #
  431. [env:mks_robin_nano_v3_1_usb_flash_drive_msc]
  432. extends = env:mks_robin_nano_v3_usb_flash_drive_msc
  433. board = marlin_STM32F407VET6_CCM
  434. #
  435. # MKS Eagle
  436. # 5 TMC2209 uart mode on board
  437. #
  438. [env:mks_eagle]
  439. extends = stm32_variant
  440. board = marlin_STM32F407VGT6_CCM
  441. board_build.variant = MARLIN_F4x7Vx
  442. board_build.offset = 0xC000
  443. board_upload.offset_address = 0x0800C000
  444. board_build.rename = mks_eagle.bin
  445. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
  446. -DHAL_PCD_MODULE_ENABLED
  447. -DSTM32_FLASH_SIZE=512
  448. debug_tool = jlink
  449. upload_protocol = jlink
  450. #
  451. # MKS Eagle with USB Flash Drive Support
  452. # Currently, using a STM32duino fork, until USB Host get merged
  453. #
  454. [env:mks_eagle_usb_flash_drive]
  455. extends = env:mks_eagle
  456. platform_packages = ${stm_flash_drive.platform_packages}
  457. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  458. -DUSE_USBHOST_HS
  459. -DUSBD_IRQ_PRIO=5
  460. -DUSBD_IRQ_SUBPRIO=6
  461. -DUSE_USB_HS_IN_FS
  462. #
  463. # MKS Eagle with USB Flash Drive Support and Shared Media
  464. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  465. #
  466. [env:mks_eagle_usb_flash_drive_msc]
  467. extends = env:mks_eagle_usb_flash_drive
  468. build_flags = ${env:mks_eagle_usb_flash_drive.build_flags}
  469. -DUSBD_USE_CDC_MSC
  470. build_unflags = -DUSBD_USE_CDC
  471. #
  472. # This I2C1(PB8:I2C1_SCL PB9:I2C1_SDA) is used by MKS Monster8
  473. #
  474. [stm32f4_I2C1_CAN]
  475. build_flags = -DPIN_WIRE_SCL=PB8 -DPIN_WIRE_SDA=PB9
  476. #
  477. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4)
  478. #
  479. [env:mks_monster8]
  480. extends = stm32_variant
  481. board = marlin_STM32F407VGT6_CCM
  482. board_build.variant = MARLIN_F4x7Vx
  483. board_build.offset = 0xC000
  484. board_upload.offset_address = 0x0800C000
  485. board_build.rename = mks_monster8.bin
  486. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1_CAN.build_flags}
  487. -DHAL_PCD_MODULE_ENABLED -DTIMER_SERIAL=TIM4
  488. -DSTM32_FLASH_SIZE=512
  489. debug_tool = jlink
  490. upload_protocol = jlink
  491. #
  492. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4) with USB Flash Drive Support
  493. # Currently, using a STM32duino fork, until USB Host get merged
  494. #
  495. [env:mks_monster8_usb_flash_drive]
  496. extends = env:mks_monster8
  497. platform_packages = ${stm_flash_drive.platform_packages}
  498. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1_CAN.build_flags}
  499. -DUSE_USBHOST_HS
  500. -DUSBD_IRQ_PRIO=5
  501. -DUSBD_IRQ_SUBPRIO=6
  502. -DUSE_USB_HS_IN_FS
  503. #
  504. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4) with USB Flash Drive Support and Shared Media
  505. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  506. #
  507. [env:mks_monster8_usb_flash_drive_msc]
  508. extends = env:mks_monster8_usb_flash_drive
  509. build_flags = ${env:mks_monster8_usb_flash_drive.build_flags}
  510. -DUSBD_USE_CDC_MSC
  511. build_unflags = -DUSBD_USE_CDC
  512. #
  513. # TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
  514. #
  515. [TH3D_EZBoard_V2]
  516. extends = stm32_variant
  517. board = genericSTM32F405RG
  518. board_build.variant = MARLIN_TH3D_EZBOARD_V2
  519. build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0
  520. #
  521. # TH3D EZBoard v2.0 directly flashed via ST-Link
  522. #
  523. [env:TH3D_EZBoard_V2_no_bootloader]
  524. extends = TH3D_EZBoard_V2
  525. debug_tool = stlink
  526. upload_protocol = stlink
  527. #
  528. # TH3D EZBoard v2.0 with OpenBLT from https://github.com/rhapsodyv/OpenBLT-STM32
  529. #
  530. [env:TH3D_EZBoard_V2_OpenBLT]
  531. extends = TH3D_EZBoard_V2
  532. board_build.encode = firmware.bin
  533. board_build.offset = 0xC000
  534. board_upload.offset_address = 0x0800C000
  535. extra_scripts = ${stm32_variant.extra_scripts}
  536. buildroot/share/PlatformIO/scripts/openblt.py
  537. [mks_robin_nano_v1_3_f4_common]
  538. extends = stm32_variant
  539. board = marlin_STM32F407VGT6_CCM
  540. board_build.variant = MARLIN_F4x7Vx
  541. board_build.offset = 0x8000
  542. board_upload.offset_address = 0x08008000
  543. board_build.rename = Robin_nano35.bin
  544. debug_tool = jlink
  545. upload_protocol = jlink
  546. #
  547. # BOARD_MKS_ROBIN_NANO_V1_3_F4
  548. # - MKS Robin Nano V1.3 (STM32F407VET6, 5 Pololu Plug)
  549. # - MKS Robin Nano-S V1.3 (STM32F407VET6, 4 TMC2225, 1 Pololu Plug)
  550. # - ZNP Robin Nano V1.3 (STM32F407VET6, 2 TMC2208, 2 A4988, 1x Polulu plug)
  551. #
  552. [env:mks_robin_nano_v1_3_f4]
  553. extends = mks_robin_nano_v1_3_f4_common
  554. build_flags = ${stm32_variant.build_flags}
  555. -DMCU_STM32F407VE -DENABLE_HWSERIAL3 -DSTM32_FLASH_SIZE=512
  556. -DTIMER_SERVO=TIM2 -DTIMER_TONE=TIM3 -DSS_TIMER=4
  557. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  558. build_unflags = ${stm32_variant.build_unflags}
  559. -DUSBCON -DUSBD_USE_CDC
  560. #
  561. # MKS/ZNP Robin Nano V1.3 with native USB mod
  562. #
  563. [env:mks_robin_nano_v1_3_f4_usbmod]
  564. extends = mks_robin_nano_v1_3_f4_common
  565. build_flags = ${stm32_variant.build_flags}
  566. -DMCU_STM32F407VE -DSTM32_FLASH_SIZE=512
  567. -DTIMER_SERVO=TIM2 -DTIMER_TONE=TIM3 -DSS_TIMER=4
  568. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  569. #
  570. # Artillery Ruby
  571. #
  572. [env:Artillery_Ruby]
  573. extends = common_stm32
  574. board = marlin_Artillery_Ruby
  575. build_flags = ${common_stm32.build_flags}
  576. -DSTM32F401xC -DTARGET_STM32F4 -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32
  577. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  578. -DUSB_PRODUCT=\"Artillery_3D_Printer\"
  579. -DFLASH_DATA_SECTOR=1U -DFLASH_BASE_ADDRESS=0x08004000
  580. extra_scripts = ${common_stm32.extra_scripts}
  581. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  582. #
  583. # Ender-3 S1 STM32F401RC_creality
  584. #
  585. [env:STM32F401RC_creality]
  586. extends = stm32_variant
  587. board = genericSTM32F401RC
  588. board_build.variant = MARLIN_CREALITY_STM32F401RC
  589. board_build.offset = 0x10000
  590. board_upload.offset_address = 0x08010000
  591. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RC -DSTM32F4
  592. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  593. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  594. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  595. extra_scripts = ${stm32_variant.extra_scripts}
  596. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  597. monitor_speed = 115200
  598. [env:STM32F401RC_creality_jlink]
  599. extends = env:STM32F401RC_creality
  600. debug_tool = jlink
  601. upload_protocol = jlink
  602. [env:STM32F401RC_creality_stlink]
  603. extends = env:STM32F401RC_creality
  604. debug_tool = stlink
  605. upload_protocol = stlink
  606. #
  607. # BigTree SKR mini E3 V3.0.1 (STM32F401RCT6 ARM Cortex-M4)
  608. #
  609. [env:STM32F401RC_btt]
  610. extends = stm32_variant
  611. platform = ststm32@~14.1.0
  612. platform_packages = framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/main.zip
  613. board = marlin_STM32F401RC
  614. board_build.offset = 0x4000
  615. board_upload.offset_address = 0x08004000
  616. build_flags = ${stm32_variant.build_flags}
  617. -DPIN_SERIAL6_RX=PC_7 -DPIN_SERIAL6_TX=PC_6
  618. -DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024
  619. -DTIMER_SERVO=TIM3 -DTIMER_TONE=TIM4
  620. -DSTEP_TIMER_IRQ_PRIO=0
  621. upload_protocol = stlink
  622. debug_tool = stlink
  623. #
  624. # MKS SKIPR v1.0 all-in-one board (STM32F407VE)
  625. #
  626. [env:mks_skipr_v1]
  627. extends = stm32_variant
  628. board = marlin_MKS_SKIPR_V1
  629. board_build.rename = mks_skipr.bin
  630. [env:mks_skipr_v1_nobootloader]
  631. extends = env:mks_skipr_v1
  632. board_build.rename = firmware.bin
  633. board_build.offset = 0x0000
  634. board_upload.offset_address = 0x08000000
  635. upload_protocol = dfu
  636. upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE"
  637. #
  638. # STM32F446ZET6 ARM Cortex-M4
  639. #
  640. [env:STM32F446_tronxy]
  641. platform = ${common_stm32.platform}
  642. extends = stm32_variant
  643. board = marlin_STM32F446ZET_tronxy
  644. board_build.offset = 0x10000
  645. board_build.rename = fmw_tronxy.bin
  646. build_src_filter = ${common_stm32.build_src_filter}
  647. build_flags = ${stm32_variant.build_flags}
  648. -DSTM32F4xx
  649. build_unflags = ${stm32_variant.build_unflags} -fno-rtti
  650. -DUSBCON -DUSBD_USE_CDC