stm32f4.ini 31 KB

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