My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

platformio.ini 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982
  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. extra_scripts = ${common.extra_scripts}
  571. #
  572. # MKS Robin E3D (STM32F103RCT6) and
  573. # MKS Robin E3 with TMC2209
  574. #
  575. [env:mks_robin_e3]
  576. platform = ${common_stm32f1.platform}
  577. extends = common_stm32f1
  578. board = genericSTM32F103RC
  579. platform_packages = tool-stm32duino
  580. extra_scripts = ${common.extra_scripts}
  581. buildroot/share/PlatformIO/scripts/mks_robin_e3.py
  582. build_flags = ${common_stm32f1.build_flags}
  583. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  584. #
  585. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  586. #
  587. [env:mks_robin_lite]
  588. platform = ${common_stm32f1.platform}
  589. extends = common_stm32f1
  590. board = genericSTM32F103RC
  591. extra_scripts = ${common.extra_scripts}
  592. buildroot/share/PlatformIO/scripts/mks_robin_lite.py
  593. #
  594. # MKS ROBIN LITE3 (STM32F103RCT6)
  595. #
  596. [env:mks_robin_lite3]
  597. platform = ${common_stm32f1.platform}
  598. extends = common_stm32f1
  599. board = genericSTM32F103RC
  600. extra_scripts = ${common.extra_scripts}
  601. buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
  602. #
  603. # JGAurora A5S A1 (STM32F103ZET6)
  604. #
  605. [env:jgaurora_a5s_a1]
  606. platform = ${common_stm32f1.platform}
  607. extends = common_stm32f1
  608. board = genericSTM32F103ZE
  609. extra_scripts = ${common.extra_scripts}
  610. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  611. build_flags = ${common_stm32f1.build_flags}
  612. -DSTM32F1xx -DSTM32_XL_DENSITY
  613. #
  614. # Malyan M200 (STM32F103CB)
  615. #
  616. [env:STM32F103CB_malyan]
  617. platform = ${common_stm32f1.platform}
  618. extends = common_stm32f1
  619. board = malyanM200
  620. build_flags = ${common_stm32f1.build_flags}
  621. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  622. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  623. lib_ignore = ${common_stm32f1.lib_ignore}
  624. SoftwareSerialM
  625. #
  626. # Malyan M200 v2 (STM32F070RB)
  627. #
  628. [env:STM32F070RB_malyan]
  629. platform = ${common_stm32.platform}
  630. extends = common_stm32
  631. board = malyanM200v2
  632. build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED
  633. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
  634. -DCUSTOM_STARTUP_FILE
  635. lib_ignore = SoftwareSerial
  636. #
  637. # Malyan M300 (STM32F070CB)
  638. #
  639. [env:malyan_M300]
  640. platform = ststm32@>=6.1.0,<6.2.0
  641. board = malyanm300_f070cb
  642. build_flags = ${common.build_flags}
  643. -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\""
  644. -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
  645. src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  646. #
  647. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  648. #
  649. [env:chitu_f103]
  650. platform = ${common_stm32f1.platform}
  651. extends = common_stm32f1
  652. board = CHITU_F103
  653. extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
  654. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  655. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  656. build_flags = ${common_stm32f1.build_flags}
  657. -DSTM32F1xx -DSTM32_XL_DENSITY
  658. build_unflags = ${common_stm32f1.build_unflags}
  659. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  660. #
  661. # Some Chitu V5 boards have a problem with GPIO init.
  662. # Use this target if G28 or G29 are always failing.
  663. #
  664. [env:chitu_v5_gpio_init]
  665. platform = ${common_stm32f1.platform}
  666. extends = env:chitu_f103
  667. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  668. #
  669. # Creality (STM32F103RET6)
  670. #
  671. [env:STM32F103RET6_creality]
  672. platform = ${common_stm32f1.platform}
  673. extends = common_stm32f1
  674. board = genericSTM32F103RC
  675. build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
  676. ${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY -DTEMP_TIMER_CHAN=4
  677. extra_scripts = ${common.extra_scripts}
  678. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  679. buildroot/share/PlatformIO/scripts/creality.py
  680. lib_ignore = ${common_stm32f1.lib_ignore}
  681. debug_tool = jlink
  682. upload_protocol = jlink
  683. monitor_speed = 115200
  684. #
  685. # STM32F401VE
  686. # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
  687. #
  688. [env:STM32F401VE_STEVAL]
  689. platform = ${common_stm32.platform}
  690. extends = common_stm32
  691. board = STEVAL_STM32F401VE
  692. build_flags = ${common_stm32.build_flags}
  693. -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
  694. -DUSB_PRODUCT=\"STEVAL_F401VE\"
  695. -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  696. extra_scripts = ${common.extra_scripts}
  697. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  698. buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py
  699. lib_ignore = SoftwareSerial
  700. #
  701. # FLYF407ZG
  702. #
  703. [env:FLYF407ZG]
  704. platform = ${common_stm32.platform}
  705. extends = common_stm32
  706. board = FLYF407ZG
  707. build_flags = ${common_stm32.build_flags}
  708. -DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\"
  709. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
  710. extra_scripts = ${common.extra_scripts}
  711. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  712. #
  713. # FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
  714. #
  715. [env:FYSETC_S6]
  716. platform = ${common_stm32.platform}
  717. extends = common_stm32
  718. platform_packages = ${common_stm32.platform_packages}
  719. tool-stm32duino
  720. board = fysetc_s6
  721. build_flags = ${common_stm32.build_flags}
  722. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000
  723. -DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"'
  724. extra_scripts = ${common.extra_scripts}
  725. pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
  726. debug_tool = stlink
  727. upload_protocol = dfu
  728. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  729. #
  730. # STM32F407VET6 with RAMPS-like shield
  731. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  732. # Shield - https://github.com/jmz52/Hardware
  733. #
  734. [env:STM32F407VE_black]
  735. platform = ${common_stm32.platform}
  736. extends = common_stm32
  737. board = blackSTM32F407VET6
  738. build_flags = ${common_stm32.build_flags}
  739. -DTARGET_STM32F4 -DARDUINO_BLACK_F407VE
  740. -DUSB_PRODUCT=\"BLACK_F407VE\"
  741. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  742. extra_scripts = ${common.extra_scripts}
  743. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  744. lib_ignore = SoftwareSerial
  745. #
  746. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  747. #
  748. [env:BIGTREE_SKR_PRO]
  749. platform = ${common_stm32.platform}
  750. extends = common_stm32
  751. board = BigTree_SKR_Pro
  752. build_flags = ${common_stm32.build_flags}
  753. -DUSB_PRODUCT=\"STM32F407ZG\"
  754. -DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  755. extra_scripts = ${common.extra_scripts}
  756. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  757. #upload_protocol = stlink
  758. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  759. debug_tool = stlink
  760. debug_init_break =
  761. #
  762. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  763. #
  764. [env:BIGTREE_GTR_V1_0]
  765. platform = ststm32@>=5.7.0,<6.2.0
  766. extends = common_stm32
  767. board = BigTree_GTR_v1
  768. extra_scripts = ${common.extra_scripts}
  769. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  770. build_flags = ${common_stm32.build_flags}
  771. -DUSB_PRODUCT=\"STM32F407IG\"
  772. -DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  773. #
  774. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  775. #
  776. [env:BIGTREE_BTT002]
  777. platform = ${common_stm32.platform}
  778. extends = common_stm32
  779. board = BigTree_Btt002
  780. build_flags = ${common_stm32.build_flags}
  781. -DUSB_PRODUCT=\"STM32F407VG\"
  782. -DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  783. -DHAVE_HWSERIAL2
  784. -DHAVE_HWSERIAL3
  785. -DPIN_SERIAL2_RX=PD_6
  786. -DPIN_SERIAL2_TX=PD_5
  787. extra_scripts = ${common.extra_scripts}
  788. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  789. #
  790. # Lerdge base
  791. #
  792. [lerdge_common]
  793. platform = ${common_stm32.platform}
  794. extends = common_stm32
  795. board = LERDGE
  796. board_build.offset = 0x10000
  797. extra_scripts = ${common.extra_scripts}
  798. pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
  799. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  800. buildroot/share/PlatformIO/scripts/lerdge.py
  801. build_flags = ${common_stm32.build_flags}
  802. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  803. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  804. -DTRANSFER_CLOCK_DIV=8 -DHAL_SRAM_MODULE_ENABLED
  805. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  806. #
  807. # Lerdge X
  808. #
  809. [env:LERDGEX]
  810. extends = lerdge_common
  811. board_build.firmware = Lerdge_X_firmware_force.bin
  812. #
  813. # Lerdge S
  814. #
  815. [env:LERDGES]
  816. extends = lerdge_common
  817. board_build.firmware = Lerdge_firmware_force.bin
  818. #
  819. # Lerdge K
  820. #
  821. [env:LERDGEK]
  822. extends = lerdge_common
  823. board_build.firmware = Lerdge_K_firmware_force.bin
  824. build_flags = ${lerdge_common.build_flags}
  825. -DLERDGEK
  826. #
  827. # RUMBA32
  828. #
  829. [env:rumba32]
  830. platform = ${common_stm32.platform}
  831. extends = common_stm32
  832. build_flags = ${common_stm32.build_flags}
  833. -Os
  834. "-DUSB_PRODUCT=\"RUMBA32\""
  835. -DHAL_PCD_MODULE_ENABLED
  836. -DDISABLE_GENERIC_SERIALUSB
  837. -DHAL_UART_MODULE_ENABLED
  838. board = rumba32_f446ve
  839. upload_protocol = dfu
  840. monitor_speed = 500000
  841. #################################
  842. # #
  843. # Other Architectures #
  844. # #
  845. #################################
  846. #
  847. # Espressif ESP32
  848. #
  849. [env:esp32]
  850. platform = espressif32@1.11.2
  851. board = esp32dev
  852. build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
  853. src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
  854. upload_speed = 115200
  855. #upload_port = marlinesp.local
  856. #board_build.flash_mode = qio
  857. #
  858. # Teensy 3.1 / 3.2 (ARM Cortex-M4)
  859. #
  860. [env:teensy31]
  861. platform = teensy
  862. board = teensy31
  863. src_filter = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
  864. #
  865. # Teensy 3.5 / 3.6 (ARM Cortex-M4)
  866. #
  867. [env:teensy35]
  868. platform = teensy
  869. board = teensy35
  870. src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
  871. #
  872. # Native
  873. # No supported Arduino libraries, base Marlin only
  874. #
  875. [env:linux_native]
  876. platform = native
  877. framework =
  878. build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
  879. src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include
  880. build_unflags = -Wall
  881. lib_ldf_mode = off
  882. lib_deps =
  883. src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
  884. #
  885. # Just print the dependency tree
  886. #
  887. [env:include_tree]
  888. platform = atmelavr
  889. board = megaatmega2560
  890. build_flags = -c -H -std=gnu++11 -Wall -Os -D__MARLIN_FIRMWARE__
  891. src_filter = +<src/MarlinCore.cpp>