My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

platformio.ini 30KB

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