Browse Source

Only download & compile required libraries (#18699)

Victor Oliveira 3 years ago
parent
commit
4a55bdb165
No account linked to committer's email address

+ 7
- 0
Marlin/src/core/drivers.h View File

@@ -177,6 +177,13 @@
177 177
 #endif
178 178
 
179 179
 //
180
+// TMC26XX Stepper Drivers
181
+//
182
+#if HAS_DRIVER(TMC26X)
183
+  #define HAS_TMC26X 1
184
+#endif
185
+
186
+//
180 187
 // L64XX Stepper Drivers
181 188
 //
182 189
 

+ 4
- 1
Marlin/src/feature/touch/xpt2046.cpp View File

@@ -23,7 +23,10 @@
23 23
 
24 24
 #include "xpt2046.h"
25 25
 #include "../../inc/MarlinConfig.h"
26
-#include "../../lcd/dogm/ultralcd_DOGM.h" // for LCD_FULL_PIXEL_WIDTH, etc.
26
+#if ENABLED(FSMC_GRAPHICAL_TFT)
27
+  #include "../../lcd/dogm/ultralcd_DOGM.h" // for LCD_FULL_PIXEL_WIDTH, etc.
28
+#endif
29
+
27 30
 
28 31
 /*
29 32
  * Draw and Touch processing

+ 4
- 1
Marlin/src/inc/SanityCheck.h View File

@@ -2205,12 +2205,15 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2205 2205
   + ENABLED(MKS_12864OLED_SSD1306) \
2206 2206
   + ENABLED(U8GLIB_SH1106_EINSTART) \
2207 2207
   + ENABLED(OVERLORD_OLED) \
2208
+  + ENABLED(FYSETC_242_OLED_12864) \
2208 2209
   + ENABLED(DGUS_LCD_UI_ORIGIN) \
2209 2210
   + ENABLED(DGUS_LCD_UI_FYSETC) \
2210 2211
   + ENABLED(DGUS_LCD_UI_HIPRECY) \
2211 2212
   + ENABLED(MALYAN_LCD) \
2212 2213
   + ENABLED(TOUCH_UI_FTDI_EVE) \
2213
-  + ENABLED(FSMC_GRAPHICAL_TFT)
2214
+  + ENABLED(FSMC_GRAPHICAL_TFT) \
2215
+  + ENABLED(TFT_LVGL_UI) \
2216
+  + ENABLED(SPI_GRAPHICAL_TFT)
2214 2217
   #error "Please select no more than one LCD controller option."
2215 2218
 #endif
2216 2219
 

+ 0
- 4
Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp View File

@@ -23,10 +23,6 @@
23 23
 
24 24
 #include <string.h>
25 25
 
26
-#ifndef LCD_CLASS
27
-  #include <LiquidCrystal.h>
28
-  #define LCD_CLASS LiquidCrystal
29
-#endif
30 26
 extern LCD_CLASS lcd;
31 27
 
32 28
 int lcd_glyph_height() { return 1; }

+ 2
- 2
Marlin/src/module/stepper/TMC26X.cpp View File

@@ -30,7 +30,7 @@
30 30
 //
31 31
 // TMC26X Driver objects and inits
32 32
 //
33
-#if HAS_DRIVER(TMC26X)
33
+#if HAS_TMC26X
34 34
 
35 35
 #include "TMC26X.h"
36 36
 
@@ -141,4 +141,4 @@ void tmc26x_init_to_defaults() {
141 141
   #endif
142 142
 }
143 143
 
144
-#endif // TMC26X
144
+#endif // HAS_TMC26X

+ 3
- 3
Marlin/src/pins/pins.h View File

@@ -507,7 +507,7 @@
507 507
 #elif MB(MKS_ROBIN_MINI)
508 508
   #include "stm32f1/pins_MKS_ROBIN_MINI.h"      // STM32F1                                env:mks_robin_mini
509 509
 #elif MB(MKS_ROBIN_NANO)
510
-  #include "stm32f1/pins_MKS_ROBIN_NANO.h"      // STM32F1                                env:mks_robin_nano env:mks_robin_nano35
510
+  #include "stm32f1/pins_MKS_ROBIN_NANO.h"      // STM32F1                                env:mks_robin_nano
511 511
 #elif MB(MKS_ROBIN_LITE)
512 512
   #include "stm32f1/pins_MKS_ROBIN_LITE.h"      // STM32F1                                env:mks_robin_lite
513 513
 #elif MB(BTT_SKR_MINI_V1_1)
@@ -541,9 +541,9 @@
541 541
 #elif MB(CCROBOT_MEEB_3DP)
542 542
   #include "stm32f1/pins_CCROBOT_MEEB_3DP.h"    // STM32F1                                env:STM32F103RC_meeb
543 543
 #elif MB(CHITU3D_V5)
544
-  #include "stm32f1/pins_CHITU3D_V5.h"          // STM32F1                                env:chitu_f103 env:chitu_v5_gpio_init env:chitu_f103_lvgl
544
+  #include "stm32f1/pins_CHITU3D_V5.h"          // STM32F1                                env:chitu_f103 env:chitu_v5_gpio_init
545 545
 #elif MB(CHITU3D_V6)
546
-  #include "stm32f1/pins_CHITU3D_V6.h"          // STM32F1                                env:chitu_f103 env:chitu_f103_lvgl
546
+  #include "stm32f1/pins_CHITU3D_V6.h"          // STM32F1                                env:chitu_f103
547 547
 #elif MB(CREALITY_V4)
548 548
   #include "stm32f1/pins_CREALITY_V4.h"         // STM32F1                                env:STM32F103RET6_creality
549 549
 #elif MB(TRIGORILLA_PRO)

+ 50
- 0
buildroot/share/PlatformIO/scripts/common-features-dependencies.h View File

@@ -0,0 +1,50 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * The purpose of this file is just include Marlin Configuration files,
26
+ * to discover which FEATURES are enabled, without any HAL include.
27
+ * Used by common-features-dependencies.py
28
+ */
29
+
30
+#ifndef __MARLIN_FIRMWARE__
31
+#define __MARLIN_FIRMWARE__
32
+#endif
33
+
34
+//
35
+// Prefix header to acquire configurations
36
+//
37
+#include <stdint.h>
38
+
39
+#include "../../../../Marlin/src/core/boards.h"
40
+#include "../../../../Marlin/src/core/macros.h"
41
+#include "../../../../Marlin/Configuration.h"
42
+
43
+#include "../../../../Marlin/Version.h"
44
+
45
+#include "../../../../Marlin/src/inc/Conditionals_LCD.h"
46
+
47
+#include "../../../../Marlin/src/core/drivers.h"
48
+#include "../../../../Marlin/Configuration_adv.h"
49
+
50
+#include "../../../../Marlin/src/inc/Conditionals_adv.h"

+ 135
- 0
buildroot/share/PlatformIO/scripts/common-features-dependencies.py View File

@@ -0,0 +1,135 @@
1
+#
2
+# common-features-dependencies.py
3
+# Convenience script to check dependencies and add libs and sources for Marlin Enabled Features
4
+#
5
+import subprocess
6
+import os
7
+import re
8
+try:
9
+    import configparser
10
+except ImportError:
11
+    import ConfigParser as configparser
12
+from platformio.managers.package import PackageManager
13
+
14
+Import("env")
15
+
16
+FEATURE_DEPENDENCIES = {}
17
+
18
+def load_config():
19
+	config = configparser.ConfigParser()
20
+	config.read("platformio.ini")
21
+	items = config.items('features')
22
+	for key in items:
23
+		deps = re.sub(',\\s*', '\n', key[1]).strip().split('\n')
24
+		if not key[0].upper() in FEATURE_DEPENDENCIES:
25
+			FEATURE_DEPENDENCIES[key[0].upper()] = {
26
+				'lib_deps': []
27
+			}
28
+		for dep in deps:
29
+			parts = dep.split('=')
30
+			name = parts.pop(0)
31
+			rest = '='.join(parts)
32
+			if name == 'extra_scripts':
33
+				FEATURE_DEPENDENCIES[key[0].upper()]['extra_scripts'] = rest
34
+			elif name == 'src_filter':
35
+				FEATURE_DEPENDENCIES[key[0].upper()]['src_filter'] = rest
36
+			else:
37
+				FEATURE_DEPENDENCIES[key[0].upper()]['lib_deps'] += [dep]
38
+
39
+def install_features_dependencies():
40
+	load_config()
41
+	for feature in FEATURE_DEPENDENCIES:
42
+		if not env.MarlinFeatureIsEnabled(feature):
43
+			continue
44
+
45
+		if 'lib_deps' in FEATURE_DEPENDENCIES[feature]:
46
+			print("Adding lib_deps for %s... " % feature)
47
+
48
+			# deps to add
49
+			deps_to_add = {}
50
+			for dep in FEATURE_DEPENDENCIES[feature]['lib_deps']:
51
+				name, _, _ = PackageManager.parse_pkg_uri(dep)
52
+				deps_to_add[name] = dep
53
+
54
+			# first check if the env already have the dep
55
+			deps = env.GetProjectOption("lib_deps")
56
+			for dep in deps:
57
+				name, _, _ = PackageManager.parse_pkg_uri(dep)
58
+				if name in deps_to_add:
59
+					del deps_to_add[name]
60
+
61
+			# check if we need ignore any lib
62
+			lib_ignore = env.GetProjectOption("lib_ignore")
63
+			for dep in deps:
64
+				name, _, _ = PackageManager.parse_pkg_uri(dep)
65
+				if name in deps_to_add:
66
+					del deps_to_add[name]
67
+
68
+			# any left?
69
+			if len(deps_to_add) <= 0:
70
+				continue
71
+
72
+			# add only the missing deps
73
+			proj = env.GetProjectConfig()
74
+			proj.set("env:" + env["PIOENV"], "lib_deps", deps + list(deps_to_add.values()))
75
+
76
+		if 'extra_scripts' in FEATURE_DEPENDENCIES[feature]:
77
+			print("Executing extra_scripts for %s... " % feature)
78
+			env.SConscript(FEATURE_DEPENDENCIES[feature]['extra_scripts'], exports="env")
79
+
80
+		if 'src_filter' in FEATURE_DEPENDENCIES[feature]:
81
+			print("Adding src_filter for %s... " % feature)
82
+			proj = env.GetProjectConfig()
83
+			src_filter = env.GetProjectOption("src_filter")
84
+
85
+			# first we need to remove the references to the same folder
86
+			my_srcs = re.findall( r'[+-](<.*?>)', FEATURE_DEPENDENCIES[feature]['src_filter'])
87
+			cur_srcs = re.findall( r'[+-](<.*?>)', src_filter[0])
88
+			for d in my_srcs:
89
+				if d in cur_srcs:
90
+					src_filter[0] = re.sub(r'[+-]' + d, '', src_filter[0])
91
+
92
+			src_filter[0] = FEATURE_DEPENDENCIES[feature]['src_filter'] + ' ' + src_filter[0]
93
+			proj.set("env:" + env["PIOENV"], "src_filter", src_filter)
94
+			env.Replace(SRC_FILTER=src_filter)
95
+
96
+# load marlin features
97
+def load_marlin_features():
98
+	if "MARLIN_FEATURES" in env:
99
+		return
100
+
101
+	# procces defines
102
+	# print(env.Dump())
103
+	build_flags = env.get('BUILD_FLAGS')
104
+	build_flags = env.ParseFlagsExtended(build_flags)
105
+	cmd = []
106
+	# build flags from board.json
107
+	# if 'BOARD' in env:
108
+	# 	cmd += [env.BoardConfig().get("build.extra_flags")]
109
+	for s in build_flags['CPPDEFINES']:
110
+		if isinstance(s, tuple):
111
+			cmd += ['-D' + s[0] + '=' + str(s[1])]
112
+		else:
113
+			cmd += ['-D' + s]
114
+	# cmd += ['-w -dM -E -x c++ Marlin/src/inc/MarlinConfigPre.h']
115
+	cmd += ['-w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-features-dependencies.h']
116
+	cmd = [env.get('CXX')] + cmd
117
+	cmd = ' '.join(cmd)
118
+	print(cmd)
119
+	define_list = subprocess.check_output(cmd, shell=True).splitlines()
120
+	marlin_features = {}
121
+	for define in define_list:
122
+		feature = define[8:].strip().decode().split(' ')
123
+		feature, definition = feature[0], ' '.join(feature[1:])
124
+		marlin_features[feature] = definition
125
+	env["MARLIN_FEATURES"] = marlin_features
126
+
127
+def MarlinFeatureIsEnabled(env, feature):
128
+	load_marlin_features()
129
+	return feature in env["MARLIN_FEATURES"]
130
+
131
+# add a method for others scripts to check if a feature is enabled
132
+env.AddMethod(MarlinFeatureIsEnabled)
133
+
134
+# install all dependencies for features enabled in Configuration.h
135
+install_features_dependencies()

+ 80
- 76
platformio.ini View File

@@ -25,25 +25,37 @@ include_dir  = Marlin
25 25
 # The 'common' values are used for most Marlin builds
26 26
 #
27 27
 [common]
28
-default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
29
-extra_scripts      = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
28
+default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared> -<src/lcd/extui/lib/mks_ui>
29
+extra_scripts      =
30
+  pre:buildroot/share/PlatformIO/scripts/common-features-dependencies.py
31
+  pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
30 32
 build_flags        = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
31 33
 lib_deps           =
32
-  LiquidCrystal@1.5.0
33
-  TMCStepper@~0.7.1
34
-  Adafruit MAX31865 library@~1.1.0
35
-  Adafruit NeoPixel@1.5.0
36
-  U8glib-HAL@0.4.1
37
-  Arduino-L6470@0.8.0
38
-  SlowSoftI2CMaster
39
-  LiquidTWI2@1.2.7
40
-  SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
34
+
35
+#
36
+# Feature Dependencies
37
+#
38
+[features]
39
+TFT_LVGL_UI         = MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
40
+                      src_filter=+<src/lcd/extui/lib/mks_ui>
41
+HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.1
42
+SR_LCD_2W_NL        = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
43
+SR_LCD_3W_NL        = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
44
+DIGIPOT_MCP4018     = SlowSoftI2CMaster
45
+DIGIPOT_MCP4451     = SlowSoftI2CMaster
46
+HAS_TMC26X          = TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
47
+HAS_L64XX           = Arduino-L6470@0.8.0
48
+NEOPIXEL_LED        = Adafruit NeoPixel@1.5.0
49
+MAX6675_IS_MAX31865 = Adafruit MAX31865 library@~1.1.0
50
+HAS_GRAPHICAL_LCD   = U8glib-HAL@0.4.1
51
+HAS_CHARACTER_LCD   = LiquidCrystal@1.5.0, LiquidTWI2@1.2.7
41 52
 
42 53
 #
43 54
 # Default values apply to all 'env:' prefixed environments
44 55
 #
45 56
 [env]
46 57
 framework     = arduino
58
+extra_scripts = ${common.extra_scripts}
47 59
 build_flags   = ${common.build_flags}
48 60
 lib_deps      = ${common.lib_deps}
49 61
 monitor_speed = 250000
@@ -69,8 +81,6 @@ monitor_speed = 250000
69 81
 #
70 82
 [common_avr8]
71 83
 board_build.f_cpu = 16000000L
72
-lib_deps          = ${common.lib_deps}
73
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
74 84
 src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
75 85
 
76 86
 #
@@ -157,7 +167,6 @@ board_upload.maximum_size = 126976
157 167
 platform      = atmelavr
158 168
 extends       = common_avr8
159 169
 board         = sanguino_atmega1284p
160
-lib_ignore    = TMCStepper
161 170
 upload_speed  = 57600
162 171
 board_upload.maximum_size = 126976
163 172
 
@@ -168,7 +177,6 @@ board_upload.maximum_size = 126976
168 177
 platform      = atmelavr
169 178
 extends       = common_avr8
170 179
 board         = sanguino_atmega1284p
171
-lib_ignore    = TMCStepper
172 180
 upload_speed  = 115200
173 181
 
174 182
 #
@@ -191,7 +199,6 @@ build_unflags = -g -ggdb
191 199
 platform      = teensy
192 200
 extends       = common_avr8
193 201
 board         = at90usb1286
194
-lib_ignore    = TMCStepper
195 202
 
196 203
 #
197 204
 # AT90USB1286 boards using DFU bootloader
@@ -243,7 +250,8 @@ board         = due
243 250
 src_filter    = ${common.default_src_filter} +<src/HAL/DUE>
244 251
 build_flags   = ${common.build_flags}
245 252
   -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
246
-extra_scripts = Marlin/src/HAL/DUE/upload_extra_script.py
253
+extra_scripts = ${common.extra_scripts}
254
+  Marlin/src/HAL/DUE/upload_extra_script.py
247 255
 
248 256
 [env:DUE_archim]
249 257
 platform      = ${common_DUE_archim.platform}
@@ -268,7 +276,6 @@ build_flags   = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function
268 276
 platform       = atmelsam
269 277
 board          = adafruit_grandcentral_m4
270 278
 build_flags    = ${common.build_flags} -std=gnu++17
271
-extra_scripts  = ${common.extra_scripts}
272 279
 build_unflags  = -std=gnu++11
273 280
 src_filter     = ${common.default_src_filter} +<src/HAL/SAMD51>
274 281
 lib_deps       = ${common.lib_deps}
@@ -290,7 +297,8 @@ platform          = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.
290 297
 board             = nxp_lpc1768
291 298
 lib_ldf_mode      = off
292 299
 lib_compat_mode   = strict
293
-extra_scripts     = Marlin/src/HAL/LPC1768/upload_extra_script.py
300
+extra_scripts     = ${common.extra_scripts}
301
+  Marlin/src/HAL/LPC1768/upload_extra_script.py
294 302
 src_filter        = ${common.default_src_filter} +<src/HAL/LPC1768>
295 303
 lib_deps          = Servo
296 304
   LiquidCrystal@1.0.0
@@ -298,7 +306,8 @@ lib_deps          = Servo
298 306
   TMCStepper@~0.7.1
299 307
   Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip
300 308
   SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
301
-build_flags       = -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g ${common.build_flags}
309
+build_flags       = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g
310
+lib_ignore        = LiquidTWI2
302 311
   # debug options for backtrace
303 312
   #-funwind-tables
304 313
   #-mpoke-function-name
@@ -328,7 +337,6 @@ board     = nxp_lpc1769
328 337
 [common_stm32]
329 338
 platform      = ststm32@~6.1.0
330 339
 platform_packages = framework-arduinoststm32@>=4.10700,<4.10800
331
-lib_deps      = ${common.lib_deps}
332 340
 lib_ignore    = SoftwareSerial
333 341
 build_flags   = ${common.build_flags}
334 342
   -IMarlin/src/HAL/STM32 -std=gnu++14
@@ -348,7 +356,6 @@ build_flags   = !python Marlin/src/HAL/STM32F1/build_flags.py
348 356
 build_unflags = -std=gnu++11
349 357
 src_filter    = ${common.default_src_filter} +<src/HAL/STM32F1>
350 358
 lib_ignore    =
351
-  Adafruit NeoPixel
352 359
   SPI
353 360
 lib_deps      = ${common.lib_deps}
354 361
   SoftwareSerialM
@@ -379,8 +386,9 @@ build_flags       = ${common_stm32f1.build_flags}
379 386
                     -DUSE_USB_COMPOSITE
380 387
                     -DVECT_TAB_OFFSET=0x2000
381 388
                     -DGENERIC_BOOTLOADER
382
-extra_scripts     = pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
383
-    buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
389
+extra_scripts     = ${common.extra_scripts}
390
+  pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
391
+  buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
384 392
 lib_deps          =
385 393
   TMCStepper@~0.7.1
386 394
   Adafruit MAX31865 library@~1.1.0
@@ -402,7 +410,8 @@ upload_protocol   = dfu
402 410
 [env:STM32F103RC_fysetc]
403 411
 platform          = ${common_stm32f1.platform}
404 412
 extends           = env:STM32F103RC
405
-extra_scripts     = buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
413
+extra_scripts     = ${common.extra_scripts}
414
+  buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
406 415
 build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
407 416
 lib_ldf_mode      = chain
408 417
 debug_tool        = stlink
@@ -420,7 +429,8 @@ upload_protocol   = serial
420 429
 [env:STM32F103RC_btt]
421 430
 platform          = ${common_stm32f1.platform}
422 431
 extends           = env:STM32F103RC
423
-extra_scripts     = buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
432
+extra_scripts     = ${common.extra_scripts}
433
+  buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
424 434
 build_flags       = ${common_stm32f1.build_flags}
425 435
   -DDEBUG_LEVEL=0 -DSS_TIMER=4
426 436
 monitor_speed     = 115200
@@ -462,7 +472,8 @@ monitor_speed     = 115200
462 472
 [env:STM32F103RE_btt]
463 473
 platform          = ${common_stm32f1.platform}
464 474
 extends           = env:STM32F103RE
465
-extra_scripts     = buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
475
+extra_scripts     = ${common.extra_scripts}
476
+  buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
466 477
 build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
467 478
 debug_tool        = stlink
468 479
 upload_protocol   = stlink
@@ -526,7 +537,8 @@ upload_protocol = serial
526 537
 platform      = ${common_stm32f1.platform}
527 538
 extends       = common_stm32f1
528 539
 board         = genericSTM32F103VE
529
-extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
540
+extra_scripts = ${common.extra_scripts}
541
+  buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
530 542
 build_flags   = ${common_stm32f1.build_flags}
531 543
   -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
532 544
 build_unflags = ${common_stm32f1.build_unflags}
@@ -541,7 +553,8 @@ lib_ignore    = ${common_stm32f1.lib_ignore}
541 553
 platform      = ${common_stm32f1.platform}
542 554
 extends       = common_stm32f1
543 555
 board         = genericSTM32F103VE
544
-extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_mini.py
556
+extra_scripts = ${common.extra_scripts}
557
+  buildroot/share/PlatformIO/scripts/mks_robin_mini.py
545 558
 build_flags   = ${common_stm32f1.build_flags}
546 559
   -DMCU_STM32F103VE
547 560
 
@@ -553,28 +566,20 @@ platform      = ${common_stm32f1.platform}
553 566
 extends       = common_stm32f1
554 567
 board         = genericSTM32F103VE
555 568
 platform_packages = tool-stm32duino
556
-extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano.py
569
+extra_scripts = ${common.extra_scripts}
570
+  buildroot/share/PlatformIO/scripts/mks_robin_nano.py
557 571
 build_flags   = ${common_stm32f1.build_flags}
558 572
   -DMCU_STM32F103VE -DSS_TIMER=4
559 573
 
560 574
 #
561
-# MKS Robin Nano (STM32F103VET6) - MKS UI (LVGL)
562
-#
563
-[env:mks_robin_nano35]
564
-platform      = ${common_stm32f1.platform}
565
-extends       = env:mks_robin_nano
566
-extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
567
-lib_deps      = ${common_stm32f1.lib_deps}
568
-  MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
569
-
570
-#
571 575
 # MKS Robin (STM32F103ZET6)
572 576
 #
573 577
 [env:mks_robin]
574 578
 platform      = ${common_stm32f1.platform}
575 579
 extends       = common_stm32f1
576 580
 board         = genericSTM32F103ZE
577
-extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin.py
581
+extra_scripts = ${common.extra_scripts}
582
+  buildroot/share/PlatformIO/scripts/mks_robin.py
578 583
 build_flags   = ${common_stm32f1.build_flags}
579 584
   -DSS_TIMER=4 -DSTM32_XL_DENSITY
580 585
 
@@ -584,7 +589,8 @@ build_flags   = ${common_stm32f1.build_flags}
584 589
 [env:mks_robin_pro]
585 590
 platform      = ${common_stm32f1.platform}
586 591
 extends       = env:mks_robin
587
-extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_pro.py
592
+extra_scripts = ${common.extra_scripts}
593
+  buildroot/share/PlatformIO/scripts/mks_robin_pro.py
588 594
 
589 595
 
590 596
 #
@@ -603,7 +609,8 @@ platform      = ${common_stm32f1.platform}
603 609
 extends       = common_stm32f1
604 610
 board         = genericSTM32F103RC
605 611
 platform_packages = tool-stm32duino
606
-extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_e3.py
612
+extra_scripts = ${common.extra_scripts}
613
+  buildroot/share/PlatformIO/scripts/mks_robin_e3.py
607 614
 build_flags   = ${common_stm32f1.build_flags}
608 615
   -DDEBUG_LEVEL=0 -DSS_TIMER=4
609 616
 
@@ -614,7 +621,8 @@ build_flags   = ${common_stm32f1.build_flags}
614 621
 platform      = ${common_stm32f1.platform}
615 622
 extends       = common_stm32f1
616 623
 board         = genericSTM32F103RC
617
-extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite.py
624
+extra_scripts = ${common.extra_scripts}
625
+  buildroot/share/PlatformIO/scripts/mks_robin_lite.py
618 626
 
619 627
 
620 628
 #
@@ -624,7 +632,8 @@ extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite.py
624 632
 platform      = ${common_stm32f1.platform}
625 633
 extends       = common_stm32f1
626 634
 board         = genericSTM32F103RC
627
-extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
635
+extra_scripts = ${common.extra_scripts}
636
+  buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
628 637
 
629 638
 #
630 639
 # JGAurora A5S A1 (STM32F103ZET6)
@@ -633,7 +642,8 @@ extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
633 642
 platform      = ${common_stm32f1.platform}
634 643
 extends       = common_stm32f1
635 644
 board         = genericSTM32F103ZE
636
-extra_scripts = buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
645
+extra_scripts = ${common.extra_scripts}
646
+  buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
637 647
 build_flags   = ${common_stm32f1.build_flags}
638 648
   -DSTM32F1xx -DSTM32_XL_DENSITY
639 649
 
@@ -648,7 +658,7 @@ build_flags   = ${common_stm32f1.build_flags}
648 658
   -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
649 659
   -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
650 660
 lib_ignore    = ${common_stm32f1.lib_ignore}
651
-  LiquidCrystal, LiquidTWI2, TMCStepper, U8glib-HAL, SoftwareSerialM
661
+  SoftwareSerialM
652 662
 
653 663
 #
654 664
 # Malyan M200 v2 (STM32F070RB)
@@ -660,7 +670,7 @@ board       = malyanM200v2
660 670
 build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED
661 671
   -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
662 672
   -DCUSTOM_STARTUP_FILE
663
-lib_ignore  = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL, SoftwareSerial
673
+lib_ignore  = SoftwareSerial
664 674
 
665 675
 #
666 676
 # Malyan M300 (STM32F070CB)
@@ -672,7 +682,6 @@ build_flags = ${common.build_flags}
672 682
   -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\""
673 683
   -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
674 684
 src_filter  = ${common.default_src_filter} +<src/HAL/STM32>
675
-lib_ignore  = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL
676 685
 
677 686
 #
678 687
 # Chitu boards like Tronxy X5s (STM32F103ZET6)
@@ -681,7 +690,8 @@ lib_ignore  = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-H
681 690
 platform      = ${common_stm32f1.platform}
682 691
 extends       = common_stm32f1
683 692
 board         = CHITU_F103
684
-extra_scripts = pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
693
+extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-features-dependencies.py
694
+  pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
685 695
   buildroot/share/PlatformIO/scripts/chitu_crypt.py
686 696
 build_flags   = ${common_stm32f1.build_flags}
687 697
   -DSTM32F1xx -DSTM32_XL_DENSITY
@@ -698,17 +708,6 @@ extends       = env:chitu_f103
698 708
 build_flags   = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
699 709
 
700 710
 #
701
-# Chitu boards like Tronxy X5SA (STM32F103ZET6) using TFT LVGL UI
702
-#
703
-[env:chitu_f103_lvgl]
704
-platform      = ${common_stm32f1.platform}
705
-extends       = env:chitu_f103
706
-src_filter    = ${common.default_src_filter} +<src/HAL/STM32F1>
707
-lib_deps      = ${common.lib_deps}
708
-  SoftwareSerialM
709
-  MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
710
-
711
-#
712 711
 # Creality (STM32F103RET6)
713 712
 #
714 713
 [env:STM32F103RET6_creality]
@@ -717,9 +716,9 @@ extends         = common_stm32f1
717 716
 board           = genericSTM32F103RC
718 717
 build_flags     = !python Marlin/src/HAL/STM32F1/build_flags.py
719 718
   ${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY -DTEMP_TIMER_CHAN=4
720
-extra_scripts   = buildroot/share/PlatformIO/scripts/creality.py
719
+extra_scripts   = ${common.extra_scripts}
720
+  buildroot/share/PlatformIO/scripts/creality.py
721 721
 lib_ignore      = ${common_stm32f1.lib_ignore}
722
-  LiquidCrystal, LiquidTWI2, U8glib-HAL, Adafruit_MAX31865, Arduino-L6470, SailfishLCD, SlowSoftI2CMaster
723 722
 debug_tool      = jlink
724 723
 upload_protocol = jlink
725 724
 monitor_speed   = 115200
@@ -736,9 +735,10 @@ build_flags       = ${common_stm32.build_flags}
736 735
   -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
737 736
   -DUSB_PRODUCT=\"STEVAL_F401VE\"
738 737
   -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
739
-extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
738
+extra_scripts     = ${common.extra_scripts}
739
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
740 740
   buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py
741
-lib_ignore        = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
741
+lib_ignore        = SoftwareSerial
742 742
 
743 743
 #
744 744
 # FLYF407ZG
@@ -750,7 +750,8 @@ board             = FLYF407ZG
750 750
 build_flags       = ${common_stm32.build_flags}
751 751
   -DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\"
752 752
   -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
753
-extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
753
+extra_scripts     = ${common.extra_scripts}
754
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
754 755
 
755 756
 #
756 757
 # FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
@@ -764,7 +765,8 @@ board             = fysetc_s6
764 765
 build_flags       = ${common_stm32.build_flags}
765 766
   -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000
766 767
   -DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"'
767
-extra_scripts     = pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
768
+extra_scripts     = ${common.extra_scripts}
769
+  pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
768 770
 debug_tool        = stlink
769 771
 upload_protocol   = dfu
770 772
 upload_command    = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
@@ -782,8 +784,9 @@ build_flags       = ${common_stm32.build_flags}
782 784
   -DTARGET_STM32F4 -DARDUINO_BLACK_F407VE
783 785
   -DUSB_PRODUCT=\"BLACK_F407VE\"
784 786
   -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
785
-extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
786
-lib_ignore        = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
787
+extra_scripts     = ${common.extra_scripts}
788
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
789
+lib_ignore        = SoftwareSerial
787 790
 
788 791
 #
789 792
 # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
@@ -795,7 +798,8 @@ board             = BigTree_SKR_Pro
795 798
 build_flags       = ${common_stm32.build_flags}
796 799
   -DUSB_PRODUCT=\"STM32F407ZG\"
797 800
   -DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
798
-extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
801
+extra_scripts     = ${common.extra_scripts}
802
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
799 803
 #upload_protocol   = stlink
800 804
 #upload_command    = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
801 805
 debug_tool        = stlink
@@ -808,7 +812,8 @@ debug_init_break  =
808 812
 platform          = ststm32@>=5.7.0,<6.2.0
809 813
 extends           = common_stm32
810 814
 board             = BigTree_GTR_v1
811
-extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
815
+extra_scripts     = ${common.extra_scripts}
816
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
812 817
 build_flags       = ${common_stm32.build_flags}
813 818
   -DUSB_PRODUCT=\"STM32F407IG\"
814 819
   -DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
@@ -827,8 +832,8 @@ build_flags       = ${common_stm32.build_flags}
827 832
   -DHAVE_HWSERIAL3
828 833
   -DPIN_SERIAL2_RX=PD_6
829 834
   -DPIN_SERIAL2_TX=PD_5
830
-extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
831
-lib_ignore        = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
835
+extra_scripts     = ${common.extra_scripts}
836
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
832 837
 
833 838
 #
834 839
 # Lerdge base
@@ -838,7 +843,8 @@ platform           = ${common_stm32.platform}
838 843
 extends            = common_stm32
839 844
 board              = LERDGE
840 845
 board_build.offset = 0x10000
841
-extra_scripts      = pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
846
+extra_scripts      = ${common.extra_scripts}
847
+                     pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
842 848
                      buildroot/share/PlatformIO/scripts/stm32_bootloader.py
843 849
                      buildroot/share/PlatformIO/scripts/lerdge.py
844 850
 build_flags        = ${common_stm32.build_flags}
@@ -919,7 +925,6 @@ platform      = teensy
919 925
 board         = teensy31
920 926
 lib_deps      = ${common.lib_deps}
921 927
   TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
922
-lib_ignore    = Adafruit NeoPixel
923 928
 src_filter    = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
924 929
 
925 930
 #
@@ -930,7 +935,6 @@ platform      = teensy
930 935
 board         = teensy35
931 936
 lib_deps      = ${common.lib_deps}
932 937
   TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
933
-lib_ignore    = Adafruit NeoPixel
934 938
 src_filter    = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
935 939
 
936 940
 #

Loading…
Cancel
Save