Ver código fonte

Pins/tests followup (#21268)

Missing commit from #21254
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
Keith Bennett 3 anos atrás
pai
commit
2c5967925f
Nenhuma conta vinculada ao e-mail do autor do commit

+ 4
- 0
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h Ver arquivo

27
   #define BOARD_INFO_NAME "BTT SKR V1.4"
27
   #define BOARD_INFO_NAME "BTT SKR V1.4"
28
 #endif
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
 // SD Connection
35
 // SD Connection
32
 //
36
 //

+ 3
- 0
Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h Ver arquivo

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

+ 3
- 0
Marlin/src/pins/ramps/pins_RAMPS.h Ver arquivo

47
 
47
 
48
 #include "env_validate.h"
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
 #ifndef BOARD_INFO_NAME
53
 #ifndef BOARD_INFO_NAME
51
   #define BOARD_INFO_NAME "RAMPS 1.4"
54
   #define BOARD_INFO_NAME "RAMPS 1.4"
52
 #endif
55
 #endif

+ 3
- 0
Marlin/src/pins/ramps/pins_RAMPS_S_12.h Ver arquivo

36
 
36
 
37
 #include "env_validate.h"
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
 #ifndef BOARD_INFO_NAME
42
 #ifndef BOARD_INFO_NAME
40
   #define BOARD_INFO_NAME "RAMPS S 1.2"
43
   #define BOARD_INFO_NAME "RAMPS S 1.2"
41
 #endif
44
 #endif

+ 16
- 0
buildroot/share/PlatformIO/scripts/common-dependencies-post.py Ver arquivo

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 Ver arquivo

215
   pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
215
   pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
216
   pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
216
   pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
217
   pre:buildroot/share/PlatformIO/scripts/preflight-checks.py
217
   pre:buildroot/share/PlatformIO/scripts/preflight-checks.py
218
+  post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py
218
 build_flags        = -fmax-errors=5 -g3 -D__MARLIN_FIRMWARE__ -fmerge-constants
219
 build_flags        = -fmax-errors=5 -g3 -D__MARLIN_FIRMWARE__ -fmerge-constants
219
 lib_deps           =
220
 lib_deps           =
220
 
221
 
727
 extends  = common_LPC
728
 extends  = common_LPC
728
 board    = nxp_lpc1769
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
 #      STM32 Architecture       #
733
 #      STM32 Architecture       #

Carregando…
Cancelar
Salvar