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

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