stm32f4.ini 27 KB

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