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

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