My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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