stm32f4.ini 32 KB

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