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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  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. # TRIGORILLA PRO (STM32F103ZET6)
  531. #
  532. [env:trigorilla_pro]
  533. platform = ${common_stm32f1.platform}
  534. extends = env:mks_robin
  535. #
  536. # MKS Robin E3D (STM32F103RCT6) and
  537. # MKS Robin E3 with TMC2209
  538. #
  539. [env:mks_robin_e3]
  540. platform = ${common_stm32f1.platform}
  541. extends = common_stm32f1
  542. board = genericSTM32F103RC
  543. platform_packages = tool-stm32duino
  544. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_e3.py
  545. build_flags = ${common_stm32f1.build_flags}
  546. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  547. #
  548. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  549. #
  550. [env:mks_robin_lite]
  551. platform = ${common_stm32f1.platform}
  552. extends = common_stm32f1
  553. board = genericSTM32F103RC
  554. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite.py
  555. #
  556. # MKS ROBIN LITE3 (STM32F103RCT6)
  557. #
  558. [env:mks_robin_lite3]
  559. platform = ${common_stm32f1.platform}
  560. extends = common_stm32f1
  561. board = genericSTM32F103RC
  562. extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
  563. #
  564. # JGAurora A5S A1 (STM32F103ZET6)
  565. #
  566. [env:jgaurora_a5s_a1]
  567. platform = ${common_stm32f1.platform}
  568. extends = common_stm32f1
  569. board = genericSTM32F103ZE
  570. extra_scripts = buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  571. build_flags = ${common_stm32f1.build_flags}
  572. -DSTM32F1xx -DSTM32_XL_DENSITY
  573. #
  574. # Malyan M200 (STM32F103CB)
  575. #
  576. [env:STM32F103CB_malyan]
  577. platform = ${common_stm32f1.platform}
  578. extends = common_stm32f1
  579. board = malyanM200
  580. build_flags = ${common_stm32f1.build_flags}
  581. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  582. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  583. lib_ignore = ${common_stm32f1.lib_ignore}
  584. LiquidCrystal, LiquidTWI2, TMCStepper, U8glib-HAL, SoftwareSerialM
  585. #
  586. # Malyan M200 v2 (STM32F070RB)
  587. #
  588. [env:STM32F070RB_malyan]
  589. platform = ${common_stm32.platform}
  590. extends = common_stm32
  591. board = malyanM200v2
  592. build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED
  593. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
  594. -DCUSTOM_STARTUP_FILE
  595. lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL, SoftwareSerial
  596. #
  597. # Malyan M300 (STM32F070CB)
  598. #
  599. [env:malyan_M300]
  600. platform = ststm32@>=6.1.0,<6.2.0
  601. board = malyanm300_f070cb
  602. build_flags = ${common.build_flags}
  603. -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\""
  604. -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
  605. src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  606. lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL
  607. #
  608. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  609. #
  610. [env:chitu_f103]
  611. platform = ${common_stm32f1.platform}
  612. extends = common_stm32f1
  613. board = CHITU_F103
  614. extra_scripts = pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  615. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  616. build_flags = ${common_stm32f1.build_flags}
  617. -DSTM32F1xx -DSTM32_XL_DENSITY
  618. build_unflags = ${common_stm32f1.build_unflags}
  619. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  620. #
  621. # Some Chitu V5 boards have a problem with GPIO init.
  622. # Use this target if G28 or G29 are always failing.
  623. #
  624. [env:chitu_v5_gpio_init]
  625. platform = ${common_stm32f1.platform}
  626. extends = env:chitu_f103
  627. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  628. #
  629. # Chitu boards like Tronxy X5SA (STM32F103ZET6) using TFT LVGL UI
  630. #
  631. [env:chitu_f103_lvgl]
  632. platform = ${common_stm32f1.platform}
  633. extends = env:chitu_f103
  634. src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
  635. lib_deps = ${common.lib_deps}
  636. SoftwareSerialM
  637. MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
  638. #
  639. # Creality (STM32F103RET6)
  640. #
  641. [env:STM32F103RET6_creality]
  642. platform = ${common_stm32f1.platform}
  643. extends = common_stm32f1
  644. board = genericSTM32F103RC
  645. build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
  646. ${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY -DTEMP_TIMER_CHAN=4
  647. extra_scripts = buildroot/share/PlatformIO/scripts/creality.py
  648. lib_ignore = ${common_stm32f1.lib_ignore}
  649. LiquidCrystal, LiquidTWI2, U8glib-HAL, Adafruit_MAX31865, Arduino-L6470, SailfishLCD, SlowSoftI2CMaster
  650. debug_tool = jlink
  651. upload_protocol = jlink
  652. monitor_speed = 115200
  653. #
  654. # STM32F401VE
  655. # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
  656. #
  657. [env:STM32F401VE_STEVAL]
  658. platform = ${common_stm32.platform}
  659. extends = common_stm32
  660. board = STEVAL_STM32F401VE
  661. build_flags = ${common_stm32.build_flags}
  662. -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
  663. -DUSB_PRODUCT=\"STEVAL_F401VE\"
  664. -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  665. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  666. buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py
  667. lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
  668. #
  669. # FLYF407ZG
  670. #
  671. [env:FLYF407ZG]
  672. platform = ${common_stm32.platform}
  673. extends = common_stm32
  674. board = FLYF407ZG
  675. build_flags = ${common_stm32.build_flags}
  676. -DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\"
  677. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
  678. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  679. #
  680. # FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
  681. #
  682. [env:FYSETC_S6]
  683. platform = ${common_stm32.platform}
  684. extends = common_stm32
  685. platform_packages = ${common_stm32.platform_packages}
  686. tool-stm32duino
  687. board = fysetc_s6
  688. build_flags = ${common_stm32.build_flags}
  689. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000
  690. -DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"'
  691. extra_scripts = pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
  692. debug_tool = stlink
  693. upload_protocol = dfu
  694. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  695. #
  696. # STM32F407VET6 with RAMPS-like shield
  697. # 'Black' STM32F407VET6 board - http://wiki.stm32duino.com/index.php?title=STM32F407
  698. # Shield - https://github.com/jmz52/Hardware
  699. #
  700. [env:STM32F407VE_black]
  701. platform = ${common_stm32.platform}
  702. extends = common_stm32
  703. board = blackSTM32F407VET6
  704. build_flags = ${common_stm32.build_flags}
  705. -DTARGET_STM32F4 -DARDUINO_BLACK_F407VE
  706. -DUSB_PRODUCT=\"BLACK_F407VE\"
  707. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  708. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  709. lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, 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 = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  721. #upload_protocol = stlink
  722. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  723. debug_tool = stlink
  724. debug_init_break =
  725. #
  726. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  727. #
  728. [env:BIGTREE_GTR_V1_0]
  729. platform = ststm32@>=5.7.0,<6.2.0
  730. extends = common_stm32
  731. board = BigTree_GTR_v1
  732. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  733. build_flags = ${common_stm32.build_flags}
  734. -DUSB_PRODUCT=\"STM32F407IG\"
  735. -DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  736. #
  737. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  738. #
  739. [env:BIGTREE_BTT002]
  740. platform = ${common_stm32.platform}
  741. extends = common_stm32
  742. board = BigTree_Btt002
  743. build_flags = ${common_stm32.build_flags}
  744. -DUSB_PRODUCT=\"STM32F407VG\"
  745. -DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  746. -DHAVE_HWSERIAL2
  747. -DHAVE_HWSERIAL3
  748. -DPIN_SERIAL2_RX=PD_6
  749. -DPIN_SERIAL2_TX=PD_5
  750. extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  751. lib_ignore = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
  752. #
  753. # Lerdge base
  754. #
  755. [lerdge_common]
  756. platform = ${common_stm32.platform}
  757. extends = common_stm32
  758. board = LERDGE
  759. board_build.offset = 0x10000
  760. extra_scripts = pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
  761. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  762. buildroot/share/PlatformIO/scripts/lerdge.py
  763. build_flags = ${common_stm32.build_flags}
  764. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  765. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  766. -DTRANSFER_CLOCK_DIV=8
  767. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  768. #
  769. # Lerdge X
  770. #
  771. [env:LERDGEX]
  772. extends = lerdge_common
  773. board_build.firmware = Lerdge_X_firmware_force.bin
  774. #
  775. # Lerdge S
  776. #
  777. [env:LERDGES]
  778. extends = lerdge_common
  779. board_build.firmware = Lerdge_firmware_force.bin
  780. #
  781. # Lerdge K
  782. #
  783. [env:LERDGEK]
  784. extends = lerdge_common
  785. board_build.firmware = Lerdge_K_firmware_force.bin
  786. build_flags = ${lerdge_common.build_flags}
  787. -DLERDGEK
  788. #
  789. # RUMBA32
  790. #
  791. [env:rumba32]
  792. platform = ${common_stm32.platform}
  793. extends = common_stm32
  794. build_flags = ${common_stm32.build_flags}
  795. -Os
  796. "-DUSB_PRODUCT=\"RUMBA32\""
  797. -DHAL_PCD_MODULE_ENABLED
  798. -DDISABLE_GENERIC_SERIALUSB
  799. -DHAL_UART_MODULE_ENABLED
  800. board = rumba32_f446ve
  801. upload_protocol = dfu
  802. monitor_speed = 500000
  803. #################################
  804. # #
  805. # Other Architectures #
  806. # #
  807. #################################
  808. #
  809. # Espressif ESP32
  810. #
  811. [env:esp32]
  812. platform = espressif32@1.11.2
  813. board = esp32dev
  814. build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
  815. lib_deps = ${common.lib_deps}
  816. AsyncTCP=https://github.com/me-no-dev/AsyncTCP/archive/master.zip
  817. ESPAsyncWebServer=https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip
  818. ESP3DLib=https://github.com/luc-github/ESP3DLib.git
  819. arduinoWebSockets=https://github.com/Links2004/arduinoWebSockets.git
  820. ESP32SSDP=https://github.com/luc-github/ESP32SSDP.git
  821. lib_ignore = LiquidCrystal, LiquidTWI2, SailfishLCD, ESPAsyncTCP
  822. src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
  823. upload_speed = 115200
  824. #upload_port = marlinesp.local
  825. #board_build.flash_mode = qio
  826. #
  827. # Teensy 3.1 / 3.2 (ARM Cortex-M4)
  828. #
  829. [env:teensy31]
  830. platform = teensy
  831. board = teensy31
  832. lib_deps = ${common.lib_deps}
  833. TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
  834. lib_ignore = Adafruit NeoPixel
  835. src_filter = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
  836. #
  837. # Teensy 3.5 / 3.6 (ARM Cortex-M4)
  838. #
  839. [env:teensy35]
  840. platform = teensy
  841. board = teensy35
  842. lib_deps = ${common.lib_deps}
  843. TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
  844. lib_ignore = Adafruit NeoPixel
  845. src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
  846. #
  847. # Native
  848. # No supported Arduino libraries, base Marlin only
  849. #
  850. [env:linux_native]
  851. platform = native
  852. framework =
  853. build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
  854. src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include
  855. build_unflags = -Wall
  856. lib_ldf_mode = off
  857. lib_deps =
  858. src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
  859. #
  860. # Just print the dependency tree
  861. #
  862. [env:include_tree]
  863. platform = atmelavr
  864. board = megaatmega2560
  865. build_flags = -c -H -std=gnu++11 -Wall -Os -D__MARLIN_FIRMWARE__
  866. lib_deps = ${common.lib_deps}
  867. TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
  868. src_filter = +<src/Marlin.cpp>