stm32f4.ini 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  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 (0:M0, 1-2:M3, 3-4:M4, 7:M7)
  13. # 01 : Line/Features
  14. # R : 64 or 66 pins (T:36, C:48 or 49, M:81, V:100, Z:144, I:176)
  15. # G : 1024KB Flash-memory (B:128KB, 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. extends = common_stm32
  25. board = armed_v1
  26. build_flags = ${common_stm32.build_flags}
  27. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
  28. #
  29. # STM32F401RC
  30. #
  31. [env:FYSETC_CHEETAH_V20]
  32. extends = stm32_variant
  33. board = marlin_FYSETC_CHEETAH_V20
  34. board_build.offset = 0x8000
  35. build_flags = ${stm32_variant.build_flags} -DSTM32F401xC
  36. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  37. #
  38. # FLYF407ZG
  39. #
  40. [env:FLYF407ZG]
  41. extends = stm32_variant
  42. board = marlin_STM32F407ZGT6
  43. board_build.variant = MARLIN_FLY_F407ZG
  44. board_build.offset = 0x8000
  45. upload_protocol = dfu
  46. #
  47. # FYSETC S6 (STM32F446RET6 ARM Cortex-M4)
  48. #
  49. [env:FYSETC_S6]
  50. extends = stm32_variant
  51. board = marlin_fysetc_s6
  52. board_build.offset = 0x10000
  53. board_upload.offset_address = 0x08010000
  54. build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED
  55. debug_tool = stlink
  56. upload_protocol = dfu
  57. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  58. #
  59. # FYSETC S6 new bootloader
  60. #
  61. [env:FYSETC_S6_8000]
  62. extends = env:FYSETC_S6
  63. board = marlin_fysetc_s6
  64. board_build.offset = 0x8000
  65. board_upload.offset_address = 0x08008000
  66. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  67. #
  68. # FYSETC SPIDER KING407 (STM32F407ZGT6 ARM Cortex-M4)
  69. #
  70. [env:FYSETC_SPIDER_KING407]
  71. extends = stm32_variant
  72. board = marlin_STM32F407ZGT6
  73. board_build.variant = MARLIN_FYSETC_SPIDER_KING407
  74. board_build.offset = 0x8000
  75. upload_protocol = dfu
  76. #
  77. # STM32F407VET6 with RAMPS-like shield
  78. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  79. # Shield - https://github.com/jmz52/Hardware
  80. #
  81. [env:STM32F407VE_black]
  82. extends = stm32_variant
  83. board = marlin_blackSTM32F407VET6
  84. build_flags = ${stm32_variant.build_flags}
  85. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  86. #
  87. # STM32F407VET6 Opulo Lumen REV3
  88. #
  89. [env:Opulo_Lumen_REV3]
  90. extends = stm32_variant
  91. board = marlin_opulo_lumen_rev3
  92. build_flags = ${stm32_variant.build_flags}
  93. -DARDUINO_BLACK_F407VE
  94. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  95. extra_scripts = ${stm32_variant.extra_scripts}
  96. #
  97. # STM32F407VET6 Opulo Lumen REV4
  98. #
  99. [env:Opulo_Lumen_REV4]
  100. extends = stm32_variant
  101. board = marlin_opulo_lumen_rev4
  102. build_flags = ${stm32_variant.build_flags}
  103. -DARDUINO_BLACK_F407VE
  104. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  105. extra_scripts = ${stm32_variant.extra_scripts}
  106. #
  107. # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
  108. #
  109. [Anet_ET4]
  110. extends = stm32_variant
  111. board = marlin_STM32F407VGT6_CCM
  112. board_build.variant = MARLIN_F4x7Vx
  113. build_flags = ${stm32_variant.build_flags}
  114. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  115. build_unflags = ${stm32_variant.build_unflags}
  116. -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  117. #
  118. # Anet ET4 directly flashed via ST-Link
  119. #
  120. [env:Anet_ET4_no_bootloader]
  121. extends = Anet_ET4
  122. debug_tool = stlink
  123. upload_protocol = stlink
  124. #
  125. # Anet ET4 with OpenBLT from https://github.com/davidtgbe/openblt/releases
  126. #
  127. [env:Anet_ET4_OpenBLT]
  128. extends = Anet_ET4
  129. board_build.encode = firmware.srec
  130. board_build.offset = 0x10000
  131. board_upload.offset_address = 0x08010000
  132. extra_scripts = ${stm32_variant.extra_scripts}
  133. buildroot/share/PlatformIO/scripts/openblt.py
  134. #
  135. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  136. #
  137. [env:BIGTREE_SKR_PRO]
  138. extends = stm32_variant
  139. board = marlin_BigTree_SKR_Pro
  140. board_build.offset = 0x8000
  141. build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX
  142. debug_tool = stlink
  143. upload_protocol = stlink
  144. #
  145. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  146. #
  147. [env:BIGTREE_SKR_PRO_usb_flash_drive]
  148. extends = env:BIGTREE_SKR_PRO
  149. platform_packages = ${stm_flash_drive.platform_packages}
  150. build_flags = ${stm_flash_drive.build_flags} -DSTM32F407_5ZX
  151. build_unflags = ${env:BIGTREE_SKR_PRO.build_unflags} -DUSBCON -DUSBD_USE_CDC
  152. #
  153. # BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4)
  154. #
  155. [env:BIGTREE_E3_RRF]
  156. extends = stm32_variant
  157. board = marlin_STM32F407VGT6_CCM
  158. board_build.variant = MARLIN_BIGTREE_E3_RRF
  159. board_build.offset = 0x8000
  160. build_flags = ${stm32_variant.build_flags}
  161. -DSTM32F407_5VX
  162. -DMF_RX_BUFFER_SIZE=255
  163. -DMF_TX_BUFFER_SIZE=255
  164. #
  165. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  166. #
  167. [env:BIGTREE_GTR_V1_0]
  168. extends = stm32_variant
  169. board = marlin_BigTree_GTR_v1
  170. board_build.offset = 0x8000
  171. build_flags = ${stm32_variant.build_flags} -DSTM32F407IX
  172. #
  173. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support
  174. #
  175. [env:BIGTREE_GTR_V1_0_usb_flash_drive]
  176. extends = env:BIGTREE_GTR_V1_0
  177. platform_packages = ${stm_flash_drive.platform_packages}
  178. build_flags = ${stm_flash_drive.build_flags} -DSTM32F407IX
  179. build_unflags = ${env:BIGTREE_GTR_V1_0.build_unflags} -DUSBCON -DUSBD_USE_CDC
  180. #
  181. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  182. #
  183. [env:BIGTREE_BTT002]
  184. extends = stm32_variant
  185. board = marlin_BigTree_BTT002
  186. board_build.offset = 0x8000
  187. build_flags = ${stm32_variant.build_flags}
  188. -DSTM32F407_5VX
  189. -DHAVE_HWSERIAL2
  190. -DHAVE_HWSERIAL3
  191. -DPIN_SERIAL2_RX=PD_6
  192. -DPIN_SERIAL2_TX=PD_5
  193. #
  194. # BigTreeTech BTT002 V1.x with 512k of flash (STM32F407VET6 ARM Cortex-M4)
  195. #
  196. [env:BIGTREE_BTT002_VET6]
  197. extends = env:BIGTREE_BTT002
  198. board = marlin_BigTree_BTT002_VET6
  199. #
  200. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support
  201. #
  202. [env:BIGTREE_SKR_2]
  203. extends = stm32_variant
  204. platform_packages = ${stm_flash_drive.platform_packages}
  205. board = marlin_STM32F407VGT6_CCM
  206. board_build.variant = MARLIN_F4x7Vx
  207. board_build.offset = 0x8000
  208. board_upload.offset_address = 0x08008000
  209. build_flags = ${stm_flash_drive.build_flags}
  210. -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS
  211. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  212. -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
  213. -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8
  214. upload_protocol = stlink
  215. #
  216. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support
  217. #
  218. [env:BIGTREE_SKR_2_USB]
  219. extends = env:BIGTREE_SKR_2
  220. build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC
  221. build_unflags = ${env:BIGTREE_SKR_2.build_unflags} -DUSBD_USE_CDC
  222. [env:BIGTREE_SKR_2_USB_debug]
  223. extends = env:BIGTREE_SKR_2_USB
  224. build_flags = ${env:BIGTREE_SKR_2_USB.build_flags} -O0
  225. build_unflags = ${env:BIGTREE_SKR_2_USB.build_unflags} -Os -NDEBUG
  226. #
  227. # Bigtreetech SKR V2.0 F429 (STM32F429VGT6 ARM Cortex-M4) with USB Flash Drive Support
  228. #
  229. [env:BIGTREE_SKR_2_F429]
  230. extends = env:BIGTREE_SKR_2
  231. board = marlin_STM32F429VGT6
  232. #
  233. # BigTreeTech SKR V2.0 F429 (STM32F429VGT6 ARM Cortex-M4) with USB Media Share Support
  234. #
  235. [env:BIGTREE_SKR_2_F429_USB]
  236. extends = env:BIGTREE_SKR_2_F429
  237. build_flags = ${env:BIGTREE_SKR_2_F429.build_flags} -DUSBD_USE_CDC_MSC
  238. build_unflags = ${env:BIGTREE_SKR_2_F429.build_unflags} -DUSBD_USE_CDC
  239. [env:BIGTREE_SKR_2_F429_USB_debug]
  240. extends = env:BIGTREE_SKR_2_F429_USB
  241. build_flags = ${env:BIGTREE_SKR_2_F429_USB.build_flags} -O0
  242. build_unflags = ${env:BIGTREE_SKR_2_F429_USB.build_unflags} -Os -NDEBUG
  243. #
  244. # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4)
  245. #
  246. [env:STM32F446ZE_btt]
  247. extends = stm32_variant
  248. board = marlin_BigTree_Octopus_v1
  249. board_build.offset = 0x8000
  250. board_upload.offset_address = 0x08008000
  251. debug_tool = stlink
  252. upload_protocol = stlink
  253. build_flags = ${stm32_variant.build_flags}
  254. -DSTM32F446_5VX -DUSE_USB_HS_IN_FS
  255. #
  256. # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
  257. #
  258. [env:STM32F446ZE_btt_USB]
  259. extends = env:STM32F446ZE_btt
  260. platform_packages = ${stm_flash_drive.platform_packages}
  261. build_unflags = -DUSBD_USE_CDC
  262. build_flags = ${stm_flash_drive.build_flags}
  263. -DSTM32F446_5VX -DUSE_USB_HS_IN_FS
  264. -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5
  265. -DUSBD_IRQ_SUBPRIO=6
  266. -DUSBD_USE_CDC_MSC
  267. #
  268. # BigTreeTech Octopus V1.1 / Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4)
  269. #
  270. [env:STM32F429ZG_btt]
  271. extends = stm32_variant
  272. board = marlin_BigTree_Octopus_Pro_v1_F429
  273. board_build.offset = 0x8000
  274. board_upload.offset_address = 0x08008000
  275. debug_tool = stlink
  276. upload_protocol = stlink
  277. build_flags = ${stm32_variant.build_flags}
  278. -DUSE_USB_HS_IN_FS
  279. #
  280. # BigTreeTech Octopus V1.1 / Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  281. #
  282. [env:STM32F429ZG_btt_USB]
  283. extends = env:STM32F429ZG_btt
  284. platform_packages = ${stm_flash_drive.platform_packages}
  285. build_unflags = -DUSBD_USE_CDC
  286. build_flags = ${stm_flash_drive.build_flags}
  287. -DUSE_USB_HS_IN_FS -DUSE_USBHOST_HS
  288. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  289. -DUSBD_USE_CDC_MSC
  290. #
  291. # BigTreeTech Octopus / Octopus Pro (STM32F407ZET6 ARM Cortex-M4)
  292. #
  293. [env:STM32F407ZE_btt]
  294. extends = stm32_variant
  295. board = marlin_STM32F407ZE
  296. board_build.offset = 0x8000
  297. build_flags = ${stm32_variant.build_flags}
  298. -DUSE_USB_HS_IN_FS
  299. #
  300. # BigTreeTech Octopus / Octopus Pro (STM32F407ZET6 ARM Cortex-M4) with USB Flash Drive Support
  301. #
  302. [env:STM32F407ZE_btt_USB]
  303. extends = env:STM32F407ZE_btt
  304. platform_packages = ${stm_flash_drive.platform_packages}
  305. build_unflags = -DUSBD_USE_CDC
  306. build_flags = ${stm_flash_drive.build_flags}
  307. -DUSE_USB_HS_IN_FS -DUSE_USBHOST_HS
  308. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  309. -DUSBD_USE_CDC_MSC
  310. #
  311. # Lerdge base
  312. #
  313. [lerdge_common]
  314. extends = stm32_variant
  315. board = marlin_STM32F407ZGT6
  316. board_build.variant = MARLIN_LERDGE
  317. board_build.crypt_lerdge = firmware.bin
  318. board_build.offset = 0x10000
  319. build_flags = ${stm32_variant.build_flags}
  320. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  321. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DLERDGE_TFT35
  322. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  323. extra_scripts = ${stm32_variant.extra_scripts}
  324. buildroot/share/PlatformIO/scripts/lerdge.py
  325. #
  326. # Lerdge X (STM32F407VE)
  327. #
  328. [env:LERDGEX]
  329. extends = lerdge_common
  330. board_build.crypt_lerdge = Lerdge_X_firmware_force.bin
  331. #
  332. # Lerdge X with USB Flash Drive Support
  333. #
  334. [env:LERDGEX_usb_flash_drive]
  335. extends = env:LERDGEX
  336. platform_packages = ${stm_flash_drive.platform_packages}
  337. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  338. #
  339. # Lerdge S (STM32F407ZG)
  340. #
  341. [env:LERDGES]
  342. extends = lerdge_common
  343. board_build.crypt_lerdge = Lerdge_firmware_force.bin
  344. #
  345. # Lerdge S with USB Flash Drive Support
  346. #
  347. [env:LERDGES_usb_flash_drive]
  348. extends = env:LERDGES
  349. platform_packages = ${stm_flash_drive.platform_packages}
  350. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  351. #
  352. # Lerdge K (STM32F407ZG)
  353. #
  354. [env:LERDGEK]
  355. extends = lerdge_common
  356. board_build.crypt_lerdge = Lerdge_K_firmware_force.bin
  357. build_flags = ${lerdge_common.build_flags} -DLERDGEK
  358. #
  359. # Lerdge K with USB Flash Drive Support
  360. #
  361. [env:LERDGEK_usb_flash_drive]
  362. extends = env:LERDGEK
  363. platform_packages = ${stm_flash_drive.platform_packages}
  364. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  365. #
  366. # RUMBA32
  367. #
  368. [env:rumba32]
  369. extends = stm32_variant
  370. board = rumba32_f446ve
  371. board_build.variant = MARLIN_F446VE
  372. board_build.offset = 0x0000
  373. build_flags = ${stm32_variant.build_flags}
  374. -Os -DHAL_PCD_MODULE_ENABLED
  375. -DDISABLE_GENERIC_SERIALUSB
  376. -DHAL_UART_MODULE_ENABLED
  377. -DTIMER_SERIAL=TIM9
  378. monitor_speed = 500000
  379. upload_protocol = dfu
  380. #
  381. # STM32F407ZET6 ARM Cortex-M4
  382. #
  383. [env:mks_robin2]
  384. extends = stm32_variant
  385. board = marlin_MKS_ROBIN2
  386. board_build.offset = 0xC000
  387. board_upload.offset_address = 0x0800C000
  388. board_build.encrypt_mks = Robin2.bin
  389. build_flags = ${stm32_variant.build_flags}
  390. -DTARGET_STM32F4 -DSTM32F407_5ZX
  391. -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSBD_PID=0x3748 -DUSB_PRODUCT=\"MKS_Robin2\"
  392. #
  393. # MKS Robin Pro V2 (No bootloader!)
  394. #
  395. [env:mks_robin_pro2]
  396. extends = stm32_variant
  397. platform_packages = ${stm_flash_drive.platform_packages}
  398. board = genericSTM32F407VET6
  399. board_build.variant = MARLIN_F4x7Vx
  400. board_build.offset = 0x0000
  401. board_upload.offset_address = 0x08000000
  402. build_flags = ${stm_flash_drive.build_flags}
  403. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  404. debug_tool = jlink
  405. upload_protocol = jlink
  406. #
  407. # This I2C1(PB6:I2C1_SCL PB7:I2C1_SDA) is used by Robin Nano V3
  408. #
  409. [stm32f4_I2C1]
  410. build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
  411. #
  412. # MKS Robin Nano V3
  413. #
  414. [env:mks_robin_nano_v3]
  415. extends = stm32_variant
  416. board = marlin_STM32F407VGT6_CCM
  417. board_build.variant = MARLIN_F4x7Vx
  418. board_build.offset = 0xC000
  419. board_upload.offset_address = 0x0800C000
  420. board_build.rename = Robin_nano_v3.bin
  421. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
  422. -DHAL_PCD_MODULE_ENABLED
  423. debug_tool = jlink
  424. upload_protocol = jlink
  425. #
  426. # MKS Robin Nano V3 with USB Flash Drive Support
  427. # Currently, using a STM32duino fork, until USB Host get merged
  428. #
  429. [env:mks_robin_nano_v3_usb_flash_drive]
  430. extends = env:mks_robin_nano_v3
  431. platform_packages = ${stm_flash_drive.platform_packages}
  432. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  433. -DUSE_USBHOST_HS
  434. -DUSBD_IRQ_PRIO=5
  435. -DUSBD_IRQ_SUBPRIO=6
  436. -DUSE_USB_HS_IN_FS
  437. #
  438. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  439. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  440. #
  441. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  442. extends = env:mks_robin_nano_v3_usb_flash_drive
  443. build_flags = ${env:mks_robin_nano_v3_usb_flash_drive.build_flags}
  444. -DUSBD_USE_CDC_MSC
  445. build_unflags = -DUSBD_USE_CDC
  446. #
  447. # MKS Robin Nano V3_1
  448. #
  449. [env:mks_robin_nano_v3_1]
  450. extends = env:mks_robin_nano_v3
  451. board = marlin_STM32F407VET6_CCM
  452. #
  453. # MKS Robin Nano V3.1 with USB Flash Drive Support
  454. # Currently, using a STM32duino fork, until USB Host get merged
  455. #
  456. [env:mks_robin_nano_v3_1_usb_flash_drive]
  457. extends = env:mks_robin_nano_v3_usb_flash_drive
  458. board = marlin_STM32F407VET6_CCM
  459. #
  460. # MKS Robin Nano V3.1 with USB Flash Drive Support and Shared Media
  461. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  462. #
  463. [env:mks_robin_nano_v3_1_usb_flash_drive_msc]
  464. extends = env:mks_robin_nano_v3_usb_flash_drive_msc
  465. board = marlin_STM32F407VET6_CCM
  466. #
  467. # MKS Eagle
  468. # 5 TMC2209 uart mode on board
  469. #
  470. [env:mks_eagle]
  471. extends = stm32_variant
  472. board = marlin_STM32F407VGT6_CCM
  473. board_build.variant = MARLIN_F4x7Vx
  474. board_build.offset = 0xC000
  475. board_upload.offset_address = 0x0800C000
  476. board_build.rename = mks_eagle.bin
  477. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
  478. -DHAL_PCD_MODULE_ENABLED
  479. -DSTM32_FLASH_SIZE=512
  480. debug_tool = jlink
  481. upload_protocol = jlink
  482. #
  483. # MKS Eagle with USB Flash Drive Support
  484. # Currently, using a STM32duino fork, until USB Host get merged
  485. #
  486. [env:mks_eagle_usb_flash_drive]
  487. extends = env:mks_eagle
  488. platform_packages = ${stm_flash_drive.platform_packages}
  489. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  490. -DUSE_USBHOST_HS
  491. -DUSBD_IRQ_PRIO=5
  492. -DUSBD_IRQ_SUBPRIO=6
  493. -DUSE_USB_HS_IN_FS
  494. #
  495. # MKS Eagle with USB Flash Drive Support and Shared Media
  496. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  497. #
  498. [env:mks_eagle_usb_flash_drive_msc]
  499. extends = env:mks_eagle_usb_flash_drive
  500. build_flags = ${env:mks_eagle_usb_flash_drive.build_flags}
  501. -DUSBD_USE_CDC_MSC
  502. build_unflags = -DUSBD_USE_CDC
  503. #
  504. # This I2C1(PB8:I2C1_SCL PB9:I2C1_SDA) is used by MKS Monster8
  505. #
  506. [stm32f4_I2C1_CAN]
  507. build_flags = -DPIN_WIRE_SCL=PB8 -DPIN_WIRE_SDA=PB9
  508. #
  509. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4)
  510. #
  511. [env:mks_monster8]
  512. extends = stm32_variant
  513. board = marlin_STM32F407VGT6_CCM
  514. board_build.variant = MARLIN_F4x7Vx
  515. board_build.offset = 0xC000
  516. board_upload.offset_address = 0x0800C000
  517. board_build.rename = mks_monster8.bin
  518. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1_CAN.build_flags}
  519. -DHAL_PCD_MODULE_ENABLED -DTIMER_SERIAL=TIM4
  520. -DSTM32_FLASH_SIZE=512
  521. debug_tool = jlink
  522. upload_protocol = jlink
  523. #
  524. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4) with USB Flash Drive Support
  525. # Currently, using a STM32duino fork, until USB Host get merged
  526. #
  527. [env:mks_monster8_usb_flash_drive]
  528. extends = env:mks_monster8
  529. platform_packages = ${stm_flash_drive.platform_packages}
  530. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1_CAN.build_flags}
  531. -DUSE_USBHOST_HS
  532. -DUSBD_IRQ_PRIO=5
  533. -DUSBD_IRQ_SUBPRIO=6
  534. -DUSE_USB_HS_IN_FS
  535. #
  536. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4) with USB Flash Drive Support and Shared Media
  537. # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged
  538. #
  539. [env:mks_monster8_usb_flash_drive_msc]
  540. extends = env:mks_monster8_usb_flash_drive
  541. build_flags = ${env:mks_monster8_usb_flash_drive.build_flags}
  542. -DUSBD_USE_CDC_MSC
  543. build_unflags = -DUSBD_USE_CDC
  544. #
  545. # TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
  546. #
  547. [TH3D_EZBoard_V2]
  548. extends = stm32_variant
  549. board = genericSTM32F405RG
  550. board_build.variant = MARLIN_TH3D_EZBOARD_V2
  551. build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0
  552. #
  553. # TH3D EZBoard v2.0 directly flashed via ST-Link
  554. #
  555. [env:TH3D_EZBoard_V2_no_bootloader]
  556. extends = TH3D_EZBoard_V2
  557. debug_tool = stlink
  558. upload_protocol = stlink
  559. #
  560. # TH3D EZBoard v2.0 with OpenBLT from https://github.com/rhapsodyv/OpenBLT-STM32
  561. #
  562. [env:TH3D_EZBoard_V2_OpenBLT]
  563. extends = TH3D_EZBoard_V2
  564. board_build.encode = firmware.bin
  565. board_build.offset = 0xC000
  566. board_upload.offset_address = 0x0800C000
  567. extra_scripts = ${stm32_variant.extra_scripts}
  568. buildroot/share/PlatformIO/scripts/openblt.py
  569. [mks_robin_nano_v1_3_f4_common]
  570. extends = stm32_variant
  571. board = marlin_STM32F407VGT6_CCM
  572. board_build.variant = MARLIN_F4x7Vx
  573. board_build.offset = 0x8000
  574. board_upload.offset_address = 0x08008000
  575. board_build.rename = Robin_nano35.bin
  576. debug_tool = jlink
  577. upload_protocol = jlink
  578. #
  579. # BOARD_MKS_ROBIN_NANO_V1_3_F4
  580. # - MKS Robin Nano V1.3 (STM32F407VET6, 5 Pololu Plug)
  581. # - MKS Robin Nano-S V1.3 (STM32F407VET6, 4 TMC2225, 1 Pololu Plug)
  582. # - ZNP Robin Nano V1.3 (STM32F407VET6, 2 TMC2208, 2 A4988, 1x Polulu plug)
  583. #
  584. [env:mks_robin_nano_v1_3_f4]
  585. extends = mks_robin_nano_v1_3_f4_common
  586. build_flags = ${stm32_variant.build_flags}
  587. -DMCU_STM32F407VE -DENABLE_HWSERIAL3 -DSTM32_FLASH_SIZE=512
  588. -DTIMER_SERVO=TIM2 -DTIMER_TONE=TIM3 -DSS_TIMER=4
  589. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  590. build_unflags = ${stm32_variant.build_unflags}
  591. -DUSBCON -DUSBD_USE_CDC
  592. #
  593. # MKS/ZNP Robin Nano V1.3 with native USB mod
  594. #
  595. [env:mks_robin_nano_v1_3_f4_usbmod]
  596. extends = mks_robin_nano_v1_3_f4_common
  597. build_flags = ${stm32_variant.build_flags}
  598. -DMCU_STM32F407VE -DSTM32_FLASH_SIZE=512
  599. -DTIMER_SERVO=TIM2 -DTIMER_TONE=TIM3 -DSS_TIMER=4
  600. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  601. #
  602. # Artillery Ruby
  603. #
  604. [env:Artillery_Ruby]
  605. extends = common_stm32
  606. board = marlin_Artillery_Ruby
  607. build_flags = ${common_stm32.build_flags}
  608. -DSTM32F401xC -DTARGET_STM32F4 -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32
  609. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  610. -DUSB_PRODUCT=\"Artillery_3D_Printer\"
  611. -DFLASH_DATA_SECTOR=1U -DFLASH_BASE_ADDRESS=0x08004000
  612. extra_scripts = ${common_stm32.extra_scripts}
  613. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  614. #
  615. # Ender-3 S1 STM32F401RC_creality
  616. #
  617. [env:STM32F401RC_creality]
  618. extends = stm32_variant
  619. board = genericSTM32F401RC
  620. board_build.variant = MARLIN_CREALITY_STM32F401RC
  621. board_build.offset = 0x10000
  622. board_upload.offset_address = 0x08010000
  623. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RC -DSTM32F4
  624. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  625. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  626. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  627. extra_scripts = ${stm32_variant.extra_scripts}
  628. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  629. monitor_speed = 115200
  630. [env:STM32F401RC_creality_jlink]
  631. extends = env:STM32F401RC_creality
  632. debug_tool = jlink
  633. upload_protocol = jlink
  634. [env:STM32F401RC_creality_stlink]
  635. extends = env:STM32F401RC_creality
  636. debug_tool = stlink
  637. upload_protocol = stlink
  638. #
  639. # BigTree SKR mini E3 V3.0.1 (STM32F401RCT6 ARM Cortex-M4)
  640. #
  641. [env:STM32F401RC_btt]
  642. extends = stm32_variant
  643. platform = ststm32@~14.1.0
  644. platform_packages = framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/main.zip
  645. board = marlin_STM32F401RC
  646. board_build.offset = 0x4000
  647. board_upload.offset_address = 0x08004000
  648. build_flags = ${stm32_variant.build_flags}
  649. -DPIN_SERIAL6_RX=PC_7 -DPIN_SERIAL6_TX=PC_6
  650. -DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024
  651. -DTIMER_SERVO=TIM3 -DTIMER_TONE=TIM4
  652. -DSTEP_TIMER_IRQ_PRIO=0
  653. upload_protocol = stlink
  654. debug_tool = stlink
  655. #
  656. # MKS SKIPR v1.0 all-in-one board (STM32F407VE)
  657. #
  658. [env:mks_skipr_v1]
  659. extends = stm32_variant
  660. board = marlin_MKS_SKIPR_V1
  661. board_build.rename = mks_skipr.bin
  662. [env:mks_skipr_v1_nobootloader]
  663. extends = env:mks_skipr_v1
  664. board_build.rename = firmware.bin
  665. board_build.offset = 0x0000
  666. board_upload.offset_address = 0x08000000
  667. upload_protocol = dfu
  668. upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE"
  669. #
  670. # STM32F446ZET6 ARM Cortex-M4
  671. #
  672. [env:STM32F446_tronxy]
  673. extends = stm32_variant
  674. board = marlin_STM32F446ZET_tronxy
  675. board_build.offset = 0x10000
  676. board_build.rename = fmw_tronxy.bin
  677. build_flags = ${stm32_variant.build_flags}
  678. -DSTM32F4xx
  679. build_unflags = ${stm32_variant.build_unflags} -fno-rtti
  680. -DUSBCON -DUSBD_USE_CDC