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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. #################################
  6. # #
  7. # STM32F4 Architecture #
  8. # #
  9. #################################
  10. #
  11. # ARMED (STM32)
  12. #
  13. [env:ARMED]
  14. platform = ${common_stm32.platform}
  15. extends = common_stm32
  16. board = armed_v1
  17. build_flags = ${common_stm32.build_flags}
  18. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
  19. #
  20. # STM32F401VE
  21. # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
  22. #
  23. [env:STM32F401VE_STEVAL]
  24. platform = ${common_stm32.platform}
  25. extends = common_stm32
  26. board = STEVAL_STM32F401VE
  27. build_flags = ${common_stm32.build_flags}
  28. -DARDUINO_STEVAL -DSTM32F401xE
  29. -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  30. extra_scripts = ${common.extra_scripts}
  31. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  32. buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py
  33. #
  34. # STM32F401RC
  35. #
  36. [env:FYSETC_CHEETAH_V20]
  37. platform = ${common_stm32.platform}
  38. extends = common_stm32
  39. board = FYSETC_CHEETAH_V20
  40. build_flags = ${common_stm32.build_flags} -DSTM32F401xC -DVECT_TAB_OFFSET=0xC000
  41. extra_scripts = ${common.extra_scripts}
  42. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  43. buildroot/share/PlatformIO/scripts/FYSETC_CHEETAH_V20.py
  44. #
  45. # FLYF407ZG
  46. #
  47. [env:FLYF407ZG]
  48. platform = ${common_stm32.platform}
  49. extends = common_stm32
  50. board = FLYF407ZG
  51. build_flags = ${common_stm32.build_flags}
  52. -DVECT_TAB_OFFSET=0x8000
  53. extra_scripts = ${common.extra_scripts}
  54. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  55. #
  56. # FLY MINI(stm32f103rct6)
  57. #
  58. [env:FLY_MINI]
  59. platform = ${common_stm32f1.platform}
  60. extends = common_stm32f1
  61. board = genericSTM32F103RC
  62. extra_scripts = ${common_stm32f1.extra_scripts}
  63. buildroot/share/PlatformIO/scripts/fly_mini.py
  64. build_flags = ${common_stm32f1.build_flags}
  65. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  66. #
  67. # FYSETC S6 (STM32F446VET6 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}
  75. -DVECT_TAB_OFFSET=0x10000
  76. -DHAL_PCD_MODULE_ENABLED
  77. extra_scripts = ${common.extra_scripts}
  78. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  79. debug_tool = stlink
  80. upload_protocol = dfu
  81. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  82. #
  83. # STM32F407VET6 with RAMPS-like shield
  84. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  85. # Shield - https://github.com/jmz52/Hardware
  86. #
  87. [env:STM32F407VE_black]
  88. platform = ${common_stm32.platform}
  89. extends = common_stm32
  90. board = blackSTM32F407VET6
  91. build_flags = ${common_stm32.build_flags}
  92. -DARDUINO_BLACK_F407VE
  93. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  94. extra_scripts = ${common.extra_scripts}
  95. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  96. #
  97. # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
  98. # For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases
  99. # Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000.
  100. #
  101. [env:Anet_ET4_OpenBLT]
  102. platform = ${common_stm32.platform}
  103. extends = common_stm32
  104. build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  105. board = genericSTM32F407VGT6
  106. board_build.core = stm32
  107. board_build.variant = MARLIN_F4x7Vx
  108. board_build.ldscript = ldscript.ld
  109. board_build.firmware = firmware.srec
  110. # Just openblt.py (not stm32_bootloader.py) generates the file
  111. board_build.encrypt = Yes
  112. board_build.offset = 0x10000
  113. board_upload.offset_address = 0x08010000
  114. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  115. debug_tool = jlink
  116. upload_protocol = jlink
  117. extra_scripts = ${common.extra_scripts}
  118. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  119. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  120. buildroot/share/PlatformIO/scripts/openblt.py
  121. #
  122. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  123. #
  124. [env:BIGTREE_SKR_PRO]
  125. platform = ${common_stm32.platform}
  126. extends = common_stm32
  127. board = BigTree_SKR_Pro
  128. build_flags = ${common_stm32.build_flags}
  129. -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  130. extra_scripts = ${common.extra_scripts}
  131. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  132. #upload_protocol = stlink
  133. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  134. debug_tool = stlink
  135. debug_init_break =
  136. #
  137. # USB Flash Drive mix-ins for STM32
  138. #
  139. [stm_flash_drive]
  140. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc.zip
  141. build_flags = ${common_stm32.build_flags}
  142. -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED
  143. -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4
  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_unflags = -DUSBCON -DUSBD_USE_CDC
  151. build_flags = ${stm_flash_drive.build_flags}
  152. -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  153. #
  154. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  155. #
  156. [env:BIGTREE_GTR_V1_0]
  157. platform = ${common_stm32.platform}
  158. extends = common_stm32
  159. board = BigTree_GTR_v1
  160. extra_scripts = ${common.extra_scripts}
  161. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  162. build_flags = ${common_stm32.build_flags}
  163. -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  164. #
  165. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support
  166. #
  167. [env:BIGTREE_GTR_V1_0_usb_flash_drive]
  168. extends = env:BIGTREE_GTR_V1_0
  169. platform_packages = ${stm_flash_drive.platform_packages}
  170. build_unflags = -DUSBCON -DUSBD_USE_CDC
  171. build_flags = ${stm_flash_drive.build_flags}
  172. -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  173. #
  174. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  175. #
  176. [env:BIGTREE_BTT002]
  177. platform = ${common_stm32.platform}
  178. extends = common_stm32
  179. board = BigTree_Btt002
  180. build_flags = ${common_stm32.build_flags}
  181. -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  182. -DHAVE_HWSERIAL2
  183. -DHAVE_HWSERIAL3
  184. -DPIN_SERIAL2_RX=PD_6
  185. -DPIN_SERIAL2_TX=PD_5
  186. extra_scripts = ${common.extra_scripts}
  187. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  188. #
  189. # Lerdge base
  190. #
  191. [lerdge_common]
  192. platform = ${common_stm32.platform}
  193. extends = common_stm32
  194. board = LERDGE
  195. board_build.offset = 0x10000
  196. board_build.encrypt = Yes
  197. extra_scripts = ${common.extra_scripts}
  198. pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
  199. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  200. buildroot/share/PlatformIO/scripts/lerdge.py
  201. build_flags = ${common_stm32.build_flags}
  202. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  203. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  204. -DHAL_SRAM_MODULE_ENABLED
  205. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  206. #
  207. # Lerdge X
  208. #
  209. [env:LERDGEX]
  210. platform = ${lerdge_common.platform}
  211. extends = lerdge_common
  212. board_build.firmware = Lerdge_X_firmware_force.bin
  213. #
  214. # Lerdge X with USB Flash Drive Support
  215. #
  216. [env:LERDGEX_usb_flash_drive]
  217. platform = ${env:LERDGEX.platform}
  218. extends = env:LERDGEX
  219. platform_packages = ${stm_flash_drive.platform_packages}
  220. build_flags = ${stm_flash_drive.build_flags}
  221. #
  222. # Lerdge S
  223. #
  224. [env:LERDGES]
  225. platform = ${lerdge_common.platform}
  226. extends = lerdge_common
  227. board_build.firmware = Lerdge_firmware_force.bin
  228. #
  229. # Lerdge S with USB Flash Drive Support
  230. #
  231. [env:LERDGES_usb_flash_drive]
  232. platform = ${env:LERDGES.platform}
  233. extends = env:LERDGES
  234. platform_packages = ${stm_flash_drive.platform_packages}
  235. build_flags = ${stm_flash_drive.build_flags}
  236. #
  237. # Lerdge K
  238. #
  239. [env:LERDGEK]
  240. platform = ${lerdge_common.platform}
  241. extends = lerdge_common
  242. board_build.firmware = Lerdge_K_firmware_force.bin
  243. build_flags = ${lerdge_common.build_flags}
  244. -DLERDGEK
  245. #
  246. # Lerdge K with USB Flash Drive Support
  247. #
  248. [env:LERDGEK_usb_flash_drive]
  249. platform = ${env:LERDGEK.platform}
  250. extends = env:LERDGEK
  251. platform_packages = ${stm_flash_drive.platform_packages}
  252. build_flags = ${stm_flash_drive.build_flags}
  253. #
  254. # RUMBA32
  255. #
  256. [env:rumba32]
  257. platform = ${common_stm32.platform}
  258. extends = common_stm32
  259. build_flags = ${common_stm32.build_flags}
  260. -Os
  261. -DHAL_PCD_MODULE_ENABLED
  262. -DDISABLE_GENERIC_SERIALUSB
  263. -DHAL_UART_MODULE_ENABLED
  264. -DTIMER_SERIAL=TIM9
  265. board = rumba32_f446ve
  266. upload_protocol = dfu
  267. monitor_speed = 500000
  268. #
  269. # MKS Robin Pro V2
  270. #
  271. [env:mks_robin_pro2]
  272. platform = ${common_stm32.platform}
  273. platform_packages = ${stm_flash_drive.platform_packages}
  274. extends = common_stm32
  275. build_flags = ${stm_flash_drive.build_flags}
  276. board = genericSTM32F407VET6
  277. board_build.core = stm32
  278. board_build.variant = MARLIN_F4x7Vx
  279. board_build.ldscript = ldscript.ld
  280. board_build.firmware = firmware.bin
  281. board_build.offset = 0x0000
  282. board_upload.offset_address = 0x08000000
  283. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  284. debug_tool = jlink
  285. upload_protocol = jlink
  286. extra_scripts = ${common.extra_scripts}
  287. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  288. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  289. #
  290. # This SPI is used by Robin Nano V3
  291. #
  292. [stm32f4_I2C1]
  293. build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
  294. #
  295. # MKS Robin Nano V3
  296. #
  297. [env:mks_robin_nano_v3]
  298. platform = ${common_stm32.platform}
  299. extends = common_stm32
  300. build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC
  301. board = genericSTM32F407VGT6
  302. board_build.core = stm32
  303. board_build.variant = MARLIN_F4x7Vx
  304. board_build.ldscript = ldscript.ld
  305. board_build.firmware = Robin_nano_v3.bin
  306. board_build.offset = 0xC000
  307. board_upload.offset_address = 0x0800C000
  308. build_unflags = ${common_stm32.build_unflags}
  309. debug_tool = jlink
  310. upload_protocol = jlink
  311. extra_scripts = ${common.extra_scripts}
  312. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  313. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  314. #
  315. # MKS Robin Nano V3 with USB Flash Drive Support
  316. # Currently, using a STM32duino fork, until USB Host get merged
  317. #
  318. [env:mks_robin_nano_v3_usb_flash_drive]
  319. extends = env:mks_robin_nano_v3
  320. platform_packages = ${stm_flash_drive.platform_packages}
  321. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  322. -DUSBCON
  323. -DUSE_USBHOST_HS
  324. -DUSBD_IRQ_PRIO=5
  325. -DUSBD_IRQ_SUBPRIO=6
  326. -DUSE_USB_HS_IN_FS
  327. -DUSBD_USE_CDC
  328. #
  329. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  330. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  331. #
  332. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  333. platform = ${common_stm32.platform}
  334. extends = env:mks_robin_nano_v3
  335. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip
  336. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  337. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  338. -DUSBCON
  339. -DUSE_USBHOST_HS
  340. -DUSBD_IRQ_PRIO=5
  341. -DUSBD_IRQ_SUBPRIO=6
  342. -DUSE_USB_HS_IN_FS
  343. -DUSBD_USE_CDC_MSC