stm32f4.ini 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941
  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. platform_packages = platformio/tool-dfuutil@~1.11.0
  34. board = marlin_FYSETC_CHEETAH_V20
  35. board_build.offset = 0x8000
  36. board_build.offset_address = 0x08008000
  37. build_flags = ${stm32_variant.build_flags} -DSTM32F401xC
  38. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  39. #
  40. # STM32F446RC nobootloader
  41. #
  42. [env:FYSETC_CHEETAH_V30]
  43. extends = stm32_variant
  44. platform_packages = platformio/tool-dfuutil@~1.11.0
  45. board = marlin_FYSETC_CHEETAH_V30
  46. build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED
  47. debug_tool = stlink
  48. upload_protocol = dfu
  49. upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE"
  50. #
  51. # FLYF407ZG
  52. #
  53. [env:FLYF407ZG]
  54. extends = stm32_variant
  55. platform_packages = platformio/tool-dfuutil@~1.11.0
  56. board = marlin_STM32F407ZGT6
  57. board_build.variant = MARLIN_FLY_F407ZG
  58. board_build.offset = 0x8000
  59. board_build.offset_address = 0x08008000
  60. upload_protocol = dfu
  61. #
  62. # FYSETC S6 (STM32F446RET6 ARM Cortex-M4)
  63. #
  64. [env:FYSETC_S6]
  65. extends = stm32_variant
  66. platform_packages = platformio/tool-dfuutil@~1.11.0
  67. board = marlin_fysetc_s6
  68. board_build.offset = 0x10000
  69. board_upload.offset_address = 0x08010000
  70. build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED
  71. debug_tool = stlink
  72. upload_protocol = dfu
  73. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  74. #
  75. # FYSETC S6 new bootloader
  76. #
  77. [env:FYSETC_S6_8000]
  78. extends = env:FYSETC_S6
  79. board = marlin_fysetc_s6
  80. board_build.offset = 0x8000
  81. board_upload.offset_address = 0x08008000
  82. upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
  83. #
  84. # FYSETC SPIDER KING407 (STM32F407ZGT6 ARM Cortex-M4)
  85. #
  86. [env:FYSETC_SPIDER_KING407]
  87. extends = stm32_variant
  88. platform_packages = platformio/tool-dfuutil@~1.11.0
  89. board = marlin_STM32F407ZGT6
  90. board_build.variant = MARLIN_FYSETC_SPIDER_KING407
  91. board_build.offset = 0x8000
  92. board_build.offset_address = 0x08008000
  93. upload_protocol = dfu
  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. extends = stm32_variant
  101. board = marlin_blackSTM32F407VET6
  102. build_flags = ${stm32_variant.build_flags}
  103. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  104. #
  105. # STM32F407VET6 Opulo Lumen REV3
  106. #
  107. [env:Opulo_Lumen_REV3]
  108. extends = stm32_variant
  109. board = marlin_opulo_lumen_rev3
  110. build_flags = ${stm32_variant.build_flags}
  111. -DARDUINO_BLACK_F407VE
  112. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID
  113. extra_scripts = ${stm32_variant.extra_scripts}
  114. #
  115. # STM32F407VET6 Opulo Lumen REV4
  116. #
  117. [env:Opulo_Lumen_REV4]
  118. extends = stm32_variant
  119. board = marlin_opulo_lumen_rev4
  120. build_flags = ${stm32_variant.build_flags}
  121. -DARDUINO_BLACK_F407VE
  122. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID
  123. extra_scripts = ${stm32_variant.extra_scripts}
  124. #
  125. # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
  126. #
  127. [Anet_ET4]
  128. extends = stm32_variant
  129. board = marlin_STM32F407VGT6_CCM
  130. board_build.variant = MARLIN_F4x7Vx
  131. build_flags = ${stm32_variant.build_flags}
  132. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  133. build_unflags = ${stm32_variant.build_unflags}
  134. -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  135. #
  136. # Anet ET4 directly flashed via ST-Link
  137. #
  138. [env:Anet_ET4_no_bootloader]
  139. extends = Anet_ET4
  140. debug_tool = stlink
  141. upload_protocol = stlink
  142. #
  143. # Anet ET4 with OpenBLT from https://github.com/davidtgbe/openblt/releases
  144. #
  145. [env:Anet_ET4_OpenBLT]
  146. extends = Anet_ET4
  147. board_build.encode = firmware.srec
  148. board_build.offset = 0x10000
  149. board_upload.offset_address = 0x08010000
  150. extra_scripts = ${Anet_ET4.extra_scripts}
  151. buildroot/share/PlatformIO/scripts/openblt.py
  152. #
  153. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  154. #
  155. [env:BTT_SKR_PRO]
  156. extends = stm32_variant
  157. board = marlin_BTT_SKR_Pro
  158. board_build.offset = 0x8000
  159. board_build.offset_address = 0x08008000
  160. build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX
  161. debug_tool = stlink
  162. upload_protocol = stlink
  163. #
  164. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  165. #
  166. [env:BTT_SKR_PRO_usb_flash_drive]
  167. extends = env:BTT_SKR_PRO
  168. platform_packages = ${stm_flash_drive.platform_packages}
  169. build_flags = ${stm_flash_drive.build_flags} -DSTM32F407_5ZX
  170. build_unflags = ${env:BTT_SKR_PRO.build_unflags} -DUSBCON -DUSBD_USE_CDC
  171. #
  172. # BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4)
  173. #
  174. [env:BTT_E3_RRF]
  175. extends = stm32_variant
  176. board = marlin_STM32F407VGT6_CCM
  177. board_build.variant = MARLIN_BTT_E3_RRF
  178. board_build.offset = 0x8000
  179. board_build.offset_address = 0x08008000
  180. build_flags = ${stm32_variant.build_flags}
  181. -DSTM32F407_5VX
  182. -DMF_RX_BUFFER_SIZE=255
  183. -DMF_TX_BUFFER_SIZE=255
  184. #
  185. # Mellow/Fly RRF E3 V1 (STM32F407VGT6 ARM Cortex-M4)
  186. #
  187. [env:FLY_RRF_E3_V1]
  188. extends = stm32_variant
  189. board = marlin_STM32F407VGT6_CCM
  190. #board_build.variant = MARLIN_BTT_E3_RRF
  191. board_build.offset = 0x8000
  192. board_build.offset_address = 0x08008000
  193. build_flags = ${stm32_variant.build_flags}
  194. -DSTM32F407_5VX
  195. -DMF_RX_BUFFER_SIZE=255
  196. -DMF_TX_BUFFER_SIZE=255
  197. #
  198. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  199. #
  200. [env:BTT_GTR_V1_0]
  201. extends = stm32_variant
  202. board = marlin_BTT_GTR_v1
  203. board_build.offset = 0x8000
  204. board_build.offset_address = 0x08008000
  205. build_flags = ${stm32_variant.build_flags} -DSTM32F407IX
  206. #
  207. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support
  208. #
  209. [env:BTT_GTR_V1_0_usb_flash_drive]
  210. extends = env:BTT_GTR_V1_0
  211. platform_packages = ${stm_flash_drive.platform_packages}
  212. build_flags = ${stm_flash_drive.build_flags} -DSTM32F407IX
  213. build_unflags = ${env:BTT_GTR_V1_0.build_unflags} -DUSBCON -DUSBD_USE_CDC
  214. #
  215. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  216. #
  217. [env:BTT_BTT002]
  218. extends = stm32_variant
  219. board = marlin_BTT_BTT002
  220. board_build.offset = 0x8000
  221. board_build.offset_address = 0x08008000
  222. build_flags = ${stm32_variant.build_flags}
  223. -DSTM32F407_5VX
  224. -DHAVE_HWSERIAL2
  225. -DHAVE_HWSERIAL3
  226. -DPIN_SERIAL2_RX=PD_6
  227. -DPIN_SERIAL2_TX=PD_5
  228. #
  229. # BigTreeTech BTT002 V1.x with 512k of flash (STM32F407VET6 ARM Cortex-M4)
  230. #
  231. [env:BTT_BTT002_VET6]
  232. extends = env:BTT_BTT002
  233. board = marlin_BTT_BTT002_VET6
  234. #
  235. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support
  236. #
  237. [env:STM32F407VG_btt]
  238. extends = stm32_variant
  239. platform_packages = ${stm_flash_drive.platform_packages}
  240. board = marlin_STM32F407VGT6_CCM
  241. board_build.variant = MARLIN_F4x7Vx
  242. board_build.offset = 0x8000
  243. board_upload.offset_address = 0x08008000
  244. build_flags = ${stm_flash_drive.build_flags}
  245. -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS
  246. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  247. -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
  248. -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8
  249. upload_protocol = stlink
  250. #
  251. # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support
  252. #
  253. [env:STM32F407VG_btt_USB]
  254. extends = env:STM32F407VG_btt
  255. build_flags = ${env:STM32F407VG_btt.build_flags} -DUSBD_USE_CDC_MSC
  256. build_unflags = ${env:STM32F407VG_btt.build_unflags} -DUSBD_USE_CDC
  257. [env:STM32F407VG_btt_USB_debug]
  258. extends = env:STM32F407VG_btt_USB
  259. build_flags = ${env:STM32F407VG_btt_USB.build_flags} -O0
  260. build_unflags = ${env:STM32F407VG_btt_USB.build_unflags} -Os -NDEBUG
  261. #
  262. # Bigtreetech SKR V2.0 (STM32F429VGT6 ARM Cortex-M4) with USB Flash Drive Support
  263. #
  264. [env:STM32F429VG_btt]
  265. extends = env:STM32F407VG_btt
  266. board = marlin_STM32F429VGT6
  267. #
  268. # BigTreeTech SKR V2.0 (STM32F429VGT6 ARM Cortex-M4) with USB Media Share Support
  269. #
  270. [env:STM32F429VG_btt_USB]
  271. extends = env:STM32F429VG_btt
  272. build_flags = ${env:STM32F429VG_btt.build_flags} -DUSBD_USE_CDC_MSC
  273. build_unflags = ${env:STM32F429VG_btt.build_unflags} -DUSBD_USE_CDC
  274. [env:STM32F429VG_btt_USB_debug]
  275. extends = env:STM32F429VG_btt_USB
  276. build_flags = ${env:STM32F429VG_btt_USB.build_flags} -O0
  277. build_unflags = ${env:STM32F429VG_btt_USB.build_unflags} -Os -NDEBUG
  278. #
  279. # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4)
  280. #
  281. [env:STM32F446ZE_btt]
  282. extends = stm32_variant
  283. board = marlin_BTT_Octopus_v1
  284. board_build.offset = 0x8000
  285. board_upload.offset_address = 0x08008000
  286. debug_tool = stlink
  287. upload_protocol = stlink
  288. build_flags = ${stm32_variant.build_flags}
  289. -DSTM32F446_5VX -DUSE_USB_HS_IN_FS
  290. #
  291. # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
  292. #
  293. [env:STM32F446ZE_btt_usb_flash_drive]
  294. extends = env:STM32F446ZE_btt
  295. platform_packages = ${stm_flash_drive.platform_packages}
  296. build_unflags = -DUSBD_USE_CDC
  297. build_flags = ${stm_flash_drive.build_flags}
  298. -DSTM32F446_5VX -DUSE_USB_HS_IN_FS
  299. -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5
  300. -DUSBD_IRQ_SUBPRIO=6
  301. -DUSBD_USE_CDC_MSC
  302. #
  303. # BigTreeTech Octopus V1.1 / Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4)
  304. #
  305. [env:STM32F429ZG_btt]
  306. extends = stm32_variant
  307. board = marlin_BTT_Octopus_Pro_v1_F429
  308. board_build.offset = 0x8000
  309. board_upload.offset_address = 0x08008000
  310. debug_tool = stlink
  311. upload_protocol = stlink
  312. build_flags = ${stm32_variant.build_flags}
  313. -DUSE_USB_HS_IN_FS
  314. #
  315. # BigTreeTech Octopus V1.1 / Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) with USB Flash Drive Support
  316. #
  317. [env:STM32F429ZG_btt_usb_flash_drive]
  318. extends = env:STM32F429ZG_btt
  319. platform_packages = ${stm_flash_drive.platform_packages}
  320. build_unflags = -DUSBD_USE_CDC
  321. build_flags = ${stm_flash_drive.build_flags}
  322. -DUSE_USB_HS_IN_FS -DUSE_USBHOST_HS
  323. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  324. -DUSBD_USE_CDC_MSC
  325. #
  326. # BigTreeTech Octopus / Octopus Pro (STM32F407ZET6 ARM Cortex-M4)
  327. #
  328. [env:STM32F407ZE_btt]
  329. extends = stm32_variant
  330. board = marlin_STM32F407ZE
  331. board_build.offset = 0x8000
  332. board_build.offset_address = 0x08008000
  333. build_flags = ${stm32_variant.build_flags}
  334. -DUSE_USB_HS_IN_FS
  335. #
  336. # BigTreeTech Octopus / Octopus Pro (STM32F407ZET6 ARM Cortex-M4) with USB Flash Drive Support
  337. #
  338. [env:STM32F407ZE_btt_usb_flash_drive]
  339. extends = env:STM32F407ZE_btt
  340. platform_packages = ${stm_flash_drive.platform_packages}
  341. build_unflags = -DUSBD_USE_CDC
  342. build_flags = ${stm_flash_drive.build_flags}
  343. -DUSE_USB_HS_IN_FS -DUSE_USBHOST_HS
  344. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  345. -DUSBD_USE_CDC_MSC
  346. #
  347. # Lerdge base
  348. #
  349. [lerdge_common]
  350. extends = stm32_variant
  351. board = marlin_STM32F407ZGT6
  352. board_build.variant = MARLIN_LERDGE
  353. board_build.crypt_lerdge = firmware.bin
  354. board_build.offset = 0x10000
  355. board_build.offset_address = 0x08010000
  356. build_flags = ${stm32_variant.build_flags}
  357. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  358. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DLERDGE_TFT35
  359. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  360. extra_scripts = ${stm32_variant.extra_scripts}
  361. buildroot/share/PlatformIO/scripts/lerdge.py
  362. #
  363. # Lerdge X (STM32F407VE)
  364. #
  365. [env:LERDGEX]
  366. extends = lerdge_common
  367. board_build.crypt_lerdge = Lerdge_X_firmware_force.bin
  368. #
  369. # Lerdge X with USB Flash Drive Support
  370. #
  371. [env:LERDGEX_usb_flash_drive]
  372. extends = env:LERDGEX
  373. platform_packages = ${stm_flash_drive.platform_packages}
  374. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  375. #
  376. # Lerdge S (STM32F407ZG)
  377. #
  378. [env:LERDGES]
  379. extends = lerdge_common
  380. board_build.crypt_lerdge = Lerdge_firmware_force.bin
  381. #
  382. # Lerdge S with USB Flash Drive Support
  383. #
  384. [env:LERDGES_usb_flash_drive]
  385. extends = env:LERDGES
  386. platform_packages = ${stm_flash_drive.platform_packages}
  387. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  388. #
  389. # Lerdge K (STM32F407ZG)
  390. #
  391. [env:LERDGEK]
  392. extends = lerdge_common
  393. board_build.crypt_lerdge = Lerdge_K_firmware_force.bin
  394. build_flags = ${lerdge_common.build_flags} -DLERDGEK
  395. #
  396. # Lerdge K with USB Flash Drive Support
  397. #
  398. [env:LERDGEK_usb_flash_drive]
  399. extends = env:LERDGEK
  400. platform_packages = ${stm_flash_drive.platform_packages}
  401. build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags}
  402. #
  403. # RUMBA32
  404. #
  405. [env:rumba32]
  406. extends = stm32_variant
  407. platform_packages = platformio/tool-dfuutil@~1.11.0
  408. board = rumba32_f446ve
  409. board_build.variant = MARLIN_F446VE
  410. board_build.offset = 0x0000
  411. board_build.offset_address = 0x08000000
  412. build_flags = ${stm32_variant.build_flags}
  413. -Os -DHAL_PCD_MODULE_ENABLED
  414. -DDISABLE_GENERIC_SERIALUSB
  415. -DHAL_UART_MODULE_ENABLED
  416. -DTIMER_SERIAL=TIM9
  417. monitor_speed = 500000
  418. upload_protocol = dfu
  419. #
  420. # STM32F407ZET6 ARM Cortex-M4
  421. #
  422. [env:mks_robin2]
  423. extends = stm32_variant
  424. board = marlin_MKS_ROBIN2
  425. board_build.offset = 0xC000
  426. board_upload.offset_address = 0x0800C000
  427. board_build.encrypt_mks = Robin2.bin
  428. build_flags = ${stm32_variant.build_flags}
  429. -DTARGET_STM32F4 -DSTM32F407_5ZX
  430. -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSBD_PID=0x3748 -DUSB_PRODUCT=\"MKS_Robin2\"
  431. #
  432. # MKS Robin Pro V2 (No bootloader!)
  433. #
  434. [env:mks_robin_pro2]
  435. extends = stm32_variant
  436. platform_packages = ${stm_flash_drive.platform_packages}
  437. board = genericSTM32F407VET6
  438. board_build.variant = MARLIN_F4x7Vx
  439. board_build.offset = 0x0000
  440. board_upload.offset_address = 0x08000000
  441. build_flags = ${stm_flash_drive.build_flags}
  442. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  443. debug_tool = jlink
  444. upload_protocol = jlink
  445. #
  446. # This I2C1(PB6:I2C1_SCL PB7:I2C1_SDA) is used by Robin Nano V3
  447. #
  448. [stm32f4_I2C1]
  449. build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
  450. #
  451. # MKS Robin Nano V3
  452. #
  453. [env:mks_robin_nano_v3]
  454. extends = stm32_variant
  455. board = marlin_STM32F407VGT6_CCM
  456. board_build.variant = MARLIN_F4x7Vx
  457. board_build.offset = 0xC000
  458. board_upload.offset_address = 0x0800C000
  459. board_build.rename = Robin_nano_v3.bin
  460. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
  461. -DHAL_PCD_MODULE_ENABLED
  462. debug_tool = jlink
  463. upload_protocol = jlink
  464. #
  465. # MKS Robin Nano V3 with USB Flash Drive Support
  466. #
  467. [env:mks_robin_nano_v3_usb_flash_drive]
  468. extends = env:mks_robin_nano_v3
  469. platform_packages = ${stm_flash_drive.platform_packages}
  470. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  471. -DUSE_USBHOST_HS
  472. -DUSBD_IRQ_PRIO=5
  473. -DUSBD_IRQ_SUBPRIO=6
  474. -DUSE_USB_HS_IN_FS
  475. #
  476. # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media
  477. #
  478. [env:mks_robin_nano_v3_usb_flash_drive_msc]
  479. extends = env:mks_robin_nano_v3_usb_flash_drive
  480. build_flags = ${env:mks_robin_nano_v3_usb_flash_drive.build_flags}
  481. -DUSBD_USE_CDC_MSC
  482. build_unflags = ${env:mks_robin_nano_v3_usb_flash_drive.build_unflags}
  483. -DUSBD_USE_CDC
  484. #
  485. # MKS Robin Nano V3_1
  486. #
  487. [env:mks_robin_nano_v3_1]
  488. extends = env:mks_robin_nano_v3
  489. board = marlin_STM32F407VET6_CCM
  490. #
  491. # MKS Robin Nano V3.1 with USB Flash Drive Support
  492. #
  493. [env:mks_robin_nano_v3_1_usb_flash_drive]
  494. extends = env:mks_robin_nano_v3_usb_flash_drive
  495. board = marlin_STM32F407VET6_CCM
  496. #
  497. # MKS Robin Nano V3.1 with USB Flash Drive Support and Shared Media
  498. #
  499. [env:mks_robin_nano_v3_1_usb_flash_drive_msc]
  500. extends = env:mks_robin_nano_v3_usb_flash_drive_msc
  501. board = marlin_STM32F407VET6_CCM
  502. #
  503. # MKS Eagle
  504. # 5 TMC2209 uart mode on board
  505. #
  506. [env:mks_eagle]
  507. extends = stm32_variant
  508. board = marlin_STM32F407VGT6_CCM
  509. board_build.variant = MARLIN_F4x7Vx
  510. board_build.offset = 0xC000
  511. board_upload.offset_address = 0x0800C000
  512. board_build.rename = mks_eagle.bin
  513. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags}
  514. -DHAL_PCD_MODULE_ENABLED
  515. -DSTM32_FLASH_SIZE=512
  516. debug_tool = jlink
  517. upload_protocol = jlink
  518. #
  519. # MKS Eagle with USB Flash Drive Support
  520. #
  521. [env:mks_eagle_usb_flash_drive]
  522. extends = env:mks_eagle
  523. platform_packages = ${stm_flash_drive.platform_packages}
  524. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags}
  525. -DUSE_USBHOST_HS
  526. -DUSBD_IRQ_PRIO=5
  527. -DUSBD_IRQ_SUBPRIO=6
  528. -DUSE_USB_HS_IN_FS
  529. #
  530. # MKS Eagle with USB Flash Drive Support and Shared Media
  531. #
  532. [env:mks_eagle_usb_flash_drive_msc]
  533. extends = env:mks_eagle_usb_flash_drive
  534. build_flags = ${env:mks_eagle_usb_flash_drive.build_flags}
  535. -DUSBD_USE_CDC_MSC
  536. build_unflags = -DUSBD_USE_CDC
  537. #
  538. # This I2C1(PB8:I2C1_SCL PB9:I2C1_SDA) is used by MKS Monster8
  539. #
  540. [stm32f4_I2C1_CAN]
  541. build_flags = -DPIN_WIRE_SCL=PB8 -DPIN_WIRE_SDA=PB9
  542. #
  543. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4)
  544. #
  545. [env:mks_monster8]
  546. extends = stm32_variant
  547. board = marlin_STM32F407VGT6_CCM
  548. board_build.variant = MARLIN_F4x7Vx
  549. board_build.offset = 0xC000
  550. board_upload.offset_address = 0x0800C000
  551. board_build.rename = mks_monster8.bin
  552. build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1_CAN.build_flags}
  553. -DHAL_PCD_MODULE_ENABLED -DTIMER_SERIAL=TIM4
  554. -DSTM32_FLASH_SIZE=512
  555. debug_tool = jlink
  556. upload_protocol = jlink
  557. #
  558. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4) with USB Flash Drive Support
  559. #
  560. [env:mks_monster8_usb_flash_drive]
  561. extends = env:mks_monster8
  562. platform_packages = ${stm_flash_drive.platform_packages}
  563. build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1_CAN.build_flags}
  564. -DUSE_USBHOST_HS
  565. -DUSBD_IRQ_PRIO=5
  566. -DUSBD_IRQ_SUBPRIO=6
  567. -DUSE_USB_HS_IN_FS
  568. #
  569. # MKS Monster8 V1 / V2 (STM32F407VET6 ARM Cortex-M4) with USB Flash Drive Support and Shared Media
  570. #
  571. [env:mks_monster8_usb_flash_drive_msc]
  572. extends = env:mks_monster8_usb_flash_drive
  573. build_flags = ${env:mks_monster8_usb_flash_drive.build_flags}
  574. -DUSBD_USE_CDC_MSC
  575. build_unflags = -DUSBD_USE_CDC
  576. #
  577. # TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
  578. #
  579. [TH3D_EZBoard_V2]
  580. extends = stm32_variant
  581. board = genericSTM32F405RG
  582. board_build.variant = MARLIN_TH3D_EZBOARD_V2
  583. build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0
  584. #
  585. # TH3D EZBoard v2.0 directly flashed via ST-Link
  586. #
  587. [env:TH3D_EZBoard_V2_no_bootloader]
  588. extends = TH3D_EZBoard_V2
  589. debug_tool = stlink
  590. upload_protocol = stlink
  591. #
  592. # TH3D EZBoard v2.0 with OpenBLT from https://github.com/rhapsodyv/OpenBLT-STM32
  593. #
  594. [env:TH3D_EZBoard_V2_OpenBLT]
  595. extends = TH3D_EZBoard_V2
  596. board_build.encode = firmware.bin
  597. board_build.offset = 0xC000
  598. board_upload.offset_address = 0x0800C000
  599. extra_scripts = ${TH3D_EZBoard_V2.extra_scripts}
  600. buildroot/share/PlatformIO/scripts/openblt.py
  601. [mks_robin_nano_v1_3_f4_common]
  602. extends = stm32_variant
  603. board = marlin_STM32F407VGT6_CCM
  604. board_build.variant = MARLIN_F4x7Vx
  605. board_build.offset = 0x8000
  606. board_upload.offset_address = 0x08008000
  607. board_build.rename = Robin_nano35.bin
  608. debug_tool = jlink
  609. upload_protocol = jlink
  610. #
  611. # BOARD_MKS_ROBIN_NANO_V1_3_F4
  612. # - MKS Robin Nano V1.3 (STM32F407VET6, 5 Pololu Plug)
  613. # - MKS Robin Nano-S V1.3 (STM32F407VET6, 4 TMC2225, 1 Pololu Plug)
  614. # - ZNP Robin Nano V1.3 (STM32F407VET6, 2 TMC2208, 2 A4988, 1x Polulu plug)
  615. #
  616. [env:mks_robin_nano_v1_3_f4]
  617. extends = mks_robin_nano_v1_3_f4_common
  618. build_flags = ${mks_robin_nano_v1_3_f4_common.build_flags}
  619. -DMCU_STM32F407VE -DENABLE_HWSERIAL3 -DSTM32_FLASH_SIZE=512
  620. -DTIMER_SERVO=TIM2 -DTIMER_TONE=TIM3 -DSS_TIMER=4
  621. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  622. build_unflags = ${mks_robin_nano_v1_3_f4_common.build_unflags}
  623. -DUSBCON -DUSBD_USE_CDC
  624. #
  625. # MKS/ZNP Robin Nano V1.3 with native USB mod
  626. #
  627. [env:mks_robin_nano_v1_3_f4_usbmod]
  628. extends = mks_robin_nano_v1_3_f4_common
  629. build_flags = ${mks_robin_nano_v1_3_f4_common.build_flags}
  630. -DMCU_STM32F407VE -DSTM32_FLASH_SIZE=512
  631. -DTIMER_SERVO=TIM2 -DTIMER_TONE=TIM3 -DSS_TIMER=4
  632. -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
  633. #
  634. # Artillery Ruby
  635. #
  636. [env:Artillery_Ruby]
  637. extends = common_stm32
  638. board = marlin_Artillery_Ruby
  639. build_flags = ${common_stm32.build_flags}
  640. -DSTM32F401xC -DTARGET_STM32F4 -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32
  641. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  642. -DUSB_PRODUCT=\"Artillery_3D_Printer\"
  643. -DFLASH_DATA_SECTOR=1U -DFLASH_BASE_ADDRESS=0x08004000
  644. extra_scripts = ${common_stm32.extra_scripts}
  645. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  646. #
  647. # Ender-3 S1 STM32F401RC_creality
  648. #
  649. [STM32F401RC_creality_base]
  650. extends = stm32_variant
  651. board = genericSTM32F401RC
  652. board_build.variant = MARLIN_F401RC_CREALITY
  653. build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RC -DSTM32F4
  654. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  655. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  656. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  657. monitor_speed = 115200
  658. [env:STM32F401RC_creality]
  659. extends = STM32F401RC_creality_base
  660. board_build.offset = 0x10000
  661. board_upload.offset_address = 0x08010000
  662. board_build.rename = firmware-{date}-{time}.bin
  663. [env:STM32F401RC_creality_nobootloader]
  664. extends = STM32F401RC_creality_base
  665. board_build.offset = 0x0000
  666. board_upload.offset_address = 0x08000000
  667. debug_tool = stlink
  668. upload_protocol = stlink
  669. [env:STM32F401RC_creality_jlink]
  670. extends = env:STM32F401RC_creality
  671. debug_tool = jlink
  672. upload_protocol = jlink
  673. [env:STM32F401RC_creality_stlink]
  674. extends = env:STM32F401RC_creality
  675. debug_tool = stlink
  676. upload_protocol = stlink
  677. #
  678. # Ender-5 S1 STM32F401RE_creality (CR4NS200141C13 with STM32F401RET6)
  679. #
  680. [env:STM32F401RE_creality]
  681. extends = stm32_variant
  682. board = marlin_STM32F401RE_creality
  683. board_build.offset = 0x10000
  684. board_upload.offset_address = 0x08010000
  685. board_build.rename = firmware-{date}-{time}.bin
  686. build_flags = ${stm32_variant.build_flags} -DSTM32F401xE -DSTM32F4 -DSTM32F4_UPDATE_FOLDER
  687. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  688. monitor_speed = 115200
  689. [env:STM32F401RE_creality_jlink]
  690. extends = env:STM32F401RE_creality
  691. debug_tool = jlink
  692. upload_protocol = jlink
  693. [env:STM32F401RE_creality_stlink]
  694. extends = env:STM32F401RE_creality
  695. debug_tool = stlink
  696. upload_protocol = stlink
  697. #
  698. # STM32F401RE_freeruns Creality E3 Free-runs Silent Motherboard
  699. #
  700. [env:STM32F401RE_freeruns]
  701. extends = stm32_variant
  702. board = marlin_STM32F401RE_freeruns
  703. board_build.offset = 0x10000
  704. board_upload.offset_address = 0x08010000
  705. board_build.rename = firmware-{date}-{time}.bin
  706. build_flags = ${stm32_variant.build_flags} -DSTM32F401xE
  707. -DSS_TIMER=4 -DTIMER_SERVO=TIM5
  708. -DTRANSFER_CLOCK_DIV=8
  709. build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
  710. monitor_speed = 115200
  711. [env:STM32F401RE_freeruns_jlink]
  712. extends = env:STM32F401RE_freeruns
  713. debug_tool = jlink
  714. upload_protocol = jlink
  715. [env:STM32F401RE_freeruns_stlink]
  716. extends = env:STM32F401RE_freeruns
  717. debug_tool = stlink
  718. upload_protocol = stlink
  719. #
  720. # BigTree SKR mini E3 V3.0.1 (STM32F401RCT6 ARM Cortex-M4)
  721. #
  722. [env:STM32F401RC_btt]
  723. extends = stm32_variant
  724. platform = ststm32@~14.1.0
  725. platform_packages = framework-arduinoststm32@~4.20600.231001
  726. toolchain-gccarmnoneeabi@1.100301.220327
  727. board = marlin_STM32F401RC
  728. board_build.offset = 0x4000
  729. board_upload.offset_address = 0x08004000
  730. build_flags = ${stm32_variant.build_flags}
  731. -DPIN_SERIAL6_RX=PC_7 -DPIN_SERIAL6_TX=PC_6
  732. -DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024
  733. -DTIMER_SERVO=TIM3 -DTIMER_TONE=TIM4
  734. -DSTEP_TIMER_IRQ_PRIO=0
  735. upload_protocol = stlink
  736. debug_tool = stlink
  737. #
  738. # BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RCT6 ARM Cortex-M0+)
  739. # Custom upload to SD via Marlin with Binary Protocol
  740. # Requires Marlin with BINARY_FILE_TRANSFER already installed on the target board.
  741. # If CUSTOM_FIRMWARE_UPLOAD is also installed, Marlin will reboot the board to install the firmware.
  742. # Currently CUSTOM_FIRMWARE_UPLOAD must also be enabled to use 'xfer' build envs.
  743. #
  744. [env:STM32F401RC_btt_xfer]
  745. extends = env:STM32F401RC_btt
  746. build_flags = ${env:STM32F401RC_btt.build_flags} -DXFER_BUILD
  747. extra_scripts = ${env:STM32F401RC_btt.extra_scripts}
  748. pre:buildroot/share/scripts/upload.py
  749. upload_protocol = custom
  750. #
  751. # MKS SKIPR v1.0 all-in-one board (STM32F407VE)
  752. #
  753. [env:mks_skipr_v1]
  754. extends = stm32_variant
  755. board = marlin_MKS_SKIPR_V1
  756. board_build.rename = mks_skipr.bin
  757. [env:mks_skipr_v1_nobootloader]
  758. extends = env:mks_skipr_v1
  759. platform_packages = platformio/tool-dfuutil@~1.11.0
  760. board_build.rename = firmware.bin
  761. board_build.offset = 0x0000
  762. board_upload.offset_address = 0x08000000
  763. upload_protocol = dfu
  764. upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE"
  765. #
  766. # TRONXY_CXY_446_V10 (STM32F446ZET6 ARM Cortex-M4)
  767. #
  768. [env:TRONXY_CXY_446_V10]
  769. extends = stm32_variant
  770. board = marlin_STM32F446ZET_tronxy
  771. board_build.ldscript = buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/ldscript.ld
  772. board_build.offset = 0x10000
  773. board_build.offset_address = 0x08010000
  774. build_flags = ${stm32_variant.build_flags}
  775. -DSTM32F4xx -DUSE_USB_HS
  776. -DUSE_USB_HS_IN_FS
  777. build_unflags = ${stm32_variant.build_unflags} -fno-rtti
  778. -fno-threadsafe-statics -fno-exceptions
  779. -DUSBD_USE_CDC -DUSBCON
  780. extra_scripts = ${stm32_variant.extra_scripts}
  781. buildroot/share/PlatformIO/scripts/tronxy_cxy_446_v10.py
  782. #
  783. # TRONXY_CXY_446_V10 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support
  784. #
  785. [env:TRONXY_CXY_446_V10_usb_flash_drive]
  786. extends = env:TRONXY_CXY_446_V10
  787. platform_packages = ${stm_flash_drive.platform_packages}
  788. #
  789. # Blackpill
  790. #
  791. [env:STM32F401CD_blackpill_stlink]
  792. platform = ${common_stm32.platform}
  793. extends = common_stm32
  794. board = blackpill_f401cc
  795. upload_protocol = stlink
  796. monitor_speed = 115200
  797. #
  798. # I3Dbeez9 (STM32F407ZGT6 ARM Cortex-M4)
  799. #
  800. [env:I3DBEEZ9_V1]
  801. extends = stm32_variant
  802. board = marlin_I3DBEEZ9
  803. board_build.offset = 0x8000
  804. board_build.offset_address = 0x08008000
  805. build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX
  806. debug_tool = stlink
  807. upload_protocol = stlink
  808. #
  809. # BlackBeezMini (blackpill_f401cc)
  810. #
  811. [env:BLACKBEEZMINI_V1]
  812. extends = common_stm32
  813. platform_packages = platformio/tool-dfuutil@~1.11.0
  814. board = blackpill_f401cc
  815. board_build.offset = 0x0000
  816. board_build.offset_address = 0x08000000
  817. build_flags = ${common_stm32.build_flags}
  818. -Os -DHAL_PCD_MODULE_ENABLED
  819. -DHAL_UART_MODULE_ENABLED
  820. monitor_speed = 250000
  821. upload_protocol = dfu
  822. #
  823. # Mellow Fly E3 V2 (STM32F407VGT6 ARM Cortex-M4)
  824. #
  825. [env:FLY_E3_V2]
  826. extends = stm32_variant
  827. board = marlin_STM32F407VGT6_CCM
  828. board_build.variant = MARLIN_F4x7Vx
  829. board_build.offset = 0x8000
  830. board_upload.offset_address = 0x08008000
  831. build_flags = ${stm32_variant.build_flags}
  832. -DHAVE_HWSERIAL1 -DHAVE_HWSERIAL3
  833. -DPIN_SERIAL1_RX=PA_10 -DPIN_SERIAL1_TX=PA_9
  834. -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8
  835. -DHAL_SD_MODULE_ENABLED
  836. -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS
  837. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  838. -DHSE_VALUE=8000000U
  839. upload_protocol = stlink
  840. #
  841. # XTLW3D Climber-8th-F4 (STM32F407VGT6 ARM Cortex-M4)
  842. #
  843. [env:XTLW_CLIMBER_8TH]
  844. extends = stm32_variant
  845. platform_packages = ${stm_flash_drive.platform_packages}
  846. board = marlin_STM32F407VGT6_CCM
  847. board_build.variant = MARLIN_F4x7Vx
  848. board_build.offset = 0x8000
  849. board_upload.offset_address = 0x08008000
  850. build_flags = ${stm_flash_drive.build_flags}
  851. -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS
  852. -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
  853. -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED
  854. -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8