My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

stm32f4.ini 15KB

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