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 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  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. # STM32F401VE
  30. # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
  31. #
  32. [env:STM32F401VE_STEVAL]
  33. extends = stm32_variant
  34. board = marlin_STEVAL_STM32F401VE
  35. build_flags = ${stm32_variant.build_flags}
  36. -DSTM32F401xE -DDISABLE_GENERIC_SERIALUSB
  37. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  38. #
  39. # STM32F401RC
  40. #
  41. [env:FYSETC_CHEETAH_V20]
  42. extends = stm32_variant
  43. board = marlin_FYSETC_CHEETAH_V20
  44. board_build.offset = 0x8000
  45. build_flags = ${stm32_variant.build_flags} -DSTM32F401xC
  46. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  47. #
  48. # FLYF407ZG
  49. #
  50. [env:FLYF407ZG]
  51. extends = stm32_variant
  52. board = marlin_STM32F407ZGT6
  53. board_build.variant = MARLIN_FLY_F407ZG
  54. board_build.offset = 0x8000
  55. upload_protocol = dfu
  56. #
  57. # FYSETC S6 (STM32F446RET6 ARM Cortex-M4)
  58. #
  59. [env:FYSETC_S6]
  60. extends = stm32_variant
  61. board = marlin_fysetc_s6
  62. board_build.offset = 0x10000
  63. board_upload.offset_address = 0x08010000
  64. build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED
  65. debug_tool = stlink
  66. upload_protocol = dfu
  67. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  68. #
  69. # FYSETC S6 new bootloader
  70. #
  71. [env:FYSETC_S6_8000]
  72. extends = env:FYSETC_S6
  73. board = marlin_fysetc_s6
  74. board_build.offset = 0x8000
  75. board_upload.offset_address = 0x08008000
  76. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  77. #
  78. # STM32F407VET6 with RAMPS-like shield
  79. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  80. # Shield - https://github.com/jmz52/Hardware
  81. #
  82. [env:STM32F407VE_black]
  83. extends = stm32_variant
  84. board = marlin_blackSTM32F407VET6
  85. build_flags = ${stm32_variant.build_flags}
  86. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  87. #
  88. # STM32F407VET6 Index Mobo Rev 03
  89. #
  90. [env:Index_Mobo_Rev03]
  91. extends = stm32_variant
  92. board = marlin_index_mobo_rev03
  93. build_flags = ${stm32_variant.build_flags}
  94. -DARDUINO_BLACK_F407VE
  95. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  96. extra_scripts = ${stm32_variant.extra_scripts}
  97. #
  98. # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
  99. # For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases
  100. # Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000.
  101. #
  102. [env:Anet_ET4_OpenBLT]
  103. extends = stm32_variant
  104. board = marlin_STM32F407VGT6_CCM
  105. board_build.variant = MARLIN_F4x7Vx
  106. board_build.encrypt_mks = firmware.srec
  107. board_build.offset = 0x10000
  108. board_upload.offset_address = 0x08010000
  109. build_flags = ${stm32_variant.build_flags}
  110. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  111. build_unflags = ${stm32_variant.build_unflags}
  112. -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  113. extra_scripts = ${stm32_variant.extra_scripts}
  114. buildroot/share/PlatformIO/scripts/openblt.py
  115. debug_tool = jlink
  116. upload_protocol = jlink
  117. #
  118. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  119. #
  120. [env:BIGTREE_SKR_PRO]
  121. extends = stm32_variant
  122. board = marlin_BigTree_SKR_Pro
  123. board_build.offset = 0x8000
  124. build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX
  125. debug_tool = stlink
  126. upload_protocol = stlink
  127. #
  128. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  129. #
  130. [env:BIGTREE_SKR_PRO_usb_flash_drive]
  131. extends = env:BIGTREE_SKR_PRO
  132. platform_packages = ${stm_flash_drive.platform_packages}
  133. build_flags = ${stm_flash_drive.build_flags} -DSTM32F407_5ZX
  134. build_unflags = ${env:BIGTREE_SKR_PRO.build_unflags} -DUSBCON -DUSBD_USE_CDC
  135. #
  136. # BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4)
  137. #
  138. [env:BIGTREE_E3_RRF]
  139. extends = stm32_variant
  140. board = marlin_STM32F407VGT6_CCM
  141. board_build.variant = MARLIN_BIGTREE_E3_RRF
  142. board_build.offset = 0x8000
  143. build_flags = ${stm32_variant.build_flags}
  144. -DSTM32F407_5VX
  145. -DMF_RX_BUFFER_SIZE=255
  146. -DMF_TX_BUFFER_SIZE=255
  147. #
  148. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  149. #
  150. [env:BIGTREE_GTR_V1_0]
  151. extends = stm32_variant
  152. board = marlin_BigTree_GTR_v1
  153. board_build.offset = 0x8000
  154. build_flags = ${stm32_variant.build_flags} -DSTM32F407IX
  155. #
  156. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support
  157. #
  158. [env:BIGTREE_GTR_V1_0_usb_flash_drive]
  159. extends = env:BIGTREE_GTR_V1_0
  160. platform_packages = ${stm_flash_drive.platform_packages}
  161. build_flags = ${stm_flash_drive.build_flags} -DSTM32F407IX
  162. build_unflags = ${env:BIGTREE_GTR_V1_0.build_unflags} -DUSBCON -DUSBD_USE_CDC
  163. #
  164. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  165. #
  166. [env:BIGTREE_BTT002]
  167. extends = stm32_variant
  168. board = marlin_BigTree_BTT002
  169. board_build.offset = 0x8000
  170. build_flags = ${stm32_variant.build_flags}
  171. -DSTM32F407_5VX
  172. -DHAVE_HWSERIAL2
  173. -DHAVE_HWSERIAL3
  174. -DPIN_SERIAL2_RX=PD_6
  175. -DPIN_SERIAL2_TX=PD_5
  176. #
  177. # BigTreeTech BTT002 V1.x with 512k of flash (STM32F407VET6 ARM Cortex-M4)
  178. #
  179. [env:BIGTREE_BTT002_VET6]
  180. extends = env:BIGTREE_BTT002
  181. board = marlin_BigTree_BTT002_VET6
  182. #
  183. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support
  184. #
  185. [env:BIGTREE_SKR_2]
  186. extends = stm32_variant
  187. platform_packages = ${stm_flash_drive.platform_packages}
  188. board = marlin_STM32F407VGT6_CCM
  189. board_build.variant = MARLIN_F4x7Vx
  190. board_build.offset = 0x8000
  191. board_upload.offset_address = 0x08008000
  192. build_flags = ${stm_flash_drive.build_flags}
  193. -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS
  194. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  195. -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
  196. -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8
  197. upload_protocol = stlink
  198. #
  199. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support
  200. #
  201. [env:BIGTREE_SKR_2_USB]
  202. extends = env:BIGTREE_SKR_2
  203. build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC
  204. build_unflags = ${env:BIGTREE_SKR_2.build_unflags} -DUSBD_USE_CDC
  205. [env:BIGTREE_SKR_2_USB_debug]
  206. extends = env:BIGTREE_SKR_2_USB
  207. build_flags = ${env:BIGTREE_SKR_2_USB.build_flags} -O0
  208. build_unflags = ${env:BIGTREE_SKR_2_USB.build_unflags} -Os -NDEBUG
  209. #
  210. # Bigtreetech SKR V2.0 F429 (STM32F429VGT6 ARM Cortex-M4) with USB Flash Drive Support
  211. #
  212. [env:BIGTREE_SKR_2_F429]
  213. extends = env:BIGTREE_SKR_2
  214. board = marlin_STM32F429VGT6
  215. #
  216. # BigTreeTech SKR V2.0 F429 (STM32F429VGT6 ARM Cortex-M4) with USB Media Share Support
  217. #
  218. [env:BIGTREE_SKR_2_F429_USB]
  219. extends = env:BIGTREE_SKR_2_F429
  220. build_flags = ${env:BIGTREE_SKR_2_F429.build_flags} -DUSBD_USE_CDC_MSC
  221. build_unflags = ${env:BIGTREE_SKR_2_F429.build_unflags} -DUSBD_USE_CDC
  222. [env:BIGTREE_SKR_2_F429_USB_debug]
  223. extends = env:BIGTREE_SKR_2_F429_USB
  224. build_flags = ${env:BIGTREE_SKR_2_F429_USB.build_flags} -O0
  225. build_unflags = ${env:BIGTREE_SKR_2_F429_USB.build_unflags} -Os -NDEBUG
  226. #
  227. # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4)
  228. #
  229. [env:BIGTREE_OCTOPUS_V1]
  230. extends = stm32_variant
  231. board = marlin_BigTree_Octopus_v1
  232. board_build.offset = 0x8000
  233. board_upload.offset_address = 0x08008000
  234. debug_tool = stlink
  235. upload_protocol = stlink
  236. build_flags = ${stm32_variant.build_flags}
  237. -DSTM32F446_5VX -DUSE_USB_HS_IN_FS
  238. #
  239. # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
  240. #
  241. [env:BIGTREE_OCTOPUS_V1_USB]
  242. extends = env:BIGTREE_OCTOPUS_V1
  243. platform_packages = ${stm_flash_drive.platform_packages}
  244. build_unflags = -DUSBD_USE_CDC
  245. build_flags = ${stm_flash_drive.build_flags}
  246. -DSTM32F446_5VX -DUSE_USB_HS_IN_FS
  247. -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5
  248. -DUSBD_IRQ_SUBPRIO=6
  249. -DUSBD_USE_CDC_MSC
  250. #
  251. # BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4)
  252. #
  253. [env:BIGTREE_OCTOPUS_PRO_V1_F429]
  254. extends = stm32_variant
  255. board = marlin_BigTree_Octopus_Pro_v1_F429
  256. board_build.offset = 0x8000
  257. board_upload.offset_address = 0x08008000
  258. debug_tool = stlink
  259. upload_protocol = stlink
  260. build_flags = ${stm32_variant.build_flags}
  261. -DUSE_USB_HS_IN_FS
  262. #
  263. # BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  264. #
  265. [env:BIGTREE_OCTOPUS_PRO_V1_F429_USB]
  266. extends = env:BIGTREE_OCTOPUS_PRO_V1_F429
  267. platform_packages = ${stm_flash_drive.platform_packages}
  268. build_unflags = -DUSBD_USE_CDC
  269. build_flags = ${stm_flash_drive.build_flags}
  270. -DUSE_USB_HS_IN_FS -DUSE_USBHOST_HS
  271. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  272. -DUSBD_USE_CDC_MSC
  273. #
  274. # Lerdge base
  275. #
  276. [lerdge_common]
  277. extends = stm32_variant
  278. board = marlin_STM32F407ZGT6
  279. board_build.variant = MARLIN_LERDGE
  280. board_build.crypt_lerdge = firmware.bin
  281. board_build.offset = 0x10000
  282. build_flags = ${stm32_variant.build_flags}
  283. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  284. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DLERDGE_TFT35
  285. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  286. extra_scripts = ${stm32_variant.extra_scripts}
  287. buildroot/share/PlatformIO/scripts/lerdge.py
  288. #
  289. # Lerdge X (STM32F407VE)
  290. #
  291. [env:LERDGEX]
  292. extends = lerdge_common
  293. board_build.crypt_lerdge = Lerdge_X_firmware_force.bin
  294. #
  295. # Lerdge X with USB Flash Drive Support
  296. #
  297. [env:LERDGEX_usb_flash_drive]
  298. extends = env:LERDGEX
  299. platform_packages = ${stm_flash_drive.platform_packages}
  300. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  301. #
  302. # Lerdge S (STM32F407ZG)
  303. #
  304. [env:LERDGES]
  305. extends = lerdge_common
  306. board_build.crypt_lerdge = Lerdge_firmware_force.bin
  307. #
  308. # Lerdge S with USB Flash Drive Support
  309. #
  310. [env:LERDGES_usb_flash_drive]
  311. extends = env:LERDGES
  312. platform_packages = ${stm_flash_drive.platform_packages}
  313. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  314. #
  315. # Lerdge K (STM32F407ZG)
  316. #
  317. [env:LERDGEK]
  318. extends = lerdge_common
  319. board_build.crypt_lerdge = Lerdge_K_firmware_force.bin
  320. build_flags = ${lerdge_common.build_flags} -DLERDGEK
  321. #
  322. # Lerdge K with USB Flash Drive Support
  323. #
  324. [env:LERDGEK_usb_flash_drive]
  325. extends = env:LERDGEK
  326. platform_packages = ${stm_flash_drive.platform_packages}
  327. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  328. #
  329. # RUMBA32
  330. #
  331. [env:rumba32]
  332. extends = stm32_variant
  333. board = rumba32_f446ve
  334. board_build.variant = MARLIN_F446VE
  335. board_build.offset = 0x0000
  336. build_flags = ${stm32_variant.build_flags}
  337. -Os -DHAL_PCD_MODULE_ENABLED
  338. -DDISABLE_GENERIC_SERIALUSB
  339. -DHAL_UART_MODULE_ENABLED
  340. -DTIMER_SERIAL=TIM9
  341. monitor_speed = 500000
  342. upload_protocol = dfu
  343. #
  344. # MKS Robin Pro V2
  345. #
  346. [env:mks_robin_pro2]
  347. extends = stm32_variant
  348. platform_packages = ${stm_flash_drive.platform_packages}
  349. board = genericSTM32F407VET6
  350. board_build.variant = MARLIN_F4x7Vx
  351. board_build.offset = 0x0000
  352. board_upload.offset_address = 0x08000000
  353. build_flags = ${stm_flash_drive.build_flags}
  354. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  355. debug_tool = jlink
  356. upload_protocol = jlink
  357. #
  358. # This I2C1(PB6:I2C1_SCL PB7:I2C1_SDA) is used by Robin Nano V3
  359. #
  360. [stm32f4_I2C1]
  361. build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
  362. #
  363. # MKS Robin Nano V3
  364. #
  365. [env:mks_robin_nano_v3]
  366. extends = stm32_variant
  367. board = marlin_STM32F407VGT6_CCM
  368. board_build.variant = MARLIN_F4x7Vx
  369. board_build.offset = 0xC000
  370. board_upload.offset_address = 0x0800C000
  371. board_build.rename = Robin_nano_v3.bin
  372. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
  373. -DHAL_PCD_MODULE_ENABLED
  374. debug_tool = jlink
  375. upload_protocol = jlink
  376. #
  377. # MKS Robin Nano V3 with USB Flash Drive Support
  378. # Currently, using a STM32duino fork, until USB Host get merged
  379. #
  380. [env:mks_robin_nano_v3_usb_flash_drive]
  381. extends = env:mks_robin_nano_v3
  382. platform_packages = ${stm_flash_drive.platform_packages}
  383. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  384. -DUSE_USBHOST_HS
  385. -DUSBD_IRQ_PRIO=5
  386. -DUSBD_IRQ_SUBPRIO=6
  387. -DUSE_USB_HS_IN_FS
  388. #
  389. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  390. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  391. #
  392. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  393. extends = env:mks_robin_nano_v3_usb_flash_drive
  394. build_flags = ${env:mks_robin_nano_v3_usb_flash_drive.build_flags}
  395. -DUSBD_USE_CDC_MSC
  396. build_unflags = -DUSBD_USE_CDC
  397. #
  398. # MKS Robin Nano V3_1
  399. #
  400. [env:mks_robin_nano_v3_1]
  401. extends = env:mks_robin_nano_v3
  402. board = marlin_STM32F407VET6_CCM
  403. #
  404. # MKS Robin Nano V3.1 with USB Flash Drive Support
  405. # Currently, using a STM32duino fork, until USB Host get merged
  406. #
  407. [env:mks_robin_nano_v3_1_usb_flash_drive]
  408. extends = env:mks_robin_nano_v3_usb_flash_drive
  409. board = marlin_STM32F407VET6_CCM
  410. #
  411. # MKS Robin Nano V3.1 with USB Flash Drive Support and Shared Media
  412. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  413. #
  414. [env:mks_robin_nano_v3_1_usb_flash_drive_msc]
  415. extends = env:mks_robin_nano_v3_usb_flash_drive_msc
  416. board = marlin_STM32F407VET6_CCM
  417. #
  418. # MKS Eagle
  419. # 5 TMC2209 uart mode on board
  420. #
  421. [env:mks_eagle]
  422. extends = stm32_variant
  423. board = marlin_STM32F407VGT6_CCM
  424. board_build.variant = MARLIN_F4x7Vx
  425. board_build.offset = 0xC000
  426. board_upload.offset_address = 0x0800C000
  427. board_build.rename = mks_eagle.bin
  428. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
  429. -DHAL_PCD_MODULE_ENABLED
  430. -DSTM32_FLASH_SIZE=512
  431. debug_tool = jlink
  432. upload_protocol = jlink
  433. #
  434. # MKS Eagle with USB Flash Drive Support
  435. # Currently, using a STM32duino fork, until USB Host get merged
  436. #
  437. [env:mks_eagle_usb_flash_drive]
  438. extends = env:mks_eagle
  439. platform_packages = ${stm_flash_drive.platform_packages}
  440. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  441. -DUSE_USBHOST_HS
  442. -DUSBD_IRQ_PRIO=5
  443. -DUSBD_IRQ_SUBPRIO=6
  444. -DUSE_USB_HS_IN_FS
  445. #
  446. # MKS Eagle with USB Flash Drive Support and Shared Media
  447. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  448. #
  449. [env:mks_eagle_usb_flash_drive_msc]
  450. extends = env:mks_eagle_usb_flash_drive
  451. build_flags = ${env:mks_eagle_usb_flash_drive.build_flags}
  452. -DUSBD_USE_CDC_MSC
  453. build_unflags = -DUSBD_USE_CDC
  454. #
  455. # This I2C1(PB8:I2C1_SCL PB9:I2C1_SDA) is used by MKS Monster8
  456. #
  457. [stm32f4_I2C1_CAN]
  458. build_flags = -DPIN_WIRE_SCL=PB8 -DPIN_WIRE_SDA=PB9
  459. #
  460. # MKS Monster8
  461. #
  462. [env:mks_monster8]
  463. extends = stm32_variant
  464. board = marlin_STM32F407VGT6_CCM
  465. board_build.variant = MARLIN_F4x7Vx
  466. board_build.offset = 0xC000
  467. board_upload.offset_address = 0x0800C000
  468. board_build.rename = mks_monster8.bin
  469. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1_CAN.build_flags}
  470. -DHAL_PCD_MODULE_ENABLED -DTIMER_SERIAL=TIM4
  471. -DSTM32_FLASH_SIZE=512
  472. debug_tool = jlink
  473. upload_protocol = jlink
  474. #
  475. # MKS Monster8 with USB Flash Drive Support
  476. # Currently, using a STM32duino fork, until USB Host get merged
  477. #
  478. [env:mks_monster8_usb_flash_drive]
  479. extends = env:mks_monster8
  480. platform_packages = ${stm_flash_drive.platform_packages}
  481. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1_CAN.build_flags}
  482. -DUSE_USBHOST_HS
  483. -DUSBD_IRQ_PRIO=5
  484. -DUSBD_IRQ_SUBPRIO=6
  485. -DUSE_USB_HS_IN_FS
  486. #
  487. # MKS Monster8 with USB Flash Drive Support and Shared Media
  488. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  489. #
  490. [env:mks_monster8_usb_flash_drive_msc]
  491. extends = env:mks_monster8_usb_flash_drive
  492. build_flags = ${env:mks_monster8_usb_flash_drive.build_flags}
  493. -DUSBD_USE_CDC_MSC
  494. build_unflags = -DUSBD_USE_CDC
  495. #
  496. # TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
  497. #
  498. [env:TH3D_EZBoard_V2]
  499. extends = stm32_variant
  500. board = genericSTM32F405RG
  501. board_build.variant = MARLIN_TH3D_EZBOARD_V2
  502. board_build.encrypt_mks = firmware.bin
  503. board_build.offset = 0xC000
  504. board_upload.offset_address = 0x0800C000
  505. build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0
  506. debug_tool = stlink
  507. upload_protocol = stlink
  508. extra_scripts = ${stm32_variant.extra_scripts}
  509. buildroot/share/PlatformIO/scripts/openblt.py
  510. #
  511. # BOARD_MKS_ROBIN_NANO_V1_3_F4
  512. # - MKS Robin Nano V1.3 (STM32F407VET6) 5 Pololu Plug
  513. # - MKS Robin Nano-S V1.3 (STM32F407VET6) 4 TMC2225 + 1 Pololu Plug
  514. #
  515. [env:mks_robin_nano_v1_3_f4]
  516. extends = stm32_variant
  517. board = marlin_STM32F407VGT6_CCM
  518. board_build.variant = MARLIN_F4x7Vx
  519. board_build.offset = 0x8000
  520. board_upload.offset_address = 0x08008000
  521. board_build.rename = Robin_nano35.bin
  522. build_flags = ${stm32_variant.build_flags}
  523. -DMCU_STM32F407VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
  524. -DSTM32_FLASH_SIZE=512
  525. -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
  526. -DHAL_SD_MODULE_ENABLED
  527. -DHAL_SRAM_MODULE_ENABLED
  528. build_unflags = ${stm32_variant.build_unflags}
  529. -DUSBCON -DUSBD_USE_CDC
  530. debug_tool = jlink
  531. upload_protocol = jlink
  532. #
  533. # Artillery Ruby
  534. #
  535. [env:Artillery_Ruby]
  536. extends = common_stm32
  537. board = marlin_Artillery_Ruby
  538. build_flags = ${common_stm32.build_flags}
  539. -DSTM32F401xC -DTARGET_STM32F4 -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32
  540. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  541. -DUSB_PRODUCT=\"Artillery_3D_Printer\"
  542. -DFLASH_DATA_SECTOR=1U -DFLASH_BASE_ADDRESS=0x08004000
  543. extra_scripts = ${common_stm32.extra_scripts}
  544. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  545. #
  546. # Ender-3 S1 STM32F401RC_creality
  547. #
  548. [env:STM32F401RC_creality]
  549. extends = stm32_variant
  550. board = genericSTM32F401RC
  551. board_build.variant = MARLIN_CREALITY_STM32F401RC
  552. board_build.offset = 0x10000
  553. board_upload.offset_address = 0x08010000
  554. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RC -DSTM32F4
  555. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  556. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  557. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  558. extra_scripts = ${stm32_variant.extra_scripts}
  559. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  560. monitor_speed = 115200
  561. [env:STM32F401RC_creality_jlink]
  562. extends = env:STM32F401RC_creality
  563. debug_tool = jlink
  564. upload_protocol = jlink
  565. [env:STM32F401RC_creality_stlink]
  566. extends = env:STM32F401RC_creality
  567. debug_tool = stlink
  568. upload_protocol = stlink