Selaa lähdekoodia

Pins/tests followup (#21268)

Missing commit from #21254
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
Keith Bennett 3 vuotta sitten
vanhempi
commit
2c5967925f
No account linked to committer's email address

+ 4
- 0
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h Näytä tiedosto

@@ -27,6 +27,10 @@
27 27
   #define BOARD_INFO_NAME "BTT SKR V1.4"
28 28
 #endif
29 29
 
30
+#ifndef BOARD_CUSTOM_BUILD_FLAGS
31
+  #define BOARD_CUSTOM_BUILD_FLAGS -DLPC_PINCFG_UART3_P4_28
32
+#endif
33
+
30 34
 //
31 35
 // SD Connection
32 36
 //

+ 3
- 0
Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h Näytä tiedosto

@@ -43,6 +43,9 @@
43 43
   #warning "Serial 3 is originally reserved to Y limit switches. Hardware changes are required to use it."
44 44
 #endif
45 45
 
46
+// Custom flags and defines for the build
47
+//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__
48
+
46 49
 #define BOARD_INFO_NAME "LGT KIT V1.0"
47 50
 
48 51
 //

+ 3
- 0
Marlin/src/pins/ramps/pins_RAMPS.h Näytä tiedosto

@@ -47,6 +47,9 @@
47 47
 
48 48
 #include "env_validate.h"
49 49
 
50
+// Custom flags and defines for the build
51
+//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__
52
+
50 53
 #ifndef BOARD_INFO_NAME
51 54
   #define BOARD_INFO_NAME "RAMPS 1.4"
52 55
 #endif

+ 3
- 0
Marlin/src/pins/ramps/pins_RAMPS_S_12.h Näytä tiedosto

@@ -36,6 +36,9 @@
36 36
 
37 37
 #include "env_validate.h"
38 38
 
39
+// Custom flags and defines for the build
40
+//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__
41
+
39 42
 #ifndef BOARD_INFO_NAME
40 43
   #define BOARD_INFO_NAME "RAMPS S 1.2"
41 44
 #endif

+ 16
- 0
buildroot/share/PlatformIO/scripts/common-dependencies-post.py Näytä tiedosto

@@ -0,0 +1,16 @@
1
+#
2
+# common-dependencies-post.py
3
+# Convenience script to add build flags for Marlin Enabled Features
4
+#
5
+
6
+Import("env")
7
+Import("projenv")
8
+
9
+def apply_board_build_flags():
10
+	if not 'BOARD_CUSTOM_BUILD_FLAGS' in env['MARLIN_FEATURES']:
11
+		return
12
+	projenv.Append(CCFLAGS=env['MARLIN_FEATURES']['BOARD_CUSTOM_BUILD_FLAGS'].split())
13
+
14
+# We need to add the board build flags in a post script
15
+# so the platform build script doesn't overwrite the custom CCFLAGS
16
+apply_board_build_flags()

+ 1
- 6
platformio.ini Näytä tiedosto

@@ -215,6 +215,7 @@ extra_scripts      =
215 215
   pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
216 216
   pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
217 217
   pre:buildroot/share/PlatformIO/scripts/preflight-checks.py
218
+  post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py
218 219
 build_flags        = -fmax-errors=5 -g3 -D__MARLIN_FIRMWARE__ -fmerge-constants
219 220
 lib_deps           =
220 221
 
@@ -727,12 +728,6 @@ platform = ${common_LPC.platform}
727 728
 extends  = common_LPC
728 729
 board    = nxp_lpc1769
729 730
 
730
-# BTT SKR 1.4 needs a UART3 tweak
731
-[env:LPC1768_btt_skr_v1_4]
732
-platform    = ${env:LPC1768.platform}
733
-extends     = env:LPC1768
734
-build_flags = ${env:LPC1768.build_flags} -DLPC_PINCFG_UART3_P4_28
735
-
736 731
 #################################
737 732
 #                               #
738 733
 #      STM32 Architecture       #

Loading…
Peruuta
Tallenna