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

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