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

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