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. # FLY MINI (STM32F103RCT6)
  67. #
  68. [env:FLY_MINI]
  69. platform = ${common_stm32f1.platform}
  70. extends = common_stm32f1
  71. board = genericSTM32F103RC
  72. board_build.address = 0x08005000
  73. board_build.ldscript = fly_mini.ld
  74. extra_scripts = ${common_stm32f1.extra_scripts}
  75. buildroot/share/PlatformIO/scripts/custom_board.py
  76. build_flags = ${common_stm32f1.build_flags}
  77. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  78. #
  79. # FYSETC S6 (STM32F446RET6 ARM Cortex-M4)
  80. #
  81. [env:FYSETC_S6]
  82. platform = ${common_stm32.platform}
  83. extends = common_stm32
  84. platform_packages = tool-stm32duino
  85. board = marlin_fysetc_s6
  86. build_flags = ${common_stm32.build_flags}
  87. -DVECT_TAB_OFFSET=0x10000
  88. -DHAL_PCD_MODULE_ENABLED
  89. extra_scripts = ${common.extra_scripts}
  90. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  91. debug_tool = stlink
  92. upload_protocol = dfu
  93. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  94. #
  95. # STM32F407VET6 with RAMPS-like shield
  96. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  97. # Shield - https://github.com/jmz52/Hardware
  98. #
  99. [env:STM32F407VE_black]
  100. platform = ${common_stm32.platform}
  101. extends = common_stm32
  102. board = marlin_blackSTM32F407VET6
  103. build_flags = ${common_stm32.build_flags}
  104. -DARDUINO_BLACK_F407VE
  105. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  106. extra_scripts = ${common.extra_scripts}
  107. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  108. #
  109. # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
  110. # For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases
  111. # Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000.
  112. #
  113. [env:Anet_ET4_OpenBLT]
  114. platform = ${common_stm32.platform}
  115. extends = common_stm32
  116. build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  117. board = marlin_STM32F407VGT6_CCM
  118. board_build.core = stm32
  119. board_build.variant = MARLIN_F4x7Vx
  120. board_build.ldscript = ldscript.ld
  121. board_build.firmware = firmware.srec
  122. # Just openblt.py (not stm32_bootloader.py) generates the file
  123. board_build.encrypt = Yes
  124. board_build.offset = 0x10000
  125. board_upload.offset_address = 0x08010000
  126. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  127. debug_tool = jlink
  128. upload_protocol = jlink
  129. extra_scripts = ${common.extra_scripts}
  130. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  131. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  132. buildroot/share/PlatformIO/scripts/openblt.py
  133. #
  134. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  135. #
  136. [env:BIGTREE_SKR_PRO]
  137. platform = ${common_stm32.platform}
  138. extends = common_stm32
  139. board = marlin_BigTree_SKR_Pro
  140. build_flags = ${common_stm32.build_flags}
  141. -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  142. extra_scripts = ${common.extra_scripts}
  143. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  144. #upload_protocol = stlink
  145. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  146. debug_tool = stlink
  147. debug_init_break =
  148. #
  149. # USB Flash Drive mix-ins for STM32
  150. #
  151. [stm_flash_drive]
  152. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc.zip
  153. build_flags = ${common_stm32.build_flags}
  154. -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED
  155. -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4
  156. #
  157. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  158. #
  159. [env:BIGTREE_SKR_PRO_usb_flash_drive]
  160. extends = env:BIGTREE_SKR_PRO
  161. platform_packages = ${stm_flash_drive.platform_packages}
  162. build_unflags = -DUSBCON -DUSBD_USE_CDC
  163. build_flags = ${stm_flash_drive.build_flags}
  164. -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  165. #
  166. # BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4)
  167. #
  168. [env:BIGTREE_E3_RRF]
  169. platform = ${common_stm32.platform}
  170. extends = common_stm32
  171. board = marlin_STM32F407VGT6_CCM
  172. board_build.variant = MARLIN_BIGTREE_E3_RRF
  173. build_flags = ${common_stm32.build_flags}
  174. -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  175. -DSERIAL_RX_BUFFER_SIZE=255 -DSERIAL_TX_BUFFER_SIZE=255
  176. extra_scripts = ${common.extra_scripts}
  177. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  178. #
  179. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  180. #
  181. [env:BIGTREE_GTR_V1_0]
  182. platform = ${common_stm32.platform}
  183. extends = common_stm32
  184. board = marlin_BigTree_GTR_v1
  185. extra_scripts = ${common.extra_scripts}
  186. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  187. build_flags = ${common_stm32.build_flags}
  188. -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  189. #
  190. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support
  191. #
  192. [env:BIGTREE_GTR_V1_0_usb_flash_drive]
  193. extends = env:BIGTREE_GTR_V1_0
  194. platform_packages = ${stm_flash_drive.platform_packages}
  195. build_unflags = -DUSBCON -DUSBD_USE_CDC
  196. build_flags = ${stm_flash_drive.build_flags}
  197. -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  198. #
  199. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  200. #
  201. [env:BIGTREE_BTT002]
  202. platform = ${common_stm32.platform}
  203. extends = common_stm32
  204. board = marlin_BigTree_BTT002
  205. build_flags = ${common_stm32.build_flags}
  206. -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  207. -DHAVE_HWSERIAL2
  208. -DHAVE_HWSERIAL3
  209. -DPIN_SERIAL2_RX=PD_6
  210. -DPIN_SERIAL2_TX=PD_5
  211. extra_scripts = ${common.extra_scripts}
  212. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  213. #
  214. # Bigtreetech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support
  215. #
  216. [env:BIGTREE_SKR_2]
  217. platform = ${common_stm32.platform}
  218. platform_packages = ${stm_flash_drive.platform_packages}
  219. extends = common_stm32
  220. board = marlin_STM32F407VGT6_CCM
  221. board_build.core = stm32
  222. board_build.variant = MARLIN_F4x7Vx
  223. board_build.ldscript = ldscript.ld
  224. board_build.offset = 0x8000
  225. board_upload.offset_address = 0x08008000
  226. extra_scripts = ${common.extra_scripts}
  227. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  228. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  229. build_flags = ${stm_flash_drive.build_flags}
  230. -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  231. -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
  232. #
  233. # Lerdge base
  234. #
  235. [lerdge_common]
  236. platform = ${common_stm32.platform}
  237. extends = common_stm32
  238. board = marlin_STM32F407ZGT6
  239. board_build.variant = MARLIN_LERDGE
  240. board_build.offset = 0x10000
  241. board_build.encrypt = Yes
  242. extra_scripts = ${common.extra_scripts}
  243. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  244. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  245. buildroot/share/PlatformIO/scripts/lerdge.py
  246. build_flags = ${common_stm32.build_flags}
  247. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  248. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  249. -DHAL_SRAM_MODULE_ENABLED
  250. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  251. #
  252. # Lerdge X
  253. #
  254. [env:LERDGEX]
  255. platform = ${lerdge_common.platform}
  256. extends = lerdge_common
  257. board_build.firmware = Lerdge_X_firmware_force.bin
  258. #
  259. # Lerdge X with USB Flash Drive Support
  260. #
  261. [env:LERDGEX_usb_flash_drive]
  262. platform = ${env:LERDGEX.platform}
  263. extends = env:LERDGEX
  264. platform_packages = ${stm_flash_drive.platform_packages}
  265. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  266. #
  267. # Lerdge S
  268. #
  269. [env:LERDGES]
  270. platform = ${lerdge_common.platform}
  271. extends = lerdge_common
  272. board_build.firmware = Lerdge_firmware_force.bin
  273. #
  274. # Lerdge S with USB Flash Drive Support
  275. #
  276. [env:LERDGES_usb_flash_drive]
  277. platform = ${env:LERDGES.platform}
  278. extends = env:LERDGES
  279. platform_packages = ${stm_flash_drive.platform_packages}
  280. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  281. #
  282. # Lerdge K
  283. #
  284. [env:LERDGEK]
  285. platform = ${lerdge_common.platform}
  286. extends = lerdge_common
  287. board_build.firmware = Lerdge_K_firmware_force.bin
  288. build_flags = ${lerdge_common.build_flags} -DLERDGEK
  289. #
  290. # Lerdge K with USB Flash Drive Support
  291. #
  292. [env:LERDGEK_usb_flash_drive]
  293. platform = ${env:LERDGEK.platform}
  294. extends = env:LERDGEK
  295. platform_packages = ${stm_flash_drive.platform_packages}
  296. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  297. #
  298. # RUMBA32
  299. #
  300. [env:rumba32]
  301. platform = ${common_stm32.platform}
  302. extends = common_stm32
  303. build_flags = ${common_stm32.build_flags}
  304. -Os
  305. -DHAL_PCD_MODULE_ENABLED
  306. -DDISABLE_GENERIC_SERIALUSB
  307. -DHAL_UART_MODULE_ENABLED
  308. -DTIMER_SERIAL=TIM9
  309. board = rumba32_f446ve
  310. upload_protocol = dfu
  311. monitor_speed = 500000
  312. board_build.core = stm32
  313. board_build.variant = MARLIN_F446VE
  314. board_build.ldscript = ldscript.ld
  315. board_build.offset = 0x0000
  316. board_build.encrypt = No
  317. board_build.firmware = firmware.bin
  318. extra_scripts = ${common.extra_scripts}
  319. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  320. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  321. #
  322. # MKS Robin Pro V2
  323. #
  324. [env:mks_robin_pro2]
  325. platform = ${common_stm32.platform}
  326. platform_packages = ${stm_flash_drive.platform_packages}
  327. extends = common_stm32
  328. build_flags = ${stm_flash_drive.build_flags}
  329. board = genericSTM32F407VET6
  330. board_build.core = stm32
  331. board_build.variant = MARLIN_F4x7Vx
  332. board_build.ldscript = ldscript.ld
  333. board_build.firmware = firmware.bin
  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.ldscript = ldscript.ld
  358. board_build.firmware = Robin_nano_v3.bin
  359. board_build.offset = 0xC000
  360. board_upload.offset_address = 0x0800C000
  361. build_unflags = ${common_stm32.build_unflags}
  362. debug_tool = jlink
  363. upload_protocol = jlink
  364. extra_scripts = ${common.extra_scripts}
  365. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  366. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  367. #
  368. # MKS Robin Nano V3 with USB Flash Drive Support
  369. # Currently, using a STM32duino fork, until USB Host get merged
  370. #
  371. [env:mks_robin_nano_v3_usb_flash_drive]
  372. extends = env:mks_robin_nano_v3
  373. platform_packages = ${stm_flash_drive.platform_packages}
  374. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  375. -DUSBCON
  376. -DUSE_USBHOST_HS
  377. -DUSBD_IRQ_PRIO=5
  378. -DUSBD_IRQ_SUBPRIO=6
  379. -DUSE_USB_HS_IN_FS
  380. -DUSBD_USE_CDC
  381. #
  382. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  383. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  384. #
  385. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  386. platform = ${common_stm32.platform}
  387. extends = env:mks_robin_nano_v3
  388. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip
  389. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  390. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  391. -DUSBCON
  392. -DUSE_USBHOST_HS
  393. -DUSBD_IRQ_PRIO=5
  394. -DUSBD_IRQ_SUBPRIO=6
  395. -DUSE_USB_HS_IN_FS
  396. -DUSBD_USE_CDC_MSC