My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

stm32f4.ini 15KB

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