platformio.ini 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286
  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>
  26. -<src/lcd/menu>
  27. -<src/lcd/menu/game/game.cpp> -<src/lcd/menu/game/brickout.cpp> -<src/lcd/menu/game/invaders.cpp>
  28. -<src/lcd/menu/game/maze.cpp> -<src/lcd/menu/game/snake.cpp>
  29. -<src/lcd/menu/menu_backlash.cpp>
  30. -<src/lcd/menu/menu_bed_corners.cpp>
  31. -<src/lcd/menu/menu_bed_leveling.cpp>
  32. -<src/lcd/menu/menu_cancelobject.cpp>
  33. -<src/lcd/menu/menu_delta_calibrate.cpp>
  34. -<src/lcd/menu/menu_filament.cpp>
  35. -<src/lcd/menu/menu_info.cpp>
  36. -<src/lcd/menu/menu_job_recovery.cpp>
  37. -<src/lcd/menu/menu_led.cpp>
  38. -<src/lcd/menu/menu_media.cpp>
  39. -<src/lcd/menu/menu_mmu2.cpp>
  40. -<src/lcd/menu/menu_password.cpp>
  41. -<src/lcd/menu/menu_power_monitor.cpp>
  42. -<src/lcd/menu/menu_spindle_laser.cpp>
  43. -<src/lcd/menu/menu_temperature.cpp>
  44. -<src/lcd/menu/menu_tmc.cpp>
  45. -<src/lcd/menu/menu_touch_screen.cpp>
  46. -<src/lcd/menu/menu_ubl.cpp>
  47. -<src/lcd/extui/lib/mks_ui>
  48. -<src/lcd/extui/lib/dgus> -<src/lcd/extui/dgus_lcd.cpp>
  49. -<src/lcd/extui/example.cpp>
  50. -<src/lcd/extui/malyan_lcd.cpp>
  51. -<src/lcd/extui/lib/ftdi_eve_touch_ui>
  52. -<src/lcd/extui/lib/anycubic_i3mega>
  53. -<src/lcd/extui/anycubic_tft.cpp>
  54. -<src/lcd/lcdprint.cpp>
  55. -<src/sd/usb_flashdrive>
  56. -<src/feature/backlash.cpp>
  57. -<src/feature/baricuda.cpp> -<src/gcode/feature/baricuda>
  58. -<src/feature/bedlevel/abl> -<src/gcode/bedlevel/abl>
  59. -<src/feature/bedlevel/mbl> -<src/gcode/bedlevel/mbl>
  60. -<src/feature/bedlevel/ubl> -<src/gcode/bedlevel/ubl>
  61. -<src/feature/binary_stream.cpp> -<src/libs/heatshrink>
  62. -<src/feature/bltouch.cpp>
  63. -<src/feature/cancel_object.cpp> -<src/gcode/feature/cancel>
  64. -<src/feature/caselight> -<src/gcode/feature/caselight>
  65. -<src/feature/closedloop.cpp>
  66. -<src/feature/controllerfan.cpp> -<src/gcode/feature/controllerfan>
  67. -<src/feature/dac> -<src/feature/digipot>
  68. -<src/feature/direct_stepping.cpp> -<src/gcode/motion/G6.cpp>
  69. -<src/feature/e_parser.cpp>
  70. -<src/feature/encoder_i2c.cpp>
  71. -<src/feature/fanmux.cpp>
  72. -<src/feature/filwidth.cpp> -<src/gcode/feature/filwidth>
  73. -<src/feature/fwretract.cpp> -<src/gcode/feature/fwretract>
  74. -<src/feature/host_actions.cpp>
  75. -<src/feature/hotend_idle.cpp>
  76. -<src/feature/joystick.cpp>
  77. -<src/feature/leds/blinkm.cpp>
  78. -<src/feature/leds/leds.cpp>
  79. -<src/feature/leds/pca9533.cpp>
  80. -<src/feature/leds/pca9632.cpp>
  81. -<src/feature/leds/printer_event_leds.cpp>
  82. -<src/feature/leds/tempstat.cpp>
  83. -<src/feature/max7219.cpp>
  84. -<src/feature/mixing.cpp>
  85. -<src/feature/mmu2> -<src/gcode/feature/prusa_MMU2>
  86. -<src/feature/password> -<src/gcode/feature/password>
  87. -<src/feature/pause.cpp>
  88. -<src/feature/power.cpp>
  89. -<src/feature/power_monitor.cpp> -<src/gcode/feature/power_monitor>
  90. -<src/feature/powerloss.cpp> -<src/gcode/feature/powerloss>
  91. -<src/feature/probe_temp_comp.cpp>
  92. -<src/feature/runout.cpp> -<src/gcode/feature/runout>
  93. -<src/feature/snmm.cpp>
  94. -<src/feature/solenoid.cpp>
  95. -<src/feature/spindle_laser.cpp> -<src/gcode/control/M3-M5.cpp>
  96. -<src/feature/tmc_util.cpp> -<src/module/stepper/trinamic.cpp>
  97. -<src/feature/twibus.cpp>
  98. -<src/feature/z_stepper_align.cpp>
  99. -<src/gcode/bedlevel/G26.cpp>
  100. -<src/gcode/bedlevel/G35.cpp>
  101. -<src/gcode/bedlevel/G42.cpp>
  102. -<src/gcode/bedlevel/M420.cpp>
  103. -<src/gcode/calibrate/G33.cpp>
  104. -<src/gcode/calibrate/G34_M422.cpp>
  105. -<src/gcode/calibrate/G76_M871.cpp>
  106. -<src/gcode/calibrate/G425.cpp>
  107. -<src/gcode/calibrate/M12.cpp>
  108. -<src/gcode/calibrate/M48.cpp>
  109. -<src/gcode/calibrate/M100.cpp>
  110. -<src/gcode/calibrate/M425.cpp>
  111. -<src/gcode/calibrate/M666.cpp>
  112. -<src/gcode/calibrate/M852.cpp>
  113. -<src/gcode/config/M43.cpp>
  114. -<src/gcode/config/M217.cpp>
  115. -<src/gcode/config/M218.cpp>
  116. -<src/gcode/config/M221.cpp>
  117. -<src/gcode/config/M281.cpp>
  118. -<src/gcode/config/M302.cpp>
  119. -<src/gcode/config/M305.cpp>
  120. -<src/gcode/config/M540.cpp>
  121. -<src/gcode/control/M7-M9.cpp>
  122. -<src/gcode/control/M211.cpp>
  123. -<src/gcode/control/M605.cpp>
  124. -<src/gcode/feature/advance>
  125. -<src/gcode/feature/camera>
  126. -<src/gcode/feature/i2c>
  127. -<src/gcode/feature/L6470>
  128. -<src/gcode/feature/leds/M150.cpp>
  129. -<src/gcode/feature/leds/M7219.cpp>
  130. -<src/gcode/feature/macro>
  131. -<src/gcode/feature/mixing/M163-M165.cpp>
  132. -<src/gcode/feature/mixing/M166.cpp>
  133. -<src/gcode/feature/pause/G27.cpp>
  134. -<src/gcode/feature/pause/G60.cpp>
  135. -<src/gcode/feature/pause/G61.cpp>
  136. -<src/gcode/feature/pause/M125.cpp>
  137. -<src/gcode/feature/pause/M600.cpp>
  138. -<src/gcode/feature/pause/M603.cpp>
  139. -<src/gcode/feature/pause/M701_M702.cpp>
  140. -<src/gcode/feature/trinamic/M122.cpp>
  141. -<src/gcode/feature/trinamic/M569.cpp>
  142. -<src/gcode/feature/trinamic/M906.cpp>
  143. -<src/gcode/feature/trinamic/M911-M914.cpp>
  144. -<src/gcode/geometry/G17-G19.cpp>
  145. -<src/gcode/geometry/G53-G59.cpp>
  146. -<src/gcode/geometry/M206_M428.cpp>
  147. -<src/gcode/host/M16.cpp>
  148. -<src/gcode/host/M113.cpp>
  149. -<src/gcode/host/M360.cpp>
  150. -<src/gcode/host/M876.cpp>
  151. -<src/gcode/lcd/M0_M1.cpp>
  152. -<src/gcode/lcd/M145.cpp>
  153. -<src/gcode/lcd/M250.cpp>
  154. -<src/gcode/lcd/M73.cpp>
  155. -<src/gcode/lcd/M995.cpp>
  156. -<src/gcode/motion/G2_G3.cpp>
  157. -<src/gcode/motion/G5.cpp>
  158. -<src/gcode/motion/G80.cpp>
  159. -<src/gcode/motion/M290.cpp>
  160. -<src/gcode/probe/G30.cpp>
  161. -<src/gcode/probe/G31_G32.cpp>
  162. -<src/gcode/probe/G38.cpp>
  163. -<src/gcode/probe/M401_M402.cpp>
  164. -<src/gcode/probe/M851.cpp>
  165. -<src/gcode/probe/M951.cpp>
  166. -<src/gcode/scara>
  167. -<src/gcode/sd>
  168. -<src/gcode/temp/M104_M109.cpp>
  169. -<src/gcode/units/G20_G21.cpp>
  170. -<src/gcode/units/M149.cpp>
  171. -<src/libs/L64XX> -<src/module/stepper/L64xx.cpp>
  172. -<src/libs/hex_print.cpp>
  173. -<src/libs/least_squares_fit.cpp>
  174. -<src/libs/nozzle.cpp> -<src/gcode/feature/clean>
  175. -<src/module/delta.cpp>
  176. -<src/module/planner_bezier.cpp>
  177. -<src/module/printcounter.cpp>
  178. -<src/module/probe.cpp>
  179. -<src/module/scara.cpp> -<src/gcode/calibrate/M665.cpp>
  180. -<src/module/stepper/TMC26X.cpp>
  181. extra_scripts =
  182. pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
  183. pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
  184. build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
  185. lib_deps =
  186. #
  187. # Feature Dependencies
  188. #
  189. [features]
  190. HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
  191. build_src_filter=+<src/lcd/extui/lib/mks_ui>
  192. extra_scripts=download_mks_assets.py
  193. HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.1
  194. build_src_filter=+<src/feature/tmc_util.cpp> +<src/module/stepper/trinamic.cpp> +<src/gcode/feature/trinamic/M122.cpp> +<src/gcode/feature/trinamic/M906.cpp> +<src/gcode/feature/trinamic/M911-M914.cpp>
  195. HAS_STEALTHCHOP = build_src_filter=+<src/gcode/feature/trinamic/M569.cpp>
  196. SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
  197. HAS_I2C_DIGIPOT = SlowSoftI2CMaster
  198. build_src_filter=+<src/feature/digipot>
  199. HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/master.zip
  200. build_src_filter=+<src/module/TMC26X.cpp>
  201. HAS_L64XX = Arduino-L6470@0.8.0
  202. build_src_filter=+<src/libs/L64XX> +<src/module/stepper/L64xx.cpp> +<src/gcode/feature/L6470>
  203. NEOPIXEL_LED = Adafruit NeoPixel@1.5.0
  204. build_src_filter=+<src/feature/leds/neopixel.cpp>
  205. MAX6675_IS_MAX31865 = Adafruit MAX31865 library@~1.1.0
  206. HAS_GRAPHICAL_LCD = U8glib-HAL@0.4.1
  207. build_src_filter=+<src/lcd/dogm>
  208. USES_LIQUIDCRYSTAL = LiquidCrystal@1.5.0
  209. USES_LIQUIDTWI2 = LiquidTWI2@1.2.7
  210. DWIN_CREALITY_LCD = build_src_filter=+<src/lcd/dwin>
  211. HAS_CHARACTER_LCD = build_src_filter=+<src/lcd/HD44780>
  212. HAS_GRAPHICAL_TFT = build_src_filter=+<src/lcd/tft>
  213. HAS_LCD_MENU = build_src_filter=+<src/lcd/menu>
  214. HAS_GAMES = build_src_filter=+<src/lcd/menu/game/game.cpp>
  215. MARLIN_BRICKOUT = build_src_filter=+<src/lcd/menu/game/brickout.cpp>
  216. MARLIN_INVADERS = build_src_filter=+<src/lcd/menu/game/invaders.cpp>
  217. MARLIN_MAZE = build_src_filter=+<src/lcd/menu/game/maze.cpp>
  218. MARLIN_SNAKE = build_src_filter=+<src/lcd/menu/game/snake.cpp>
  219. HAS_MENU_BACKLASH = build_src_filter=+<src/lcd/menu/menu_backlash.cpp>
  220. HAS_MENU_BED_CORNERS = build_src_filter=+<src/lcd/menu/menu_bed_corners.cpp>
  221. LCD_BED_LEVELING = build_src_filter=+<src/lcd/menu/menu_bed_leveling.cpp>
  222. HAS_MENU_CANCELOBJECT = build_src_filter=+<src/lcd/menu/menu_cancelobject.cpp>
  223. HAS_MENU_DELTA_CALIBRATE = build_src_filter=+<src/lcd/menu/menu_delta_calibrate.cpp>
  224. HAS_MENU_FILAMENT = build_src_filter=+<src/lcd/menu/menu_filament.cpp>
  225. LCD_INFO_MENU = build_src_filter=+<src/lcd/menu/menu_info.cpp>
  226. HAS_MENU_JOB_RECOVERY = build_src_filter=+<src/lcd/menu/menu_job_recovery.cpp>
  227. HAS_MENU_LED = build_src_filter=+<src/lcd/menu/menu_led.cpp>
  228. HAS_MENU_MEDIA = build_src_filter=+<src/lcd/menu/menu_media.cpp>
  229. HAS_MENU_MIXER = build_src_filter=+<src/lcd/menu/menu_mixer.cpp>
  230. HAS_MENU_MMU2 = build_src_filter=+<src/lcd/menu/menu_mmu2.cpp>
  231. HAS_MENU_PASSWORD = build_src_filter=+<src/lcd/menu/menu_password.cpp>
  232. HAS_MENU_POWER_MONITOR = build_src_filter=+<src/lcd/menu/menu_power_monitor.cpp>
  233. HAS_MENU_CUTTER = build_src_filter=+<src/lcd/menu/menu_spindle_laser.cpp>
  234. HAS_MENU_TEMPERATURE = build_src_filter=+<src/lcd/menu/menu_temperature.cpp>
  235. HAS_MENU_TMC = build_src_filter=+<src/lcd/menu/menu_tmc.cpp>
  236. HAS_MENU_TOUCH_SCREEN = build_src_filter=+<src/lcd/menu/menu_touch_screen.cpp>
  237. HAS_MENU_UBL = build_src_filter=+<src/lcd/menu/menu_ubl.cpp>
  238. ANYCUBIC_LCD_I3MEGA = build_src_filter=+<src/lcd/extui/lib/anycubic_i3mega>
  239. HAS_DGUS_LCD = build_src_filter=+<src/lcd/extui/lib/dgus> +<src/lcd/extui/dgus_lcd.cpp>
  240. TOUCH_UI_FTDI_EVE = build_src_filter=+<src/lcd/extui/lib/ftdi_eve_touch_ui>
  241. HAS_ANYCUBIC_TFT_EXTUI = build_src_filter=+<src/lcd/extui/anycubic_tft.cpp>
  242. EXTUI_EXAMPLE = build_src_filter=+<src/lcd/extui/example.cpp>
  243. MALYAN_LCD = build_src_filter=+<src/lcd/extui/malyan_lcd.cpp>
  244. HAS_SPI_LCD = build_src_filter=+<src/lcd/lcdprint.cpp>
  245. USB_FLASH_DRIVE_SUPPORT = build_src_filter=+<src/sd/usb_flashdrive>
  246. AUTO_BED_LEVELING_BILINEAR = build_src_filter=+<src/feature/bedlevel/abl>
  247. AUTO_BED_LEVELING_(3POINT|(BI)?LINEAR) = build_src_filter=+<src/gcode/bedlevel/abl>
  248. MESH_BED_LEVELING = build_src_filter=+<src/feature/bedlevel/mbl> +<src/gcode/bedlevel/mbl>
  249. AUTO_BED_LEVELING_UBL = build_src_filter=+<src/feature/bedlevel/ubl> +<src/gcode/bedlevel/ubl>
  250. BACKLASH_COMPENSATION = build_src_filter=+<src/feature/backlash.cpp>
  251. BARICUDA = build_src_filter=+<src/feature/baricuda.cpp> +<src/gcode/feature/baricuda>
  252. BINARY_FILE_TRANSFER = build_src_filter=+<src/feature/binary_stream.cpp> +<src/libs/heatshrink>
  253. BLTOUCH = build_src_filter=+<src/feature/bltouch.cpp>
  254. CANCEL_OBJECTS = build_src_filter=+<src/feature/cancel_object.cpp> +<src/gcode/feature/cancel>
  255. CASE_LIGHT_ENABLE = build_src_filter=+<src/feature/caselight> +<src/gcode/feature/caselight>
  256. EXTERNAL_CLOSED_LOOP_CONTROLLER = build_src_filter=+<src/feature/closedloop.cpp> +<src/gcode/calibrate/M12.cpp>
  257. USE_CONTROLLER_FAN = build_src_filter=+<src/feature/controllerfan.cpp>
  258. DAC_STEPPER_CURRENT = build_src_filter=+<src/feature/dac>
  259. DIRECT_STEPPING = build_src_filter=+<src/feature/direct_stepping.cpp> +<src/gcode/motion/G6.cpp>
  260. EMERGENCY_PARSER = build_src_filter=+<src/feature/e_parser.cpp> -<src/gcode/control/M108_*.cpp>
  261. I2C_POSITION_ENCODERS = build_src_filter=+<src/feature/encoder_i2c.cpp>
  262. HAS_FANMUX = build_src_filter=+<src/feature/fanmux.cpp>
  263. FILAMENT_WIDTH_SENSOR = build_src_filter=+<src/feature/filwidth.cpp> +<src/gcode/feature/filwidth>
  264. FWRETRACT = build_src_filter=+<src/feature/fwretract.cpp> +<src/gcode/feature/fwretract>
  265. HOST_ACTION_COMMANDS = build_src_filter=+<src/feature/host_actions.cpp>
  266. HOTEND_IDLE_TIMEOUT = build_src_filter=+<src/feature/hotend_idle.cpp>
  267. JOYSTICK = build_src_filter=+<src/feature/joystick.cpp>
  268. BLINKM = build_src_filter=+<src/feature/leds/blinkm.cpp>
  269. HAS_COLOR_LEDS = build_src_filter=+<src/feature/leds/leds.cpp> +<src/gcode/feature/leds/M150.cpp>
  270. PCA9533 = build_src_filter=+<src/feature/leds/pca9533.cpp>
  271. PCA9632 = build_src_filter=+<src/feature/leds/pca9632.cpp>
  272. PRINTER_EVENT_LEDS = build_src_filter=+<src/feature/leds/printer_event_leds.cpp>
  273. TEMP_STAT_LEDS = build_src_filter=+<src/feature/leds/tempstat.cpp>
  274. MAX7219_DEBUG = build_src_filter=+<src/feature/max7219.cpp> +<src/gcode/feature/leds/M7219.cpp>
  275. MIXING_EXTRUDER = build_src_filter=+<src/feature/mixing.cpp> +<src/gcode/feature/mixing/M163-M165.cpp>
  276. PRUSA_MMU2 = build_src_filter=+<src/feature/mmu2> +<src/gcode/feature/prusa_MMU2>
  277. PASSWORD_FEATURE = build_src_filter=+<src/feature/password> +<src/gcode/feature/password>
  278. ADVANCED_PAUSE_FEATURE = build_src_filter=+<src/feature/pause.cpp> +<src/gcode/feature/pause/M600.cpp> +<src/gcode/feature/pause/M603.cpp>
  279. AUTO_POWER_CONTROL = build_src_filter=+<src/feature/power.cpp>
  280. HAS_POWER_MONITOR = build_src_filter=+<src/feature/power_monitor.cpp> +<src/gcode/feature/power_monitor>
  281. POWER_LOSS_RECOVERY = build_src_filter=+<src/feature/powerloss.cpp> +<src/gcode/feature/powerloss>
  282. PROBE_TEMP_COMPENSATION = build_src_filter=+<src/feature/probe_temp_comp.cpp> +<src/gcode/calibrate/G76_M871.cpp>
  283. HAS_FILAMENT_SENSOR = build_src_filter=+<src/feature/runout.cpp> +<src/gcode/feature/runout>
  284. MK2_MULTIPLEXER = build_src_filter=+<src/feature/snmm.cpp>
  285. EXT_SOLENOID|MANUAL_SOLENOID_CONTROL = build_src_filter=+<src/feature/solenoid.cpp>
  286. HAS_CUTTER = build_src_filter=+<src/feature/spindle_laser.cpp> +<src/gcode/control/M3-M5.cpp>
  287. EXPERIMENTAL_I2CBUS = build_src_filter=+<src/feature/twibus.cpp> +<src/gcode/feature/i2c>
  288. Z_STEPPER_AUTO_ALIGN = build_src_filter=+<src/feature/z_stepper_align.cpp> +<src/gcode/calibrate/G34_M422.cpp>
  289. G26_MESH_VALIDATION = build_src_filter=+<src/gcode/bedlevel/G26.cpp>
  290. ASSISTED_TRAMMING = build_src_filter=+<src/gcode/bedlevel/G35.cpp>
  291. HAS_MESH = build_src_filter=+<src/gcode/bedlevel/G42.cpp>
  292. HAS_LEVELING = build_src_filter=+<src/gcode/bedlevel/M420.cpp>
  293. DELTA_AUTO_CALIBRATION = build_src_filter=+<src/gcode/calibrate/G33.cpp>
  294. CALIBRATION_GCODE = build_src_filter=+<src/gcode/calibrate/G425.cpp>
  295. Z_MIN_PROBE_REPEATABILITY_TEST = build_src_filter=+<src/gcode/calibrate/M48.cpp>
  296. M100_FREE_MEMORY_WATCHER = build_src_filter=+<src/gcode/calibrate/M100.cpp>
  297. BACKLASH_GCODE = build_src_filter=+<src/gcode/calibrate/M425.cpp>
  298. IS_KINEMATIC = build_src_filter=+<src/gcode/calibrate/M665.cpp>
  299. HAS_EXTRA_ENDSTOPS = build_src_filter=+<src/gcode/calibrate/M666.cpp>
  300. SKEW_CORRECTION_GCODE = build_src_filter=+<src/gcode/calibrate/M852.cpp>
  301. PINS_DEBUGGING = build_src_filter=-<src/gcode/config/M43.cpp>
  302. NO_VOLUMETRICS = build_src_filter=-<src/gcode/config/M200-M205.cpp>
  303. HAS_MULTI_EXTRUDER = build_src_filter=+<src/gcode/config/M217.cpp>
  304. HAS_HOTEND_OFFSET = build_src_filter=+<src/gcode/config/M218.cpp>
  305. EDITABLE_SERVO_ANGLES = build_src_filter=+<src/gcode/config/M281.cpp>
  306. PREVENT_COLD_EXTRUSION = build_src_filter=+<src/gcode/config/M302.cpp>
  307. HAS_USER_THERMISTORS = build_src_filter=+<src/gcode/config/M305.cpp>
  308. SD_ABORT_ON_ENDSTOP_HIT = build_src_filter=+<src/gcode/config/M540.cpp>
  309. COOLANT_CONTROL = build_src_filter=+<src/gcode/control/M7-M9.cpp>
  310. HAS_SOFTWARE_ENDSTOPS = build_src_filter=+<src/gcode/control/M211.cpp>
  311. HAS_DUPLICATION_MODE = build_src_filter=+<src/gcode/control/M605.cpp>
  312. LIN_ADVANCE = build_src_filter=+<src/gcode/feature/advance>
  313. PHOTO_GCODE = build_src_filter=+<src/gcode/feature/camera>
  314. CONTROLLER_FAN_EDITABLE = build_src_filter=+<src/gcode/feature/controllerfan>
  315. GCODE_MACROS = build_src_filter=+<src/gcode/feature/macro>
  316. GRADIENT_MIX = build_src_filter=+<src/gcode/feature/mixing/M166.cpp>
  317. HAS_SAVED_POSITIONS = build_src_filter=+<src/gcode/feature/pause/G60.cpp> +<src/gcode/feature/pause/G61.cpp>
  318. PARK_HEAD_ON_PAUSE = build_src_filter=+<src/gcode/feature/pause/M125.cpp>
  319. FILAMENT_LOAD_UNLOAD_GCODES = build_src_filter=+<src/gcode/feature/pause/M701_M702.cpp>
  320. CNC_WORKSPACE_PLANES = build_src_filter=+<src/gcode/geometry/G17-G19.cpp>
  321. CNC_COORDINATE_SYSTEMS = build_src_filter=+<src/gcode/geometry/G53-G59.cpp>
  322. HAS_M206_COMMAND = build_src_filter=+<src/gcode/geometry/M206_M428.cpp>
  323. EXPECTED_PRINTER_CHECK = build_src_filter=+<src/gcode/host/M16.cpp>
  324. HOST_KEEPALIVE_FEATURE = build_src_filter=+<src/gcode/host/M113.cpp>
  325. REPETIER_GCODE_M360 = build_src_filter=+<src/gcode/host/M360.cpp>
  326. HAS_GCODE_M876 = build_src_filter=+<src/gcode/host/M876.cpp>
  327. HAS_RESUME_CONTINUE = build_src_filter=+<src/gcode/lcd/M0_M1.cpp>
  328. HAS_PREHEAT_COUNT = build_src_filter=+<src/gcode/lcd/M145.cpp>
  329. HAS_LCD_CONTRAST = build_src_filter=+<src/gcode/lcd/M250.cpp>
  330. LCD_SET_PROGRESS_MANUALLY = build_src_filter=+<src/gcode/lcd/M73.cpp>
  331. TOUCH_SCREEN_CALIBRATION = build_src_filter=+<src/gcode/lcd/M995.cpp>
  332. ARC_SUPPORT = build_src_filter=+<src/gcode/motion/G2_G3.cpp>
  333. GCODE_MOTION_MODES = build_src_filter=+<src/gcode/motion/G80.cpp>
  334. BABYSTEPPING = build_src_filter=+<src/gcode/motion/M290.cpp>
  335. Z_PROBE_SLED = build_src_filter=+<src/gcode/probe/G31_G32.cpp>
  336. G38_PROBE_TARGET = build_src_filter=+<src/gcode/probe/G38.cpp>
  337. MAGNETIC_PARKING_EXTRUDER = build_src_filter=+<src/gcode/probe/M951.cpp>
  338. SDSUPPORT = build_src_filter=+<src/gcode/sd>
  339. HAS_EXTRUDERS = build_src_filter=+<src/gcode/temp/M104_M109.cpp> +<src/gcode/config/M221.cpp>
  340. INCH_MODE_SUPPORT = build_src_filter=+<src/gcode/units/G20_G21.cpp>
  341. TEMPERATURE_UNITS_SUPPORT = build_src_filter=+<src/gcode/units/M149.cpp>
  342. NEED_HEX_PRINT = build_src_filter=+<src/libs/hex_print.cpp>
  343. NEED_LSF = build_src_filter=+<src/libs/least_squares_fit.cpp>
  344. NOZZLE_PARK_FEATURE = build_src_filter=+<src/libs/nozzle.cpp> +<src/gcode/feature/pause/G27.cpp>
  345. NOZZLE_CLEAN_FEATURE = build_src_filter=+<src/libs/nozzle.cpp> +<src/gcode/feature/clean>
  346. DELTA = build_src_filter=+<src/module/delta.cpp> +<src/gcode/calibrate/M666.cpp>
  347. BEZIER_CURVE_SUPPORT = build_src_filter=+<src/module/planner_bezier.cpp> +<src/gcode/motion/G5.cpp>
  348. PRINTCOUNTER = build_src_filter=+<src/module/printcounter.cpp>
  349. HAS_BED_PROBE = build_src_filter=+<src/module/probe.cpp> +<src/gcode/probe/G30.cpp> +<src/gcode/probe/M401_M402.cpp> +<src/gcode/probe/M851.cpp>
  350. IS_SCARA = build_src_filter=+<src/module/scara.cpp>
  351. MORGAN_SCARA = build_src_filter=+<src/gcode/scara>
  352. (ESP3D_)?WIFISUPPORT = AsyncTCP, ESP Async WebServer
  353. ESP3DLib=https://github.com/luc-github/ESP3DLib.git
  354. arduinoWebSockets=https://github.com/Links2004/arduinoWebSockets.git
  355. ESP32SSDP=https://github.com/luc-github/ESP32SSDP.git
  356. lib_ignore=ESPAsyncTCP
  357. #
  358. # Default values apply to all 'env:' prefixed environments
  359. #
  360. [env]
  361. framework = arduino
  362. extra_scripts = ${common.extra_scripts}
  363. build_flags = ${common.build_flags}
  364. lib_deps = ${common.lib_deps}
  365. monitor_speed = 250000
  366. monitor_eol = LF
  367. monitor_echo = yes
  368. monitor_filters = colorize, time, send_on_enter
  369. #################################
  370. # #
  371. # Unique Core Architectures #
  372. # #
  373. # Add a new "env" below if no #
  374. # entry has values suitable to #
  375. # build for a given board. #
  376. # #
  377. #################################
  378. #################################
  379. # #
  380. # AVR Architecture #
  381. # #
  382. #################################
  383. #
  384. # AVR (8-bit) Common Environment values
  385. #
  386. [common_avr8]
  387. board_build.f_cpu = 16000000L
  388. build_src_filter = ${common.default_src_filter} +<src/HAL/AVR>
  389. #
  390. # ATmega2560
  391. #
  392. [env:mega2560]
  393. platform = atmelavr
  394. extends = common_avr8
  395. board = megaatmega2560
  396. #
  397. # ATmega2560 with extended pins 70-85 defined
  398. #
  399. [env:mega2560ext]
  400. platform = atmelavr
  401. extends = mega2560
  402. board = megaatmega2560
  403. board_build.variant = megaextendedpins
  404. extra_scripts = ${common.extra_scripts}
  405. pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
  406. #
  407. # ATmega1280
  408. #
  409. [env:mega1280]
  410. platform = atmelavr
  411. extends = common_avr8
  412. board = megaatmega1280
  413. #
  414. # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
  415. #
  416. [env:MightyBoard1280]
  417. platform = atmelavr
  418. extends = common_avr8
  419. board = ATmega1280
  420. upload_speed = 57600
  421. #
  422. # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
  423. #
  424. [env:MightyBoard2560]
  425. platform = atmelavr
  426. extends = common_avr8
  427. board = ATmega2560
  428. upload_protocol = wiring
  429. upload_speed = 57600
  430. board_upload.maximum_size = 253952
  431. #
  432. # RAMBo
  433. #
  434. [env:rambo]
  435. platform = atmelavr
  436. extends = common_avr8
  437. board = reprap_rambo
  438. #
  439. # FYSETC F6 V1.3
  440. #
  441. [env:FYSETC_F6_13]
  442. platform = atmelavr
  443. extends = common_avr8
  444. board = fysetc_f6_13
  445. #
  446. # FYSETC F6 V1.4
  447. #
  448. [env:FYSETC_F6_14]
  449. platform = atmelavr
  450. extends = common_avr8
  451. board = fysetc_f6_14
  452. #
  453. # Sanguinololu (ATmega644p)
  454. #
  455. [env:sanguino644p]
  456. platform = atmelavr
  457. extends = common_avr8
  458. board = sanguino_atmega644p
  459. #
  460. # Sanguinololu (ATmega1284p)
  461. #
  462. [env:sanguino1284p]
  463. platform = atmelavr
  464. extends = common_avr8
  465. board = sanguino_atmega1284p
  466. board_upload.maximum_size = 126976
  467. #
  468. # Melzi and clones (ATmega1284p)
  469. #
  470. [env:melzi]
  471. platform = atmelavr
  472. extends = common_avr8
  473. board = sanguino_atmega1284p
  474. upload_speed = 57600
  475. board_upload.maximum_size = 126976
  476. #
  477. # Melzi and clones (Optiboot bootloader)
  478. #
  479. [env:melzi_optiboot]
  480. platform = atmelavr
  481. extends = common_avr8
  482. board = sanguino_atmega1284p
  483. upload_speed = 115200
  484. #
  485. # Melzi and clones (Zonestar Melzi2 with tuned flags)
  486. #
  487. [env:melzi_optimized]
  488. platform = atmelavr
  489. extends = env:melzi_optiboot
  490. build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues
  491. build_unflags = -g -ggdb
  492. #
  493. # AT90USB1286 boards using CDC bootloader
  494. # - BRAINWAVE
  495. # - BRAINWAVE_PRO
  496. # - SAV_MKI
  497. # - TEENSYLU
  498. #
  499. [env:at90usb1286_cdc]
  500. platform = teensy
  501. extends = common_avr8
  502. board = at90usb1286
  503. #
  504. # AT90USB1286 boards using DFU bootloader
  505. # - PrintrBoard
  506. # - PrintrBoard Rev.F
  507. # - ? 5DPRINT ?
  508. #
  509. [env:at90usb1286_dfu]
  510. platform = teensy
  511. extends = env:at90usb1286_cdc
  512. #################################
  513. # #
  514. # DUE Architecture #
  515. # #
  516. #################################
  517. #
  518. # Due (Atmel SAM3X8E ARM Cortex-M3)
  519. #
  520. # - RAMPS4DUE
  521. # - RADDS
  522. #
  523. [env:DUE]
  524. platform = atmelsam
  525. board = due
  526. build_src_filter = ${common.default_src_filter} +<src/HAL/DUE>
  527. [env:DUE_USB]
  528. platform = atmelsam
  529. extends = env:DUE
  530. board = dueUSB
  531. [env:DUE_debug]
  532. # Used when WATCHDOG_RESET_MANUAL is enabled
  533. platform = atmelsam
  534. extends = env:DUE
  535. build_flags = ${common.build_flags}
  536. -funwind-tables
  537. -mpoke-function-name
  538. #
  539. # Archim SAM
  540. #
  541. [common_DUE_archim]
  542. platform = atmelsam
  543. extends = env:DUE
  544. build_flags = ${common.build_flags}
  545. -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
  546. extra_scripts = ${common.extra_scripts}
  547. Marlin/src/HAL/DUE/upload_extra_script.py
  548. [env:DUE_archim]
  549. platform = ${common_DUE_archim.platform}
  550. extends = common_DUE_archim
  551. # Used when WATCHDOG_RESET_MANUAL is enabled
  552. [env:DUE_archim_debug]
  553. platform = ${common_DUE_archim.platform}
  554. extends = common_DUE_archim
  555. build_flags = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function-name
  556. #################################
  557. # #
  558. # SAMD51 Architecture #
  559. # #
  560. #################################
  561. #
  562. # Adafruit Grand Central M4 (Atmel SAMD51P20A ARM Cortex-M4)
  563. #
  564. [env:SAMD51_grandcentral_m4]
  565. platform = atmelsam
  566. board = adafruit_grandcentral_m4
  567. build_flags = ${common.build_flags} -std=gnu++17
  568. build_unflags = -std=gnu++11
  569. build_src_filter = ${common.default_src_filter} +<src/HAL/SAMD51>
  570. lib_deps = ${common.lib_deps}
  571. SoftwareSerialM
  572. Adafruit SPIFlash
  573. custom_marlin.SDSUPPORT = SdFat - Adafruit Fork
  574. debug_tool = jlink
  575. #################################
  576. # #
  577. # LPC176x Architecture #
  578. # #
  579. #################################
  580. #
  581. # NXP LPC176x ARM Cortex-M3
  582. #
  583. [common_LPC]
  584. platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip
  585. board = nxp_lpc1768
  586. lib_ldf_mode = off
  587. lib_compat_mode = strict
  588. extra_scripts = ${common.extra_scripts}
  589. Marlin/src/HAL/LPC1768/upload_extra_script.py
  590. build_src_filter = ${common.default_src_filter} +<src/HAL/LPC1768>
  591. lib_deps = ${common.lib_deps}
  592. Servo
  593. custom_marlin.USES_LIQUIDCRYSTAL = LiquidCrystal@1.0.0
  594. custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip
  595. build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g
  596. # debug options for backtrace
  597. #-funwind-tables
  598. #-mpoke-function-name
  599. #
  600. # NXP LPC176x ARM Cortex-M3
  601. #
  602. [env:LPC1768]
  603. platform = ${common_LPC.platform}
  604. extends = common_LPC
  605. board = nxp_lpc1768
  606. [env:LPC1769]
  607. platform = ${common_LPC.platform}
  608. extends = common_LPC
  609. board = nxp_lpc1769
  610. #################################
  611. # #
  612. # STM32 Architecture #
  613. # #
  614. #################################
  615. #
  616. # HAL/STM32 Base Environment values
  617. #
  618. [common_stm32]
  619. platform = ststm32@~6.1.0
  620. platform_packages = framework-arduinoststm32@>=4.10700,<4.10800
  621. lib_ignore = SoftwareSerial
  622. build_flags = ${common.build_flags}
  623. -IMarlin/src/HAL/STM32 -std=gnu++14
  624. -DUSBCON -DUSBD_USE_CDC
  625. -DUSBD_VID=0x0483
  626. -DTIM_IRQ_PRIO=13
  627. build_unflags = -std=gnu++11
  628. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  629. #
  630. # HAL/STM32F1 Common Environment values
  631. #
  632. [common_stm32f1]
  633. platform = ${common_stm32.platform}
  634. build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
  635. ${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL
  636. build_unflags = -std=gnu11 -std=gnu++11
  637. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
  638. lib_ignore = SPI
  639. lib_deps = ${common.lib_deps}
  640. SoftwareSerialM
  641. #
  642. # STM32F103RC
  643. #
  644. [env:STM32F103RC]
  645. platform = ${common_stm32f1.platform}
  646. extends = common_stm32f1
  647. board = genericSTM32F103RC
  648. platform_packages = tool-stm32duino
  649. monitor_speed = 115200
  650. #
  651. # MEEB_3DP (STM32F103RCT6 with 512K)
  652. #
  653. [env:STM32F103RC_meeb]
  654. platform = ${common_stm32f1.platform}
  655. extends = common_stm32f1
  656. board = MEEB_3DP
  657. platform_packages = tool-stm32duino
  658. build_flags = ${common_stm32f1.build_flags}
  659. -DDEBUG_LEVEL=0
  660. -DSS_TIMER=4
  661. -DSTM32_FLASH_SIZE=512
  662. -DHSE_VALUE=12000000U
  663. -DUSE_USB_COMPOSITE
  664. -DVECT_TAB_OFFSET=0x2000
  665. -DGENERIC_BOOTLOADER
  666. extra_scripts = ${common.extra_scripts}
  667. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  668. buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
  669. lib_deps = ${common.lib_deps}
  670. SoftwareSerialM
  671. USBComposite for STM32F1@0.91
  672. custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
  673. debug_tool = stlink
  674. upload_protocol = dfu
  675. #
  676. # STM32F103RC_fysetc
  677. #
  678. [env:STM32F103RC_fysetc]
  679. platform = ${common_stm32f1.platform}
  680. extends = env:STM32F103RC
  681. extra_scripts = ${common.extra_scripts}
  682. buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
  683. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
  684. lib_ldf_mode = chain
  685. debug_tool = stlink
  686. upload_protocol = serial
  687. #
  688. # BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
  689. #
  690. # STM32F103RC_btt ............. RCT6 with 256K
  691. # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
  692. # STM32F103RC_btt_512K ........ RCT6 with 512K
  693. # STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage)
  694. #
  695. [env:STM32F103RC_btt]
  696. platform = ${common_stm32f1.platform}
  697. extends = env:STM32F103RC
  698. extra_scripts = ${common.extra_scripts}
  699. buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
  700. build_flags = ${common_stm32f1.build_flags}
  701. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  702. monitor_speed = 115200
  703. [env:STM32F103RC_btt_USB]
  704. platform = ${common_stm32f1.platform}
  705. extends = env:STM32F103RC_btt
  706. build_flags = ${env:STM32F103RC_btt.build_flags} -DUSE_USB_COMPOSITE
  707. lib_deps = ${env:STM32F103RC_btt.lib_deps}
  708. USBComposite for STM32F1@0.91
  709. [env:STM32F103RC_btt_512K]
  710. platform = ${common_stm32f1.platform}
  711. extends = env:STM32F103RC_btt
  712. board_upload.maximum_size=524288
  713. build_flags = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512
  714. [env:STM32F103RC_btt_512K_USB]
  715. platform = ${common_stm32f1.platform}
  716. extends = env:STM32F103RC_btt_512K
  717. build_flags = ${env:STM32F103RC_btt_512K.build_flags} -DUSE_USB_COMPOSITE
  718. lib_deps = ${env:STM32F103RC_btt_512K.lib_deps}
  719. USBComposite for STM32F1@0.91
  720. #
  721. # STM32F103RE
  722. #
  723. [env:STM32F103RE]
  724. platform = ${common_stm32f1.platform}
  725. extends = common_stm32f1
  726. board = genericSTM32F103RE
  727. platform_packages = tool-stm32duino
  728. monitor_speed = 115200
  729. #
  730. # STM32F103RE_btt ............. RET6
  731. # STM32F103RE_btt_USB ......... RET6 (USB mass storage)
  732. #
  733. [env:STM32F103RE_btt]
  734. platform = ${common_stm32f1.platform}
  735. extends = env:STM32F103RE
  736. extra_scripts = ${common.extra_scripts}
  737. buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
  738. build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
  739. debug_tool = stlink
  740. upload_protocol = stlink
  741. [env:STM32F103RE_btt_USB]
  742. platform = ${common_stm32f1.platform}
  743. extends = env:STM32F103RE_btt
  744. build_flags = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE
  745. lib_deps = ${common_stm32f1.lib_deps}
  746. USBComposite for STM32F1@0.91
  747. #
  748. # STM32F4 with STM32GENERIC
  749. #
  750. [env:STM32F4]
  751. platform = ${common_stm32.platform}
  752. board = disco_f407vg
  753. build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F4 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
  754. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/STM32_F4_F7/STM32F7>
  755. #
  756. # STM32F7 with STM32GENERIC
  757. #
  758. [env:STM32F7]
  759. platform = ${common_stm32.platform}
  760. board = remram_v1
  761. build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F7 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
  762. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/STM32_F4_F7/STM32F4>
  763. #
  764. # ARMED (STM32)
  765. #
  766. [env:ARMED]
  767. platform = ${common_stm32.platform}
  768. extends = common_stm32
  769. board = armed_v1
  770. build_flags = ${common_stm32.build_flags}
  771. '-DUSB_PRODUCT="ARMED_V1"'
  772. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
  773. #
  774. # Geeetech GTM32 (STM32F103VET6)
  775. #
  776. [env:STM32F103VE_GTM32]
  777. platform = ${common_stm32f1.platform}
  778. extends = common_stm32f1
  779. board = genericSTM32F103VE
  780. build_flags = ${common_stm32f1.build_flags}
  781. -ffunction-sections -fdata-sections -nostdlib -MMD
  782. -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
  783. -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
  784. -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  785. upload_protocol = serial
  786. #
  787. # Longer 3D board in Alfawise U20 (STM32F103VET6)
  788. #
  789. [env:STM32F103VE_longer]
  790. platform = ${common_stm32f1.platform}
  791. extends = common_stm32f1
  792. board = genericSTM32F103VE
  793. extra_scripts = ${common.extra_scripts}
  794. buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
  795. build_flags = ${common_stm32f1.build_flags}
  796. -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
  797. build_unflags = ${common_stm32f1.build_unflags}
  798. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  799. lib_ignore = ${common_stm32f1.lib_ignore}
  800. #
  801. # MKS Robin Mini (STM32F103VET6)
  802. #
  803. [env:mks_robin_mini]
  804. platform = ${common_stm32f1.platform}
  805. extends = common_stm32f1
  806. board = genericSTM32F103VE
  807. extra_scripts = ${common.extra_scripts}
  808. buildroot/share/PlatformIO/scripts/mks_robin_mini.py
  809. build_flags = ${common_stm32f1.build_flags}
  810. -DMCU_STM32F103VE
  811. #
  812. # MKS Robin Nano (STM32F103VET6)
  813. # v1.2 - Emulated Graphical 128x64 (DOGM) UI and LVGL UI
  814. # v2.0 - LVGL UI
  815. #
  816. [env:mks_robin_nano35]
  817. platform = ${common_stm32f1.platform}
  818. extends = common_stm32f1
  819. board = genericSTM32F103VE
  820. platform_packages = tool-stm32duino
  821. extra_scripts = ${common.extra_scripts}
  822. buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
  823. build_flags = ${common_stm32f1.build_flags}
  824. -DMCU_STM32F103VE -DSS_TIMER=4
  825. debug_tool = jlink
  826. upload_protocol = jlink
  827. #
  828. # MKS Robin (STM32F103ZET6)
  829. #
  830. [env:mks_robin]
  831. platform = ${common_stm32f1.platform}
  832. extends = common_stm32f1
  833. board = genericSTM32F103ZE
  834. extra_scripts = ${common.extra_scripts}
  835. buildroot/share/PlatformIO/scripts/mks_robin.py
  836. build_flags = ${common_stm32f1.build_flags}
  837. -DSS_TIMER=4 -DSTM32_XL_DENSITY
  838. # MKS Robin (STM32F103ZET6)
  839. # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
  840. #
  841. [env:mks_robin_stm32]
  842. platform = ${common_stm32.platform}
  843. extends = common_stm32
  844. board = genericSTM32F103ZE
  845. board_build.core = stm32
  846. board_build.variant = MARLIN_F103Zx
  847. board_build.ldscript = ldscript.ld
  848. board_build.offset = 0x7000
  849. board_build.firmware = Robin.bin
  850. build_flags = ${common_stm32.build_flags}
  851. -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
  852. build_unflags = ${common_stm32.build_unflags}
  853. -DUSBCON -DUSBD_USE_CDC
  854. extra_scripts = ${common.extra_scripts}
  855. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  856. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  857. buildroot/share/PlatformIO/scripts/mks_encrypt.py
  858. lib_deps =
  859. #
  860. # MKS Robin Pro (STM32F103ZET6)
  861. #
  862. [env:mks_robin_pro]
  863. platform = ${common_stm32f1.platform}
  864. extends = env:mks_robin
  865. extra_scripts = ${common.extra_scripts}
  866. buildroot/share/PlatformIO/scripts/mks_robin_pro.py
  867. #
  868. # TRIGORILLA PRO (STM32F103ZET6)
  869. #
  870. [env:trigorilla_pro]
  871. platform = ${common_stm32f1.platform}
  872. extends = env:mks_robin
  873. extra_scripts = ${common.extra_scripts}
  874. #
  875. # MKS Robin E3D (STM32F103RCT6) and
  876. # MKS Robin E3 with TMC2209
  877. #
  878. [env:mks_robin_e3]
  879. platform = ${common_stm32f1.platform}
  880. extends = common_stm32f1
  881. board = genericSTM32F103RC
  882. platform_packages = tool-stm32duino
  883. extra_scripts = ${common.extra_scripts}
  884. buildroot/share/PlatformIO/scripts/mks_robin_e3.py
  885. build_flags = ${common_stm32f1.build_flags}
  886. -DDEBUG_LEVEL=0 -DSS_TIMER=4
  887. #
  888. # MKS Robin Lite/Lite2 (STM32F103RCT6)
  889. #
  890. [env:mks_robin_lite]
  891. platform = ${common_stm32f1.platform}
  892. extends = common_stm32f1
  893. board = genericSTM32F103RC
  894. extra_scripts = ${common.extra_scripts}
  895. buildroot/share/PlatformIO/scripts/mks_robin_lite.py
  896. #
  897. # MKS ROBIN LITE3 (STM32F103RCT6)
  898. #
  899. [env:mks_robin_lite3]
  900. platform = ${common_stm32f1.platform}
  901. extends = common_stm32f1
  902. board = genericSTM32F103RC
  903. extra_scripts = ${common.extra_scripts}
  904. buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
  905. #
  906. # JGAurora A5S A1 (STM32F103ZET6)
  907. #
  908. [env:jgaurora_a5s_a1]
  909. platform = ${common_stm32f1.platform}
  910. extends = common_stm32f1
  911. board = genericSTM32F103ZE
  912. extra_scripts = ${common.extra_scripts}
  913. buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
  914. build_flags = ${common_stm32f1.build_flags}
  915. -DSTM32F1xx -DSTM32_XL_DENSITY
  916. #
  917. # Malyan M200 (STM32F103CB)
  918. #
  919. [env:STM32F103CB_malyan]
  920. platform = ${common_stm32f1.platform}
  921. extends = common_stm32f1
  922. board = malyanM200
  923. build_flags = ${common_stm32f1.build_flags}
  924. -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
  925. -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
  926. lib_ignore = ${common_stm32f1.lib_ignore}
  927. SoftwareSerialM
  928. #
  929. # Malyan M200 v2 (STM32F070RB)
  930. #
  931. [env:STM32F070RB_malyan]
  932. platform = ${common_stm32.platform}
  933. extends = common_stm32
  934. board = malyanM200v2
  935. build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED
  936. -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
  937. -DCUSTOM_STARTUP_FILE
  938. lib_ignore = SoftwareSerial
  939. #
  940. # Malyan M300 (STM32F070CB)
  941. #
  942. [env:malyan_M300]
  943. platform = ststm32@>=6.1.0,<6.2.0
  944. board = malyanm300_f070cb
  945. build_flags = ${common.build_flags}
  946. -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\""
  947. -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
  948. build_src_filter = ${common.default_src_filter} +<src/HAL/STM32>
  949. #
  950. # Chitu boards like Tronxy X5s (STM32F103ZET6)
  951. #
  952. [env:chitu_f103]
  953. platform = ${common_stm32f1.platform}
  954. extends = common_stm32f1
  955. board = CHITU_F103
  956. extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
  957. pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
  958. buildroot/share/PlatformIO/scripts/chitu_crypt.py
  959. build_flags = ${common_stm32f1.build_flags}
  960. -DSTM32F1xx -DSTM32_XL_DENSITY
  961. build_unflags = ${common_stm32f1.build_unflags}
  962. -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
  963. #
  964. # Some Chitu V5 boards have a problem with GPIO init.
  965. # Use this target if G28 or G29 are always failing.
  966. #
  967. [env:chitu_v5_gpio_init]
  968. platform = ${common_stm32f1.platform}
  969. extends = env:chitu_f103
  970. build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
  971. #
  972. # Creality (STM32F103RET6)
  973. #
  974. [env:STM32F103RET6_creality]
  975. platform = ${common_stm32f1.platform}
  976. extends = common_stm32f1
  977. board = genericSTM32F103RC
  978. build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
  979. ${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY -DTEMP_TIMER_CHAN=4
  980. extra_scripts = ${common.extra_scripts}
  981. pre:buildroot/share/PlatformIO/scripts/random-bin.py
  982. buildroot/share/PlatformIO/scripts/creality.py
  983. lib_ignore = ${common_stm32f1.lib_ignore}
  984. debug_tool = jlink
  985. upload_protocol = jlink
  986. monitor_speed = 115200
  987. #
  988. # STM32F401VE
  989. # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
  990. #
  991. [env:STM32F401VE_STEVAL]
  992. platform = ${common_stm32.platform}
  993. extends = common_stm32
  994. board = STEVAL_STM32F401VE
  995. build_flags = ${common_stm32.build_flags}
  996. -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
  997. -DUSB_PRODUCT=\"STEVAL_F401VE\"
  998. -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  999. extra_scripts = ${common.extra_scripts}
  1000. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  1001. buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py
  1002. lib_ignore = SoftwareSerial
  1003. #
  1004. # FLYF407ZG
  1005. #
  1006. [env:FLYF407ZG]
  1007. platform = ${common_stm32.platform}
  1008. extends = common_stm32
  1009. board = FLYF407ZG
  1010. build_flags = ${common_stm32.build_flags}
  1011. -DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\"
  1012. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
  1013. extra_scripts = ${common.extra_scripts}
  1014. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  1015. #
  1016. # FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
  1017. #
  1018. [env:FYSETC_S6]
  1019. platform = ${common_stm32.platform}
  1020. extends = common_stm32
  1021. platform_packages = ${common_stm32.platform_packages}
  1022. tool-stm32duino
  1023. board = fysetc_s6
  1024. build_flags = ${common_stm32.build_flags}
  1025. -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000
  1026. -DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"'
  1027. extra_scripts = ${common.extra_scripts}
  1028. pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
  1029. debug_tool = stlink
  1030. upload_protocol = dfu
  1031. upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
  1032. #
  1033. # STM32F407VET6 with RAMPS-like shield
  1034. # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
  1035. # Shield - https://github.com/jmz52/Hardware
  1036. #
  1037. [env:STM32F407VE_black]
  1038. platform = ${common_stm32.platform}
  1039. extends = common_stm32
  1040. board = blackSTM32F407VET6
  1041. build_flags = ${common_stm32.build_flags}
  1042. -DTARGET_STM32F4 -DARDUINO_BLACK_F407VE
  1043. -DUSB_PRODUCT=\"BLACK_F407VE\"
  1044. -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
  1045. extra_scripts = ${common.extra_scripts}
  1046. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  1047. lib_ignore = SoftwareSerial
  1048. #
  1049. # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
  1050. #
  1051. [env:BIGTREE_SKR_PRO]
  1052. platform = ${common_stm32.platform}
  1053. extends = common_stm32
  1054. board = BigTree_SKR_Pro
  1055. build_flags = ${common_stm32.build_flags}
  1056. -DUSB_PRODUCT=\"STM32F407ZG\"
  1057. -DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
  1058. extra_scripts = ${common.extra_scripts}
  1059. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  1060. #upload_protocol = stlink
  1061. #upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
  1062. debug_tool = stlink
  1063. debug_init_break =
  1064. #
  1065. # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
  1066. #
  1067. [env:BIGTREE_GTR_V1_0]
  1068. platform = ststm32@>=5.7.0,<6.2.0
  1069. extends = common_stm32
  1070. board = BigTree_GTR_v1
  1071. extra_scripts = ${common.extra_scripts}
  1072. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  1073. build_flags = ${common_stm32.build_flags}
  1074. -DUSB_PRODUCT=\"STM32F407IG\"
  1075. -DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
  1076. #
  1077. # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
  1078. #
  1079. [env:BIGTREE_BTT002]
  1080. platform = ${common_stm32.platform}
  1081. extends = common_stm32
  1082. board = BigTree_Btt002
  1083. build_flags = ${common_stm32.build_flags}
  1084. -DUSB_PRODUCT=\"STM32F407VG\"
  1085. -DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
  1086. -DHAVE_HWSERIAL2
  1087. -DHAVE_HWSERIAL3
  1088. -DPIN_SERIAL2_RX=PD_6
  1089. -DPIN_SERIAL2_TX=PD_5
  1090. extra_scripts = ${common.extra_scripts}
  1091. pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
  1092. #
  1093. # Lerdge base
  1094. #
  1095. [lerdge_common]
  1096. platform = ${common_stm32.platform}
  1097. extends = common_stm32
  1098. board = LERDGE
  1099. board_build.offset = 0x10000
  1100. extra_scripts = ${common.extra_scripts}
  1101. pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
  1102. buildroot/share/PlatformIO/scripts/stm32_bootloader.py
  1103. buildroot/share/PlatformIO/scripts/lerdge.py
  1104. build_flags = ${common_stm32.build_flags}
  1105. -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4
  1106. -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE
  1107. -DTRANSFER_CLOCK_DIV=8 -DHAL_SRAM_MODULE_ENABLED
  1108. build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
  1109. #
  1110. # Lerdge X
  1111. #
  1112. [env:LERDGEX]
  1113. extends = lerdge_common
  1114. board_build.firmware = Lerdge_X_firmware_force.bin
  1115. #
  1116. # Lerdge S
  1117. #
  1118. [env:LERDGES]
  1119. extends = lerdge_common
  1120. board_build.firmware = Lerdge_firmware_force.bin
  1121. #
  1122. # Lerdge K
  1123. #
  1124. [env:LERDGEK]
  1125. extends = lerdge_common
  1126. board_build.firmware = Lerdge_K_firmware_force.bin
  1127. build_flags = ${lerdge_common.build_flags}
  1128. -DLERDGEK
  1129. #
  1130. # RUMBA32
  1131. #
  1132. [env:rumba32]
  1133. platform = ${common_stm32.platform}
  1134. extends = common_stm32
  1135. build_flags = ${common_stm32.build_flags}
  1136. -Os
  1137. "-DUSB_PRODUCT=\"RUMBA32\""
  1138. -DHAL_PCD_MODULE_ENABLED
  1139. -DDISABLE_GENERIC_SERIALUSB
  1140. -DHAL_UART_MODULE_ENABLED
  1141. board = rumba32_f446ve
  1142. upload_protocol = dfu
  1143. monitor_speed = 500000
  1144. #################################
  1145. # #
  1146. # Other Architectures #
  1147. # #
  1148. #################################
  1149. #
  1150. # Espressif ESP32
  1151. #
  1152. [env:esp32]
  1153. platform = espressif32@1.11.2
  1154. board = esp32dev
  1155. build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
  1156. build_src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
  1157. upload_speed = 115200
  1158. #upload_port = marlinesp.local
  1159. #board_build.flash_mode = qio
  1160. #
  1161. # Teensy 3.1 / 3.2 (ARM Cortex-M4)
  1162. #
  1163. [env:teensy31]
  1164. platform = teensy
  1165. board = teensy31
  1166. build_src_filter = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
  1167. #
  1168. # Teensy 3.5 / 3.6 (ARM Cortex-M4)
  1169. #
  1170. [env:teensy35]
  1171. platform = teensy
  1172. board = teensy35
  1173. build_src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
  1174. #
  1175. # Native
  1176. # No supported Arduino libraries, base Marlin only
  1177. #
  1178. [env:linux_native]
  1179. platform = native
  1180. framework =
  1181. build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
  1182. src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include
  1183. build_unflags = -Wall
  1184. lib_ldf_mode = off
  1185. lib_deps =
  1186. build_src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
  1187. #
  1188. # Just print the dependency tree
  1189. #
  1190. [env:include_tree]
  1191. platform = atmelavr
  1192. board = megaatmega2560
  1193. build_flags = -c -H -std=gnu++11 -Wall -Os -D__MARLIN_FIRMWARE__
  1194. build_src_filter = +<src/MarlinCore.cpp>