Browse Source

Tweaks to build scripts

Scott Lahteine 3 years ago
parent
commit
680172a084

+ 3
- 2
buildroot/share/PlatformIO/scripts/SAMD51_grandcentral_m4.py View File

@@ -8,8 +8,9 @@ from pprint import pprint
8 8
 
9 9
 Import("env")
10 10
 
11
-rxBuf = env["MARLIN_FEATURES"]["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in env["MARLIN_FEATURES"] else "0"
12
-txBuf = env["MARLIN_FEATURES"]["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in env["MARLIN_FEATURES"] else "0"
11
+mf = env["MARLIN_FEATURES"]
12
+rxBuf = mf["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in mf else "0"
13
+txBuf = mf["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in mf else "0"
13 14
 
14 15
 serialBuf = str(max(int(rxBuf), int(txBuf), 350))
15 16
 

+ 2
- 2
buildroot/share/PlatformIO/scripts/common-cxxflags.py View File

@@ -28,8 +28,8 @@ def add_cpu_freq():
28 28
 if env.GetBuildType() == "debug":
29 29
 	env['BUILD_DIR'] = '$PROJECT_BUILD_DIR/$PIOENV/debug'
30 30
 
31
-# On some platform, F_CPU is a runtime variable. Since it's used to convert from ns 
32
-# to CPU cycles, this adds overhead preventing small delay (in the order of less than 
31
+# On some platform, F_CPU is a runtime variable. Since it's used to convert from ns
32
+# to CPU cycles, this adds overhead preventing small delay (in the order of less than
33 33
 # 30 cycles) to be generated correctly. By using a compile time constant instead
34 34
 # the compiler will perform the computation and this overhead will be avoided
35 35
 add_cpu_freq()

+ 3
- 3
buildroot/share/PlatformIO/scripts/fix_framework_weakness.py View File

@@ -31,11 +31,11 @@ if env.MarlinFeatureIsEnabled("POSTMORTEM_DEBUGGING"):
31 31
 
32 32
     print("Libmaple modified and ready for post mortem debugging")
33 33
 
34
-rxBuf = env["MARLIN_FEATURES"]["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in env["MARLIN_FEATURES"] else "0"
35
-txBuf = env["MARLIN_FEATURES"]["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in env["MARLIN_FEATURES"] else "0"
34
+mf = env["MARLIN_FEATURES"]
35
+rxBuf = mf["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in mf else "0"
36
+txBuf = mf["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in mf else "0"
36 37
 if int(rxBuf) < 64:
37 38
 	rxBuf = "64"
38
-
39 39
 if int(txBuf) < 64:
40 40
 	txBuf = "64"
41 41
 

Loading…
Cancel
Save