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

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