My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

platformio.ini 29KB

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