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

platformio.ini 29KB

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