My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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
  13. # 01 : Line/Features
  14. # R : 64 or 66 pins (V:100, Z:144, I:176)
  15. # G : 1024KB Flash-memory (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. platform = ${common_stm32.platform}
  25. extends = common_stm32
  26. board = armed_v1
  27. build_flags = ${common_stm32.build_flags}
  28. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
  29. [stm32f4_variant]
  30. extra_scripts = ${common.extra_scripts}
  31. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  32. buildroot/share/PlatformIO/scripts/offset_and_rename.py
  33. #
  34. # STM32F401VE
  35. # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
  36. #
  37. [env:STM32F401VE_STEVAL]
  38. platform = ${common_stm32.platform}
  39. extends = common_stm32
  40. board = marlin_STEVAL_STM32F401VE
  41. build_flags = ${common_stm32.build_flags}
  42. -DARDUINO_STEVAL -DSTM32F401xE
  43. -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  44. extra_scripts = ${stm32f4_variant.extra_scripts}
  45. #
  46. # STM32F401RC
  47. #
  48. [env:FYSETC_CHEETAH_V20]
  49. platform = ${common_stm32.platform}
  50. extends = common_stm32
  51. board = marlin_FYSETC_CHEETAH_V20
  52. build_flags = ${common_stm32.build_flags} -DSTM32F401xC -DVECT_TAB_OFFSET=0xC000
  53. extra_scripts = ${stm32f4_variant.extra_scripts}
  54. #
  55. # FLYF407ZG
  56. #
  57. [env:FLYF407ZG]
  58. platform = ${common_stm32.platform}
  59. extends = common_stm32
  60. board = marlin_STM32F407ZGT6
  61. board_build.variant = MARLIN_FLY_F407ZG
  62. upload_protocol = dfu
  63. build_flags = ${common_stm32.build_flags}
  64. -DVECT_TAB_OFFSET=0x8000
  65. extra_scripts = ${stm32f4_variant.extra_scripts}
  66. #
  67. # FYSETC S6 (STM32F446RET6 ARM Cortex-M4)
  68. #
  69. [env:FYSETC_S6]
  70. platform = ${common_stm32.platform}
  71. extends = common_stm32
  72. platform_packages = tool-stm32duino
  73. board = marlin_fysetc_s6
  74. build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x10000 -DHAL_PCD_MODULE_ENABLED
  75. extra_scripts = ${stm32f4_variant.extra_scripts}
  76. debug_tool = stlink
  77. upload_protocol = dfu
  78. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  79. #
  80. # FYSETC S6 new bootloader
  81. #
  82. [env:FYSETC_S6_8000]
  83. platform = ${common_stm32.platform}
  84. extends = env:FYSETC_S6
  85. board = marlin_fysetc_s6_8000
  86. board_build.offset = 0x8000
  87. board_upload.offset_address = 0x08008000
  88. build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED
  89. extra_scripts = ${stm32f4_variant.extra_scripts}
  90. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  91. #
  92. # STM32F407VET6 with RAMPS-like shield
  93. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  94. # Shield - https://github.com/jmz52/Hardware
  95. #
  96. [env:STM32F407VE_black]
  97. platform = ${common_stm32.platform}
  98. extends = common_stm32
  99. board = marlin_blackSTM32F407VET6
  100. build_flags = ${common_stm32.build_flags}
  101. -DARDUINO_BLACK_F407VE
  102. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  103. extra_scripts = ${stm32f4_variant.extra_scripts}
  104. #
  105. # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
  106. # For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases
  107. # Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000.
  108. #
  109. [env:Anet_ET4_OpenBLT]
  110. platform = ${common_stm32.platform}
  111. extends = common_stm32
  112. build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  113. board = marlin_STM32F407VGT6_CCM
  114. board_build.core = stm32
  115. board_build.variant = MARLIN_F4x7Vx
  116. board_build.encrypt = firmware.srec
  117. board_build.offset = 0x10000
  118. board_upload.offset_address = 0x08010000
  119. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  120. debug_tool = jlink
  121. upload_protocol = jlink
  122. extra_scripts = ${stm32f4_variant.extra_scripts}
  123. buildroot/share/PlatformIO/scripts/openblt.py
  124. #
  125. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  126. #
  127. [env:BIGTREE_SKR_PRO]
  128. platform = ${common_stm32.platform}
  129. extends = common_stm32
  130. board = marlin_BigTree_SKR_Pro
  131. build_flags = ${common_stm32.build_flags}
  132. -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  133. extra_scripts = ${stm32f4_variant.extra_scripts}
  134. #upload_protocol = stlink
  135. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  136. debug_tool = stlink
  137. debug_init_break =
  138. #
  139. # USB Flash Drive mix-ins for STM32
  140. #
  141. [stm_flash_drive]
  142. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
  143. build_flags = ${common_stm32.build_flags}
  144. -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED
  145. -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4
  146. #
  147. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  148. #
  149. [env:BIGTREE_SKR_PRO_usb_flash_drive]
  150. extends = env:BIGTREE_SKR_PRO
  151. platform_packages = ${stm_flash_drive.platform_packages}
  152. build_unflags = -DUSBCON -DUSBD_USE_CDC
  153. build_flags = ${stm_flash_drive.build_flags}
  154. -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  155. #
  156. # BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4)
  157. #
  158. [env:BIGTREE_E3_RRF]
  159. platform = ${common_stm32.platform}
  160. extends = common_stm32
  161. board = marlin_STM32F407VGT6_CCM
  162. board_build.variant = MARLIN_BIGTREE_E3_RRF
  163. build_flags = ${common_stm32.build_flags}
  164. -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  165. -DSERIAL_RX_BUFFER_SIZE=255 -DSERIAL_TX_BUFFER_SIZE=255
  166. extra_scripts = ${stm32f4_variant.extra_scripts}
  167. #
  168. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  169. #
  170. [env:BIGTREE_GTR_V1_0]
  171. platform = ${common_stm32.platform}
  172. extends = common_stm32
  173. board = marlin_BigTree_GTR_v1
  174. extra_scripts = ${stm32f4_variant.extra_scripts}
  175. build_flags = ${common_stm32.build_flags}
  176. -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  177. #
  178. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support
  179. #
  180. [env:BIGTREE_GTR_V1_0_usb_flash_drive]
  181. extends = env:BIGTREE_GTR_V1_0
  182. platform_packages = ${stm_flash_drive.platform_packages}
  183. build_unflags = -DUSBCON -DUSBD_USE_CDC
  184. build_flags = ${stm_flash_drive.build_flags}
  185. -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  186. #
  187. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  188. #
  189. [env:BIGTREE_BTT002]
  190. platform = ${common_stm32.platform}
  191. extends = common_stm32
  192. board = marlin_BigTree_BTT002
  193. build_flags = ${common_stm32.build_flags}
  194. -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  195. -DHAVE_HWSERIAL2
  196. -DHAVE_HWSERIAL3
  197. -DPIN_SERIAL2_RX=PD_6
  198. -DPIN_SERIAL2_TX=PD_5
  199. extra_scripts = ${stm32f4_variant.extra_scripts}
  200. #
  201. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support
  202. #
  203. [env:BIGTREE_SKR_2]
  204. platform = ${common_stm32.platform}
  205. platform_packages = ${stm_flash_drive.platform_packages}
  206. extends = common_stm32
  207. board = marlin_STM32F407VGT6_CCM
  208. board_build.core = stm32
  209. board_build.variant = MARLIN_F4x7Vx
  210. board_build.offset = 0x8000
  211. board_upload.offset_address = 0x08008000
  212. extra_scripts = ${stm32f4_variant.extra_scripts}
  213. build_flags = ${stm_flash_drive.build_flags}
  214. -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  215. -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
  216. #
  217. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support
  218. #
  219. [env:BIGTREE_SKR_2_USB]
  220. platform = ${common_stm32.platform}
  221. extends = env:BIGTREE_SKR_2
  222. platform_packages = ${stm_flash_drive.platform_packages}
  223. build_unflags = -DUSBD_USE_CDC
  224. build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC
  225. #
  226. # BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4)
  227. #
  228. [env:BIGTREE_OCTOPUS_V1]
  229. platform = ${common_stm32.platform}
  230. extends = common_stm32
  231. board = marlin_BigTree_Octopus_v1
  232. extra_scripts = ${stm32f4_variant.extra_scripts}
  233. build_flags = ${common_stm32.build_flags}
  234. -DSTM32F446_5VX -DVECT_TAB_OFFSET=0x8000 -DUSE_USB_HS_IN_FS
  235. #
  236. # BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
  237. #
  238. [env:BIGTREE_OCTOPUS_V1_USB]
  239. extends = env:BIGTREE_OCTOPUS_V1
  240. platform_packages = ${stm_flash_drive.platform_packages}
  241. #build_unflags = -DUSBCON -DUSBD_USE_CDC
  242. build_flags = ${stm_flash_drive.build_flags}
  243. -DSTM32F446_5VX -DVECT_TAB_OFFSET=0x8000
  244. -DUSBCON -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSE_USB_HS_IN_FS -DUSBD_USE_CDC_MSC
  245. #
  246. # Lerdge base
  247. #
  248. [lerdge_common]
  249. platform = ${common_stm32.platform}
  250. extends = common_stm32
  251. board = marlin_STM32F407ZGT6
  252. board_build.variant = MARLIN_LERDGE
  253. board_build.offset = 0x10000
  254. board_build.encrypt = firmware.bin
  255. extra_scripts = ${stm32f4_variant.extra_scripts}
  256. buildroot/share/PlatformIO/scripts/lerdge.py
  257. build_flags = ${common_stm32.build_flags}
  258. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  259. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  260. -DHAL_SRAM_MODULE_ENABLED
  261. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  262. #
  263. # Lerdge X
  264. #
  265. [env:LERDGEX]
  266. platform = ${lerdge_common.platform}
  267. extends = lerdge_common
  268. board_build.encrypt = Lerdge_X_firmware_force.bin
  269. #
  270. # Lerdge X with USB Flash Drive Support
  271. #
  272. [env:LERDGEX_usb_flash_drive]
  273. platform = ${env:LERDGEX.platform}
  274. extends = env:LERDGEX
  275. platform_packages = ${stm_flash_drive.platform_packages}
  276. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  277. #
  278. # Lerdge S
  279. #
  280. [env:LERDGES]
  281. platform = ${lerdge_common.platform}
  282. extends = lerdge_common
  283. board_build.encrypt = Lerdge_firmware_force.bin
  284. #
  285. # Lerdge S with USB Flash Drive Support
  286. #
  287. [env:LERDGES_usb_flash_drive]
  288. platform = ${env:LERDGES.platform}
  289. extends = env:LERDGES
  290. platform_packages = ${stm_flash_drive.platform_packages}
  291. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  292. #
  293. # Lerdge K
  294. #
  295. [env:LERDGEK]
  296. platform = ${lerdge_common.platform}
  297. extends = lerdge_common
  298. board_build.encrypt = Lerdge_K_firmware_force.bin
  299. build_flags = ${lerdge_common.build_flags} -DLERDGEK
  300. #
  301. # Lerdge K with USB Flash Drive Support
  302. #
  303. [env:LERDGEK_usb_flash_drive]
  304. platform = ${env:LERDGEK.platform}
  305. extends = env:LERDGEK
  306. platform_packages = ${stm_flash_drive.platform_packages}
  307. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  308. #
  309. # RUMBA32
  310. #
  311. [env:rumba32]
  312. platform = ${common_stm32.platform}
  313. extends = common_stm32
  314. build_flags = ${common_stm32.build_flags}
  315. -Os
  316. -DHAL_PCD_MODULE_ENABLED
  317. -DDISABLE_GENERIC_SERIALUSB
  318. -DHAL_UART_MODULE_ENABLED
  319. -DTIMER_SERIAL=TIM9
  320. board = rumba32_f446ve
  321. upload_protocol = dfu
  322. monitor_speed = 500000
  323. board_build.core = stm32
  324. board_build.variant = MARLIN_F446VE
  325. board_build.offset = 0x0000
  326. extra_scripts = ${stm32f4_variant.extra_scripts}
  327. #
  328. # MKS Robin Pro V2
  329. #
  330. [env:mks_robin_pro2]
  331. platform = ${common_stm32.platform}
  332. platform_packages = ${stm_flash_drive.platform_packages}
  333. extends = common_stm32
  334. build_flags = ${stm_flash_drive.build_flags}
  335. board = genericSTM32F407VET6
  336. board_build.core = stm32
  337. board_build.variant = MARLIN_F4x7Vx
  338. board_build.offset = 0x0000
  339. board_upload.offset_address = 0x08000000
  340. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  341. debug_tool = jlink
  342. upload_protocol = jlink
  343. extra_scripts = ${stm32f4_variant.extra_scripts}
  344. #
  345. # This SPI is used by Robin Nano V3
  346. #
  347. [stm32f4_I2C1]
  348. build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
  349. #
  350. # MKS Robin Nano V3
  351. #
  352. [env:mks_robin_nano_v3]
  353. platform = ${common_stm32.platform}
  354. extends = common_stm32
  355. build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC
  356. board = marlin_STM32F407VGT6_CCM
  357. board_build.core = stm32
  358. board_build.variant = MARLIN_F4x7Vx
  359. board_build.rename = Robin_nano_v3.bin
  360. board_build.offset = 0xC000
  361. board_upload.offset_address = 0x0800C000
  362. build_unflags = ${common_stm32.build_unflags}
  363. debug_tool = jlink
  364. upload_protocol = jlink
  365. extra_scripts = ${stm32f4_variant.extra_scripts}
  366. #
  367. # MKS Robin Nano V3 with USB Flash Drive Support
  368. # Currently, using a STM32duino fork, until USB Host get merged
  369. #
  370. [env:mks_robin_nano_v3_usb_flash_drive]
  371. extends = env:mks_robin_nano_v3
  372. platform_packages = ${stm_flash_drive.platform_packages}
  373. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  374. -DUSBCON
  375. -DUSE_USBHOST_HS
  376. -DUSBD_IRQ_PRIO=5
  377. -DUSBD_IRQ_SUBPRIO=6
  378. -DUSE_USB_HS_IN_FS
  379. -DUSBD_USE_CDC
  380. #
  381. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  382. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  383. #
  384. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  385. platform = ${common_stm32.platform}
  386. extends = env:mks_robin_nano_v3
  387. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
  388. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  389. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  390. -DUSBCON
  391. -DUSE_USBHOST_HS
  392. -DUSBD_IRQ_PRIO=5
  393. -DUSBD_IRQ_SUBPRIO=6
  394. -DUSE_USB_HS_IN_FS
  395. -DUSBD_USE_CDC_MSC