My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

platformio.ini 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. # For detailed documentation with EXAMPLES:
  6. #
  7. # https://docs.platformio.org/en/latest/projectconf.html
  8. #
  9. # Automatic targets - enable auto-uploading
  10. #targets = upload
  11. #
  12. # By default platformio build will abort after 5 errors.
  13. # Remove '-fmax-errors=5' from build_flags below to see all.
  14. #
  15. [platformio]
  16. src_dir = Marlin
  17. boards_dir = buildroot/share/PlatformIO/boards
  18. default_envs = mega2560
  19. include_dir = Marlin
  20. #
  21. # The 'common' values are used for most Marlin builds
  22. #
  23. [common]
  24. default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared> -<src/lcd/extui/lib/mks_ui>
  25. -<src/lcd/menu> -<src/lcd/dwin> -<src/lcd/extui/lib/dgus> -<src/lcd/extui/lib/ftdi_eve_touch_ui> -<src/lcd/dogm>
  26. extra_scripts =
  27. pre:buildroot/share/PlatformIO/scripts/common-features-dependencies.py
  28. pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
  29. build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
  30. lib_deps =
  31. #
  32. # Feature Dependencies
  33. #
  34. [features]
  35. TFT_LVGL_UI = MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
  36. src_filter=+<src/lcd/extui/lib/mks_ui>
  37. HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.1
  38. SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
  39. DIGIPOT_MCP4... = SlowSoftI2CMaster
  40. HAS_TMC26X = TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
  41. HAS_L64XX = Arduino-L6470@0.8.0
  42. NEOPIXEL_LED = Adafruit NeoPixel@1.5.0
  43. MAX6675_IS_MAX31865 = Adafruit MAX31865 library@~1.1.0
  44. HAS_GRAPHICAL_LCD = U8glib-HAL@0.4.1
  45. src_filter=+<src/lcd/dogm>
  46. USES_LIQUIDCRYSTAL = LiquidCrystal@1.5.0
  47. USES_LIQUIDTWI2 = LiquidTWI2@1.2.7
  48. TOUCH_UI_FTDI_EVE = src_filter=+<src/lcd/extui/lib/ftdi_eve_touch_ui>
  49. HAS_DGUS_LCD = src_filter=+<src/lcd/extui/lib/dgus>
  50. DWIN_CREALITY_LCD = src_filter=+<src/lcd/dwin>
  51. HAS_LCD_MENU = src_filter=+<src/lcd/menu>
  52. (ESP32_)?WIFISUPPORT = AsyncTCP, ESP Async WebServer
  53. ESP3DLib=https://github.com/luc-github/ESP3DLib.git
  54. arduinoWebSockets=https://github.com/Links2004/arduinoWebSockets.git
  55. ESP32SSDP=https://github.com/luc-github/ESP32SSDP.git
  56. lib_ignore=ESPAsyncTCP
  57. #
  58. # Default values apply to all 'env:' prefixed environments
  59. #
  60. [env]
  61. framework = arduino
  62. extra_scripts = ${common.extra_scripts}
  63. build_flags = ${common.build_flags}
  64. lib_deps = ${common.lib_deps}
  65. monitor_speed = 250000
  66. #################################
  67. # #
  68. # Unique Core Architectures #
  69. # #
  70. # Add a new "env" below if no #
  71. # entry has values suitable to #
  72. # build for a given board. #
  73. # #
  74. #################################
  75. #################################
  76. # #
  77. # AVR Architecture #
  78. # #
  79. #################################
  80. #
  81. # AVR (8-bit) Common Environment values
  82. #
  83. [common_avr8]
  84. board_build.f_cpu = 16000000L
  85. src_filter = ${common.default_src_filter} +<src/HAL/AVR>
  86. #
  87. # ATmega2560
  88. #
  89. [env:mega2560]
  90. platform = atmelavr
  91. extends = common_avr8
  92. board = megaatmega2560
  93. #
  94. # ATmega1280
  95. #
  96. [env:mega1280]
  97. platform = atmelavr
  98. extends = common_avr8
  99. board = megaatmega1280
  100. #
  101. # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
  102. #
  103. [env:MightyBoard1280]
  104. platform = atmelavr
  105. extends = common_avr8
  106. board = ATmega1280
  107. upload_speed = 57600
  108. #
  109. # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
  110. #
  111. [env:MightyBoard2560]
  112. platform = atmelavr
  113. extends = common_avr8
  114. board = ATmega2560
  115. upload_protocol = wiring
  116. upload_speed = 57600
  117. board_upload.maximum_size = 253952
  118. #
  119. # RAMBo
  120. #
  121. [env:rambo]
  122. platform = atmelavr
  123. extends = common_avr8
  124. board = reprap_rambo
  125. #
  126. # FYSETC F6 V1.3
  127. #
  128. [env:FYSETC_F6_13]
  129. platform = atmelavr
  130. extends = common_avr8
  131. board = fysetc_f6_13
  132. #
  133. # FYSETC F6 V1.4
  134. #
  135. [env:FYSETC_F6_14]
  136. platform = atmelavr
  137. extends = common_avr8
  138. board = fysetc_f6_14
  139. #
  140. # Sanguinololu (ATmega644p)
  141. #
  142. [env:sanguino644p]
  143. platform = atmelavr
  144. extends = common_avr8
  145. board = sanguino_atmega644p
  146. #
  147. # Sanguinololu (ATmega1284p)
  148. #
  149. [env:sanguino1284p]
  150. platform = atmelavr
  151. extends = common_avr8
  152. board = sanguino_atmega1284p
  153. board_upload.maximum_size = 126976
  154. #
  155. # Melzi and clones (ATmega1284p)
  156. #
  157. [env:melzi]
  158. platform = atmelavr
  159. extends = common_avr8
  160. board = sanguino_atmega1284p
  161. upload_speed = 57600
  162. board_upload.maximum_size = 126976
  163. #
  164. # Melzi and clones (Optiboot bootloader)
  165. #
  166. [env:melzi_optiboot]
  167. platform = atmelavr
  168. extends = common_avr8
  169. board = sanguino_atmega1284p
  170. upload_speed = 115200
  171. #
  172. # Melzi and clones (Zonestar Melzi2 with tuned flags)
  173. #
  174. [env:melzi_optimized]
  175. platform = atmelavr
  176. extends = env:melzi_optiboot
  177. build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues
  178. build_unflags = -g -ggdb
  179. #
  180. # AT90USB1286 boards using CDC bootloader
  181. # - BRAINWAVE
  182. # - BRAINWAVE_PRO
  183. # - SAV_MKI
  184. # - TEENSYLU
  185. #
  186. [env:at90usb1286_cdc]
  187. platform = teensy
  188. extends = common_avr8
  189. board = at90usb1286
  190. #
  191. # AT90USB1286 boards using DFU bootloader
  192. # - PrintrBoard
  193. # - PrintrBoard Rev.F
  194. # - ? 5DPRINT ?
  195. #
  196. [env:at90usb1286_dfu]
  197. platform = teensy
  198. extends = env:at90usb1286_cdc
  199. #################################
  200. # #
  201. # DUE Architecture #
  202. # #
  203. #################################
  204. #
  205. # Due (Atmel SAM3X8E ARM Cortex-M3)
  206. #
  207. # - RAMPS4DUE
  208. # - RADDS
  209. #
  210. [env:DUE]
  211. platform = atmelsam
  212. board = due
  213. src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  214. [env:DUE_USB]
  215. platform = atmelsam
  216. board = dueUSB
  217. src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  218. [env:DUE_debug]
  219. # Used when WATCHDOG_RESET_MANUAL is enabled
  220. platform = atmelsam
  221. board = due
  222. src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  223. build_flags = ${common.build_flags}
  224. -funwind-tables
  225. -mpoke-function-name
  226. #
  227. # Archim SAM
  228. #
  229. [common_DUE_archim]
  230. platform = atmelsam
  231. board = due
  232. src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  233. build_flags = ${common.build_flags}
  234. -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
  235. extra_scripts = ${common.extra_scripts}
  236. Marlin/src/HAL/DUE/upload_extra_script.py
  237. [env:DUE_archim]
  238. platform = ${common_DUE_archim.platform}
  239. extends = common_DUE_archim
  240. # Used when WATCHDOG_RESET_MANUAL is enabled
  241. [env:DUE_archim_debug]
  242. platform = ${common_DUE_archim.platform}
  243. extends = common_DUE_archim
  244. build_flags = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function-name
  245. #################################
  246. # #
  247. # SAMD51 Architecture #
  248. # #
  249. #################################
  250. #
  251. # Adafruit Grand Central M4 (Atmel SAMD51P20A ARM Cortex-M4)
  252. #
  253. [env:SAMD51_grandcentral_m4]
  254. platform = atmelsam
  255. board = adafruit_grandcentral_m4
  256. build_flags = ${common.build_flags} -std=gnu++17
  257. build_unflags = -std=gnu++11
  258. src_filter = ${common.default_src_filter} +<src/HAL/SAMD51>
  259. lib_deps = ${common.lib_deps}
  260. SoftwareSerialM
  261. Adafruit SPIFlash
  262. SdFat - Adafruit Fork
  263. debug_tool = jlink
  264. #################################
  265. # #
  266. # LPC176x Architecture #
  267. # #
  268. #################################
  269. #
  270. # NXP LPC176x ARM Cortex-M3
  271. #
  272. [common_LPC]
  273. platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip
  274. board = nxp_lpc1768
  275. lib_ldf_mode = off
  276. lib_compat_mode = strict
  277. extra_scripts = ${common.extra_scripts}
  278. Marlin/src/HAL/LPC1768/upload_extra_script.py
  279. src_filter = ${common.default_src_filter} +<src/HAL/LPC1768>
  280. lib_deps = ${common.lib_deps}
  281. Servo
  282. LiquidCrystal@1.0.0
  283. Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip
  284. build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g
  285. # debug options for backtrace
  286. #-funwind-tables
  287. #-mpoke-function-name
  288. #
  289. # NXP LPC176x ARM Cortex-M3
  290. #
  291. [env:LPC1768]
  292. platform = ${common_LPC.platform}
  293. extends = common_LPC
  294. board = nxp_lpc1768
  295. [env:LPC1769]
  296. platform = ${common_LPC.platform}
  297. extends = common_LPC
  298. board = nxp_lpc1769
  299. #################################
  300. # #
  301. # STM32 Architecture #
  302. # #
  303. #################################
  304. #
  305. # HAL/STM32 Base Environment values
  306. #
  307. [common_stm32]
  308. platform = ststm32@~6.1.0
  309. platform_packages = framework-arduinoststm32@>=4.10700,<4.10800
  310. lib_ignore = SoftwareSerial
  311. build_flags = ${common.build_flags}
  312. -IMarlin/src/HAL/STM32 -std=gnu++14
  313. -DUSBCON -DUSBD_USE_CDC
  314. -DUSBD_VID=0x0483
  315. -DTIM_IRQ_PRIO=13
  316. build_unflags = -std=gnu++11
  317. src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  318. #
  319. # HAL/STM32F1 Common Environment values
  320. #
  321. [common_stm32f1]
  322. platform = ${common_stm32.platform}
  323. build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
  324. ${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL
  325. build_unflags = -std=gnu++11
  326. src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
  327. lib_ignore = SPI
  328. lib_deps = ${common.lib_deps}
  329. SoftwareSerialM
  330. #
  331. # STM32F103RC
  332. #
  333. [env:STM32F103RC]
  334. platform = ${common_stm32f1.platform}
  335. extends = common_stm32f1
  336. board = genericSTM32F103RC
  337. platform_packages = tool-stm32duino
  338. monitor_speed = 115200
  339. #
  340. # MEEB_3DP (STM32F103RCT6 with 512K)
  341. #
  342. [env:STM32F103RC_meeb]
  343. platform = ${common_stm32f1.platform}
  344. extends = common_stm32f1
  345. board = MEEB_3DP
  346. platform_packages = tool-stm32duino
  347. build_flags = ${common_stm32f1.build_flags}
  348. -DDEBUG_LEVEL=0
  349. -DSS_TIMER=4
  350. -DSTM32_FLASH_SIZE=512
  351. -DHSE_VALUE=12000000U
  352. -DUSE_USB_COMPOSITE
  353. -DVECT_TAB_OFFSET=0x2000
  354. -DGENERIC_BOOTLOADER
  355. extra_scripts = ${common.extra_scripts}
  356. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  357. buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
  358. lib_deps = ${common.lib_deps}
  359. Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
  360. SoftwareSerialM
  361. USBComposite for STM32F1@0.91
  362. debug_tool = stlink
  363. upload_protocol = dfu
  364. #
  365. # STM32F103RC_fysetc
  366. #
  367. [env:STM32F103RC_fysetc]
  368. platform = ${common_stm32f1.platform}
  369. extends = env:STM32F103RC
  370. extra_scripts = ${common.extra_scripts}
  371. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  372. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
  373. lib_ldf_mode = chain
  374. debug_tool = stlink
  375. upload_protocol = serial
  376. #
  377. # BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
  378. #
  379. # STM32F103RC_btt ............. RCT6 with 256K
  380. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  381. # STM32F103RC_btt_512K ........ RCT6 with 512K
  382. # STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage)
  383. #
  384. [env:STM32F103RC_btt]
  385. platform = ${common_stm32f1.platform}
  386. extends = env:STM32F103RC
  387. extra_scripts = ${common.extra_scripts}
  388. buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
  389. build_flags = ${common_stm32f1.build_flags}
  390. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  391. monitor_speed = 115200
  392. [env:STM32F103RC_btt_USB]
  393. platform = ${common_stm32f1.platform}
  394. extends = env:STM32F103RC_btt
  395. build_flags = ${env:STM32F103RC_btt.build_flags} -DUSE_USB_COMPOSITE
  396. lib_deps = ${env:STM32F103RC_btt.lib_deps}
  397. USBComposite for STM32F1@0.91
  398. [env:STM32F103RC_btt_512K]
  399. platform = ${common_stm32f1.platform}
  400. extends = env:STM32F103RC_btt
  401. board_upload.maximum_size=524288
  402. build_flags = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512
  403. [env:STM32F103RC_btt_512K_USB]
  404. platform = ${common_stm32f1.platform}
  405. extends = env:STM32F103RC_btt_512K
  406. build_flags = ${env:STM32F103RC_btt_512K.build_flags} -DUSE_USB_COMPOSITE
  407. lib_deps = ${env:STM32F103RC_btt_512K.lib_deps}
  408. USBComposite for STM32F1@0.91
  409. #
  410. # STM32F103RE
  411. #
  412. [env:STM32F103RE]
  413. platform = ${common_stm32f1.platform}
  414. extends = common_stm32f1
  415. board = genericSTM32F103RE
  416. platform_packages = tool-stm32duino
  417. monitor_speed = 115200
  418. #
  419. # STM32F103RE_btt ............. RET6
  420. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  421. #
  422. [env:STM32F103RE_btt]
  423. platform = ${common_stm32f1.platform}
  424. extends = env:STM32F103RE
  425. extra_scripts = ${common.extra_scripts}
  426. buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
  427. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  428. debug_tool = stlink
  429. upload_protocol = stlink
  430. [env:STM32F103RE_btt_USB]
  431. platform = ${common_stm32f1.platform}
  432. extends = env:STM32F103RE_btt
  433. build_flags = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE
  434. lib_deps = ${common_stm32f1.lib_deps}
  435. USBComposite for STM32F1@0.91
  436. #
  437. # STM32F4 with STM32GENERIC
  438. #
  439. [env:STM32F4]
  440. platform = ${common_stm32.platform}
  441. board = disco_f407vg
  442. build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F4 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
  443. src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/STM32_F4_F7/STM32F7>
  444. #
  445. # STM32F7 with STM32GENERIC
  446. #
  447. [env:STM32F7]
  448. platform = ${common_stm32.platform}
  449. board = remram_v1
  450. build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F7 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
  451. src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/STM32_F4_F7/STM32F4>
  452. #
  453. # ARMED (STM32)
  454. #
  455. [env:ARMED]
  456. platform = ${common_stm32.platform}
  457. extends = common_stm32
  458. board = armed_v1
  459. build_flags = ${common_stm32.build_flags}
  460. '-DUSB_PRODUCT="ARMED_V1"'
  461. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
  462. #
  463. # Geeetech GTM32 (STM32F103VET6)
  464. #
  465. [env:STM32F103VE_GTM32]
  466. platform = ${common_stm32f1.platform}
  467. extends = common_stm32f1
  468. board = genericSTM32F103VE
  469. build_flags = ${common_stm32f1.build_flags}
  470. -ffunction-sections -fdata-sections -nostdlib -MMD
  471. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
  472. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
  473. -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  474. upload_protocol = serial
  475. #
  476. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  477. #
  478. [env:STM32F103VE_longer]
  479. platform = ${common_stm32f1.platform}
  480. extends = common_stm32f1
  481. board = genericSTM32F103VE
  482. extra_scripts = ${common.extra_scripts}
  483. buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
  484. build_flags = ${common_stm32f1.build_flags}
  485. -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
  486. build_unflags = ${common_stm32f1.build_unflags}
  487. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  488. lib_ignore = ${common_stm32f1.lib_ignore}
  489. #
  490. # MKS Robin Mini (STM32F103VET6)
  491. #
  492. [env:mks_robin_mini]
  493. platform = ${common_stm32f1.platform}
  494. extends = common_stm32f1
  495. board = genericSTM32F103VE
  496. extra_scripts = ${common.extra_scripts}
  497. buildroot/share/PlatformIO/scripts/mks_robin_mini.py
  498. build_flags = ${common_stm32f1.build_flags}
  499. -DMCU_STM32F103VE
  500. #
  501. # MKS Robin Nano (STM32F103VET6) - Emulated Graphical 128x64 (DOGM) UI
  502. #
  503. [env:mks_robin_nano]
  504. platform = ${common_stm32f1.platform}
  505. extends = common_stm32f1
  506. board = genericSTM32F103VE
  507. platform_packages = tool-stm32duino
  508. extra_scripts = ${common.extra_scripts}
  509. buildroot/share/PlatformIO/scripts/mks_robin_nano.py
  510. build_flags = ${common_stm32f1.build_flags}
  511. -DMCU_STM32F103VE -DSS_TIMER=4
  512. #
  513. # MKS Robin (STM32F103ZET6)
  514. #
  515. [env:mks_robin]
  516. platform = ${common_stm32f1.platform}
  517. extends = common_stm32f1
  518. board = genericSTM32F103ZE
  519. extra_scripts = ${common.extra_scripts}
  520. buildroot/share/PlatformIO/scripts/mks_robin.py
  521. build_flags = ${common_stm32f1.build_flags}
  522. -DSS_TIMER=4 -DSTM32_XL_DENSITY
  523. #
  524. # MKS Robin Pro (STM32F103ZET6)
  525. #
  526. [env:mks_robin_pro]
  527. platform = ${common_stm32f1.platform}
  528. extends = env:mks_robin
  529. extra_scripts = ${common.extra_scripts}
  530. buildroot/share/PlatformIO/scripts/mks_robin_pro.py
  531. #
  532. # TRIGORILLA PRO (STM32F103ZET6)
  533. #
  534. [env:trigorilla_pro]
  535. platform = ${common_stm32f1.platform}
  536. extends = env:mks_robin
  537. #
  538. # MKS Robin E3D (STM32F103RCT6) and
  539. # MKS Robin E3 with TMC2209
  540. #
  541. [env:mks_robin_e3]
  542. platform = ${common_stm32f1.platform}
  543. extends = common_stm32f1
  544. board = genericSTM32F103RC
  545. platform_packages = tool-stm32duino
  546. extra_scripts = ${common.extra_scripts}
  547. buildroot/share/PlatformIO/scripts/mks_robin_e3.py
  548. build_flags = ${common_stm32f1.build_flags}
  549. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  550. #
  551. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  552. #
  553. [env:mks_robin_lite]
  554. platform = ${common_stm32f1.platform}
  555. extends = common_stm32f1
  556. board = genericSTM32F103RC
  557. extra_scripts = ${common.extra_scripts}
  558. buildroot/share/PlatformIO/scripts/mks_robin_lite.py
  559. #
  560. # MKS ROBIN LITE3 (STM32F103RCT6)
  561. #
  562. [env:mks_robin_lite3]
  563. platform = ${common_stm32f1.platform}
  564. extends = common_stm32f1
  565. board = genericSTM32F103RC
  566. extra_scripts = ${common.extra_scripts}
  567. buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
  568. #
  569. # JGAurora A5S A1 (STM32F103ZET6)
  570. #
  571. [env:jgaurora_a5s_a1]
  572. platform = ${common_stm32f1.platform}
  573. extends = common_stm32f1
  574. board = genericSTM32F103ZE
  575. extra_scripts = ${common.extra_scripts}
  576. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  577. build_flags = ${common_stm32f1.build_flags}
  578. -DSTM32F1xx -DSTM32_XL_DENSITY
  579. #
  580. # Malyan M200 (STM32F103CB)
  581. #
  582. [env:STM32F103CB_malyan]
  583. platform = ${common_stm32f1.platform}
  584. extends = common_stm32f1
  585. board = malyanM200
  586. build_flags = ${common_stm32f1.build_flags}
  587. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  588. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  589. lib_ignore = ${common_stm32f1.lib_ignore}
  590. SoftwareSerialM
  591. #
  592. # Malyan M200 v2 (STM32F070RB)
  593. #
  594. [env:STM32F070RB_malyan]
  595. platform = ${common_stm32.platform}
  596. extends = common_stm32
  597. board = malyanM200v2
  598. build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED
  599. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
  600. -DCUSTOM_STARTUP_FILE
  601. lib_ignore = SoftwareSerial
  602. #
  603. # Malyan M300 (STM32F070CB)
  604. #
  605. [env:malyan_M300]
  606. platform = ststm32@>=6.1.0,<6.2.0
  607. board = malyanm300_f070cb
  608. build_flags = ${common.build_flags}
  609. -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\""
  610. -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
  611. src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  612. #
  613. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  614. #
  615. [env:chitu_f103]
  616. platform = ${common_stm32f1.platform}
  617. extends = common_stm32f1
  618. board = CHITU_F103
  619. extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-features-dependencies.py
  620. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  621. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  622. build_flags = ${common_stm32f1.build_flags}
  623. -DSTM32F1xx -DSTM32_XL_DENSITY
  624. build_unflags = ${common_stm32f1.build_unflags}
  625. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  626. #
  627. # Some Chitu V5 boards have a problem with GPIO init.
  628. # Use this target if G28 or G29 are always failing.
  629. #
  630. [env:chitu_v5_gpio_init]
  631. platform = ${common_stm32f1.platform}
  632. extends = env:chitu_f103
  633. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  634. #
  635. # Creality (STM32F103RET6)
  636. #
  637. [env:STM32F103RET6_creality]
  638. platform = ${common_stm32f1.platform}
  639. extends = common_stm32f1
  640. board = genericSTM32F103RC
  641. build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
  642. ${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY -DTEMP_TIMER_CHAN=4
  643. extra_scripts = ${common.extra_scripts}
  644. buildroot/share/PlatformIO/scripts/creality.py
  645. lib_ignore = ${common_stm32f1.lib_ignore}
  646. debug_tool = jlink
  647. upload_protocol = jlink
  648. monitor_speed = 115200
  649. #
  650. # STM32F401VE
  651. # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
  652. #
  653. [env:STM32F401VE_STEVAL]
  654. platform = ${common_stm32.platform}
  655. extends = common_stm32
  656. board = STEVAL_STM32F401VE
  657. build_flags = ${common_stm32.build_flags}
  658. -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
  659. -DUSB_PRODUCT=\"STEVAL_F401VE\"
  660. -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  661. extra_scripts = ${common.extra_scripts}
  662. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  663. buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py
  664. lib_ignore = SoftwareSerial
  665. #
  666. # FLYF407ZG
  667. #
  668. [env:FLYF407ZG]
  669. platform = ${common_stm32.platform}
  670. extends = common_stm32
  671. board = FLYF407ZG
  672. build_flags = ${common_stm32.build_flags}
  673. -DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\"
  674. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
  675. extra_scripts = ${common.extra_scripts}
  676. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  677. #
  678. # FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
  679. #
  680. [env:FYSETC_S6]
  681. platform = ${common_stm32.platform}
  682. extends = common_stm32
  683. platform_packages = ${common_stm32.platform_packages}
  684. tool-stm32duino
  685. board = fysetc_s6
  686. build_flags = ${common_stm32.build_flags}
  687. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000
  688. -DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"'
  689. extra_scripts = ${common.extra_scripts}
  690. pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
  691. debug_tool = stlink
  692. upload_protocol = dfu
  693. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  694. #
  695. # STM32F407VET6 with RAMPS-like shield
  696. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  697. # Shield - https://github.com/jmz52/Hardware
  698. #
  699. [env:STM32F407VE_black]
  700. platform = ${common_stm32.platform}
  701. extends = common_stm32
  702. board = blackSTM32F407VET6
  703. build_flags = ${common_stm32.build_flags}
  704. -DTARGET_STM32F4 -DARDUINO_BLACK_F407VE
  705. -DUSB_PRODUCT=\"BLACK_F407VE\"
  706. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  707. extra_scripts = ${common.extra_scripts}
  708. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  709. lib_ignore = SoftwareSerial
  710. #
  711. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  712. #
  713. [env:BIGTREE_SKR_PRO]
  714. platform = ${common_stm32.platform}
  715. extends = common_stm32
  716. board = BigTree_SKR_Pro
  717. build_flags = ${common_stm32.build_flags}
  718. -DUSB_PRODUCT=\"STM32F407ZG\"
  719. -DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  720. extra_scripts = ${common.extra_scripts}
  721. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  722. #upload_protocol = stlink
  723. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  724. debug_tool = stlink
  725. debug_init_break =
  726. #
  727. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  728. #
  729. [env:BIGTREE_GTR_V1_0]
  730. platform = ststm32@>=5.7.0,<6.2.0
  731. extends = common_stm32
  732. board = BigTree_GTR_v1
  733. extra_scripts = ${common.extra_scripts}
  734. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  735. build_flags = ${common_stm32.build_flags}
  736. -DUSB_PRODUCT=\"STM32F407IG\"
  737. -DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  738. #
  739. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  740. #
  741. [env:BIGTREE_BTT002]
  742. platform = ${common_stm32.platform}
  743. extends = common_stm32
  744. board = BigTree_Btt002
  745. build_flags = ${common_stm32.build_flags}
  746. -DUSB_PRODUCT=\"STM32F407VG\"
  747. -DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  748. -DHAVE_HWSERIAL2
  749. -DHAVE_HWSERIAL3
  750. -DPIN_SERIAL2_RX=PD_6
  751. -DPIN_SERIAL2_TX=PD_5
  752. extra_scripts = ${common.extra_scripts}
  753. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  754. #
  755. # Lerdge base
  756. #
  757. [lerdge_common]
  758. platform = ${common_stm32.platform}
  759. extends = common_stm32
  760. board = LERDGE
  761. board_build.offset = 0x10000
  762. extra_scripts = ${common.extra_scripts}
  763. pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
  764. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  765. buildroot/share/PlatformIO/scripts/lerdge.py
  766. build_flags = ${common_stm32.build_flags}
  767. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  768. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  769. -DTRANSFER_CLOCK_DIV=8
  770. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  771. #
  772. # Lerdge X
  773. #
  774. [env:LERDGEX]
  775. extends = lerdge_common
  776. board_build.firmware = Lerdge_X_firmware_force.bin
  777. #
  778. # Lerdge S
  779. #
  780. [env:LERDGES]
  781. extends = lerdge_common
  782. board_build.firmware = Lerdge_firmware_force.bin
  783. #
  784. # Lerdge K
  785. #
  786. [env:LERDGEK]
  787. extends = lerdge_common
  788. board_build.firmware = Lerdge_K_firmware_force.bin
  789. build_flags = ${lerdge_common.build_flags}
  790. -DLERDGEK
  791. #
  792. # RUMBA32
  793. #
  794. [env:rumba32]
  795. platform = ${common_stm32.platform}
  796. extends = common_stm32
  797. build_flags = ${common_stm32.build_flags}
  798. -Os
  799. "-DUSB_PRODUCT=\"RUMBA32\""
  800. -DHAL_PCD_MODULE_ENABLED
  801. -DDISABLE_GENERIC_SERIALUSB
  802. -DHAL_UART_MODULE_ENABLED
  803. board = rumba32_f446ve
  804. upload_protocol = dfu
  805. monitor_speed = 500000
  806. #################################
  807. # #
  808. # Other Architectures #
  809. # #
  810. #################################
  811. #
  812. # Espressif ESP32
  813. #
  814. [env:esp32]
  815. platform = espressif32@1.11.2
  816. board = esp32dev
  817. build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
  818. src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
  819. upload_speed = 115200
  820. #upload_port = marlinesp.local
  821. #board_build.flash_mode = qio
  822. #
  823. # Teensy 3.1 / 3.2 (ARM Cortex-M4)
  824. #
  825. [env:teensy31]
  826. platform = teensy
  827. board = teensy31
  828. src_filter = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
  829. #
  830. # Teensy 3.5 / 3.6 (ARM Cortex-M4)
  831. #
  832. [env:teensy35]
  833. platform = teensy
  834. board = teensy35
  835. src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
  836. #
  837. # Native
  838. # No supported Arduino libraries, base Marlin only
  839. #
  840. [env:linux_native]
  841. platform = native
  842. framework =
  843. build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
  844. src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include
  845. build_unflags = -Wall
  846. lib_ldf_mode = off
  847. lib_deps =
  848. src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
  849. #
  850. # Just print the dependency tree
  851. #
  852. [env:include_tree]
  853. platform = atmelavr
  854. board = megaatmega2560
  855. build_flags = -c -H -std=gnu++11 -Wall -Os -D__MARLIN_FIRMWARE__
  856. src_filter = +<src/Marlin.cpp>