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 30KB

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