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

stm32f4.ini 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  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 = 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. buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py
  43. #
  44. # STM32F401RC
  45. #
  46. [env:FYSETC_CHEETAH_V20]
  47. platform = ${common_stm32.platform}
  48. extends = common_stm32
  49. board = FYSETC_CHEETAH_V20
  50. build_flags = ${common_stm32.build_flags} -DSTM32F401xC -DVECT_TAB_OFFSET=0xC000
  51. extra_scripts = ${common.extra_scripts}
  52. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  53. buildroot/share/PlatformIO/scripts/FYSETC_CHEETAH_V20.py
  54. #
  55. # FLYF407ZG
  56. #
  57. [env:FLYF407ZG]
  58. platform = ${common_stm32.platform}
  59. extends = common_stm32
  60. board = FLYF407ZG
  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. extra_scripts = ${common_stm32f1.extra_scripts}
  73. buildroot/share/PlatformIO/scripts/fly_mini.py
  74. build_flags = ${common_stm32f1.build_flags}
  75. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  76. #
  77. # FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
  78. #
  79. [env:FYSETC_S6]
  80. platform = ${common_stm32.platform}
  81. extends = common_stm32
  82. platform_packages = tool-stm32duino
  83. board = marlin_fysetc_s6
  84. build_flags = ${common_stm32.build_flags}
  85. -DVECT_TAB_OFFSET=0x10000
  86. -DHAL_PCD_MODULE_ENABLED
  87. extra_scripts = ${common.extra_scripts}
  88. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  89. debug_tool = stlink
  90. upload_protocol = dfu
  91. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  92. #
  93. # STM32F407VET6 with RAMPS-like shield
  94. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  95. # Shield - https://github.com/jmz52/Hardware
  96. #
  97. [env:STM32F407VE_black]
  98. platform = ${common_stm32.platform}
  99. extends = common_stm32
  100. board = blackSTM32F407VET6
  101. build_flags = ${common_stm32.build_flags}
  102. -DARDUINO_BLACK_F407VE
  103. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  104. extra_scripts = ${common.extra_scripts}
  105. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  106. #
  107. # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
  108. # For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases
  109. # Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000.
  110. #
  111. [env:Anet_ET4_OpenBLT]
  112. platform = ${common_stm32.platform}
  113. extends = common_stm32
  114. build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  115. board = genericSTM32F407VGT6
  116. board_build.core = stm32
  117. board_build.variant = MARLIN_F4x7Vx
  118. board_build.ldscript = ldscript.ld
  119. board_build.firmware = firmware.srec
  120. # Just openblt.py (not stm32_bootloader.py) generates the file
  121. board_build.encrypt = Yes
  122. board_build.offset = 0x10000
  123. board_upload.offset_address = 0x08010000
  124. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  125. debug_tool = jlink
  126. upload_protocol = jlink
  127. extra_scripts = ${common.extra_scripts}
  128. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  129. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  130. buildroot/share/PlatformIO/scripts/openblt.py
  131. #
  132. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  133. #
  134. [env:BIGTREE_SKR_PRO]
  135. platform = ${common_stm32.platform}
  136. extends = common_stm32
  137. board = BigTree_SKR_Pro
  138. build_flags = ${common_stm32.build_flags}
  139. -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  140. extra_scripts = ${common.extra_scripts}
  141. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  142. #upload_protocol = stlink
  143. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  144. debug_tool = stlink
  145. debug_init_break =
  146. #
  147. # USB Flash Drive mix-ins for STM32
  148. #
  149. [stm_flash_drive]
  150. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc.zip
  151. build_flags = ${common_stm32.build_flags}
  152. -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED
  153. -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4
  154. #
  155. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  156. #
  157. [env:BIGTREE_SKR_PRO_usb_flash_drive]
  158. extends = env:BIGTREE_SKR_PRO
  159. platform_packages = ${stm_flash_drive.platform_packages}
  160. build_unflags = -DUSBCON -DUSBD_USE_CDC
  161. build_flags = ${stm_flash_drive.build_flags}
  162. -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  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 = 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 = 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. # Lerdge base
  200. #
  201. [lerdge_common]
  202. platform = ${common_stm32.platform}
  203. extends = common_stm32
  204. board = LERDGE
  205. board_build.offset = 0x10000
  206. board_build.encrypt = Yes
  207. extra_scripts = ${common.extra_scripts}
  208. pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
  209. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  210. buildroot/share/PlatformIO/scripts/lerdge.py
  211. build_flags = ${common_stm32.build_flags}
  212. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  213. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  214. -DHAL_SRAM_MODULE_ENABLED
  215. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  216. #
  217. # Lerdge X
  218. #
  219. [env:LERDGEX]
  220. platform = ${lerdge_common.platform}
  221. extends = lerdge_common
  222. board_build.firmware = Lerdge_X_firmware_force.bin
  223. #
  224. # Lerdge X with USB Flash Drive Support
  225. #
  226. [env:LERDGEX_usb_flash_drive]
  227. platform = ${env:LERDGEX.platform}
  228. extends = env:LERDGEX
  229. platform_packages = ${stm_flash_drive.platform_packages}
  230. build_flags = ${stm_flash_drive.build_flags}
  231. #
  232. # Lerdge S
  233. #
  234. [env:LERDGES]
  235. platform = ${lerdge_common.platform}
  236. extends = lerdge_common
  237. board_build.firmware = Lerdge_firmware_force.bin
  238. #
  239. # Lerdge S with USB Flash Drive Support
  240. #
  241. [env:LERDGES_usb_flash_drive]
  242. platform = ${env:LERDGES.platform}
  243. extends = env:LERDGES
  244. platform_packages = ${stm_flash_drive.platform_packages}
  245. build_flags = ${stm_flash_drive.build_flags}
  246. #
  247. # Lerdge K
  248. #
  249. [env:LERDGEK]
  250. platform = ${lerdge_common.platform}
  251. extends = lerdge_common
  252. board_build.firmware = Lerdge_K_firmware_force.bin
  253. build_flags = ${lerdge_common.build_flags}
  254. -DLERDGEK
  255. #
  256. # Lerdge K with USB Flash Drive Support
  257. #
  258. [env:LERDGEK_usb_flash_drive]
  259. platform = ${env:LERDGEK.platform}
  260. extends = env:LERDGEK
  261. platform_packages = ${stm_flash_drive.platform_packages}
  262. build_flags = ${stm_flash_drive.build_flags}
  263. #
  264. # RUMBA32
  265. #
  266. [env:rumba32]
  267. platform = ${common_stm32.platform}
  268. extends = common_stm32
  269. build_flags = ${common_stm32.build_flags}
  270. -Os
  271. -DHAL_PCD_MODULE_ENABLED
  272. -DDISABLE_GENERIC_SERIALUSB
  273. -DHAL_UART_MODULE_ENABLED
  274. -DTIMER_SERIAL=TIM9
  275. board = rumba32_f446ve
  276. upload_protocol = dfu
  277. monitor_speed = 500000
  278. board_build.core = stm32
  279. board_build.variant = MARLIN_F446VE
  280. board_build.ldscript = ldscript.ld
  281. board_build.offset = 0x0000
  282. board_build.encrypt = No
  283. board_build.firmware = firmware.bin
  284. extra_scripts = ${common.extra_scripts}
  285. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  286. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  287. #
  288. # MKS Robin Pro V2
  289. #
  290. [env:mks_robin_pro2]
  291. platform = ${common_stm32.platform}
  292. platform_packages = ${stm_flash_drive.platform_packages}
  293. extends = common_stm32
  294. build_flags = ${stm_flash_drive.build_flags}
  295. board = genericSTM32F407VET6
  296. board_build.core = stm32
  297. board_build.variant = MARLIN_F4x7Vx
  298. board_build.ldscript = ldscript.ld
  299. board_build.firmware = firmware.bin
  300. board_build.offset = 0x0000
  301. board_upload.offset_address = 0x08000000
  302. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
  303. debug_tool = jlink
  304. upload_protocol = jlink
  305. extra_scripts = ${common.extra_scripts}
  306. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  307. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  308. #
  309. # This SPI is used by Robin Nano V3
  310. #
  311. [stm32f4_I2C1]
  312. build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
  313. #
  314. # MKS Robin Nano V3
  315. #
  316. [env:mks_robin_nano_v3]
  317. platform = ${common_stm32.platform}
  318. extends = common_stm32
  319. build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC
  320. board = genericSTM32F407VGT6
  321. board_build.core = stm32
  322. board_build.variant = MARLIN_F4x7Vx
  323. board_build.ldscript = ldscript.ld
  324. board_build.firmware = Robin_nano_v3.bin
  325. board_build.offset = 0xC000
  326. board_upload.offset_address = 0x0800C000
  327. build_unflags = ${common_stm32.build_unflags}
  328. debug_tool = jlink
  329. upload_protocol = jlink
  330. extra_scripts = ${common.extra_scripts}
  331. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  332. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  333. #
  334. # MKS Robin Nano V3 with USB Flash Drive Support
  335. # Currently, using a STM32duino fork, until USB Host get merged
  336. #
  337. [env:mks_robin_nano_v3_usb_flash_drive]
  338. extends = env:mks_robin_nano_v3
  339. platform_packages = ${stm_flash_drive.platform_packages}
  340. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  341. -DUSBCON
  342. -DUSE_USBHOST_HS
  343. -DUSBD_IRQ_PRIO=5
  344. -DUSBD_IRQ_SUBPRIO=6
  345. -DUSE_USB_HS_IN_FS
  346. -DUSBD_USE_CDC
  347. #
  348. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  349. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  350. #
  351. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  352. platform = ${common_stm32.platform}
  353. extends = env:mks_robin_nano_v3
  354. platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip
  355. build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
  356. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  357. -DUSBCON
  358. -DUSE_USBHOST_HS
  359. -DUSBD_IRQ_PRIO=5
  360. -DUSBD_IRQ_SUBPRIO=6
  361. -DUSE_USB_HS_IN_FS
  362. -DUSBD_USE_CDC_MSC