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 28KB

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