My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

platformio.ini 28KB

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