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

stm32f4.ini 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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. # BigTreeTech Octopus V1.0 (STM32F446ZET6 ARM Cortex-M4)
  234. #
  235. [env:BIGTREE_OCTOPUS_V1_0]
  236. platform = ${common_stm32.platform}
  237. extends = common_stm32
  238. board = marlin_BigTree_octopus_v1
  239. extra_scripts = ${common.extra_scripts}
  240. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  241. build_flags = ${common_stm32.build_flags}
  242. -DSTM32F446_5VX -DVECT_TAB_OFFSET=0x8000 -DUSE_USB_HS_IN_FS
  243. #
  244. # BigTreeTech Octopus V1.0 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
  245. #
  246. [env:BIGTREE_OCTOPUS_V1_0_USB]
  247. extends = env:BIGTREE_OCTOPUS_V1_0
  248. platform_packages = ${stm_flash_drive.platform_packages}
  249. #build_unflags = -DUSBCON -DUSBD_USE_CDC
  250. build_flags = ${stm_flash_drive.build_flags}
  251. -DSTM32F446_5VX -DVECT_TAB_OFFSET=0x8000
  252. -DUSBCON -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSE_USB_HS_IN_FS -DUSBD_USE_CDC_MSC
  253. #
  254. # Lerdge base
  255. #
  256. [lerdge_common]
  257. platform = ${common_stm32.platform}
  258. extends = common_stm32
  259. board = marlin_STM32F407ZGT6
  260. board_build.variant = MARLIN_LERDGE
  261. board_build.offset = 0x10000
  262. board_build.encrypt = Yes
  263. extra_scripts = ${common.extra_scripts}
  264. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  265. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  266. buildroot/share/PlatformIO/scripts/lerdge.py
  267. build_flags = ${common_stm32.build_flags}
  268. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  269. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  270. -DHAL_SRAM_MODULE_ENABLED
  271. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  272. #
  273. # Lerdge X
  274. #
  275. [env:LERDGEX]
  276. platform = ${lerdge_common.platform}
  277. extends = lerdge_common
  278. board_build.firmware = Lerdge_X_firmware_force.bin
  279. #
  280. # Lerdge X with USB Flash Drive Support
  281. #
  282. [env:LERDGEX_usb_flash_drive]
  283. platform = ${env:LERDGEX.platform}
  284. extends = env:LERDGEX
  285. platform_packages = ${stm_flash_drive.platform_packages}
  286. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  287. #
  288. # Lerdge S
  289. #
  290. [env:LERDGES]
  291. platform = ${lerdge_common.platform}
  292. extends = lerdge_common
  293. board_build.firmware = Lerdge_firmware_force.bin
  294. #
  295. # Lerdge S with USB Flash Drive Support
  296. #
  297. [env:LERDGES_usb_flash_drive]
  298. platform = ${env:LERDGES.platform}
  299. extends = env:LERDGES
  300. platform_packages = ${stm_flash_drive.platform_packages}
  301. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  302. #
  303. # Lerdge K
  304. #
  305. [env:LERDGEK]
  306. platform = ${lerdge_common.platform}
  307. extends = lerdge_common
  308. board_build.firmware = Lerdge_K_firmware_force.bin
  309. build_flags = ${lerdge_common.build_flags} -DLERDGEK
  310. #
  311. # Lerdge K with USB Flash Drive Support
  312. #
  313. [env:LERDGEK_usb_flash_drive]
  314. platform = ${env:LERDGEK.platform}
  315. extends = env:LERDGEK
  316. platform_packages = ${stm_flash_drive.platform_packages}
  317. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  318. #
  319. # RUMBA32
  320. #
  321. [env:rumba32]
  322. platform = ${common_stm32.platform}
  323. extends = common_stm32
  324. build_flags = ${common_stm32.build_flags}
  325. -Os
  326. -DHAL_PCD_MODULE_ENABLED
  327. -DDISABLE_GENERIC_SERIALUSB
  328. -DHAL_UART_MODULE_ENABLED
  329. -DTIMER_SERIAL=TIM9
  330. board = rumba32_f446ve
  331. upload_protocol = dfu
  332. monitor_speed = 500000
  333. board_build.core = stm32
  334. board_build.variant = MARLIN_F446VE
  335. board_build.ldscript = ldscript.ld
  336. board_build.offset = 0x0000
  337. board_build.encrypt = No
  338. board_build.firmware = firmware.bin
  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. # MKS Robin Pro V2
  344. #
  345. [env:mks_robin_pro2]
  346. platform = ${common_stm32.platform}
  347. platform_packages = ${stm_flash_drive.platform_packages}
  348. extends = common_stm32
  349. build_flags = ${stm_flash_drive.build_flags}
  350. board = genericSTM32F407VET6
  351. board_build.core = stm32
  352. board_build.variant = MARLIN_F4x7Vx
  353. board_build.ldscript = ldscript.ld
  354. board_build.firmware = firmware.bin
  355. board_build.offset = 0x0000
  356. board_upload.offset_address = 0x08000000
  357. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  358. debug_tool = jlink
  359. upload_protocol = jlink
  360. extra_scripts = ${common.extra_scripts}
  361. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  362. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  363. #
  364. # This SPI is used by Robin Nano V3
  365. #
  366. [stm32f4_I2C1]
  367. build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
  368. #
  369. # MKS Robin Nano V3
  370. #
  371. [env:mks_robin_nano_v3]
  372. platform = ${common_stm32.platform}
  373. extends = common_stm32
  374. build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC
  375. board = marlin_STM32F407VGT6_CCM
  376. board_build.core = stm32
  377. board_build.variant = MARLIN_F4x7Vx
  378. board_build.ldscript = ldscript.ld
  379. board_build.firmware = Robin_nano_v3.bin
  380. board_build.offset = 0xC000
  381. board_upload.offset_address = 0x0800C000
  382. build_unflags = ${common_stm32.build_unflags}
  383. debug_tool = jlink
  384. upload_protocol = jlink
  385. extra_scripts = ${common.extra_scripts}
  386. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  387. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  388. #
  389. # MKS Robin Nano V3 with USB Flash Drive Support
  390. # Currently, using a STM32duino fork, until USB Host get merged
  391. #
  392. [env:mks_robin_nano_v3_usb_flash_drive]
  393. extends = env:mks_robin_nano_v3
  394. platform_packages = ${stm_flash_drive.platform_packages}
  395. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  396. -DUSBCON
  397. -DUSE_USBHOST_HS
  398. -DUSBD_IRQ_PRIO=5
  399. -DUSBD_IRQ_SUBPRIO=6
  400. -DUSE_USB_HS_IN_FS
  401. -DUSBD_USE_CDC
  402. #
  403. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  404. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  405. #
  406. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  407. platform = ${common_stm32.platform}
  408. extends = env:mks_robin_nano_v3
  409. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip
  410. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  411. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  412. -DUSBCON
  413. -DUSE_USBHOST_HS
  414. -DUSBD_IRQ_PRIO=5
  415. -DUSBD_IRQ_SUBPRIO=6
  416. -DUSE_USB_HS_IN_FS
  417. -DUSBD_USE_CDC_MSC