Browse Source

Add needed platform defined gaurds to compile with Arduino IDE

Also removed explicit platform HAL directory inclusion from platformio.ini to make sure these errors are caught by Travis in the future
Christopher Pepper 6 years ago
parent
commit
b908e38d08

+ 4
- 0
Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp View File

@@ -20,6 +20,8 @@
20 20
  *
21 21
  */
22 22
 
23
+#ifdef TARGET_LPC1768
24
+
23 25
 #include "../../../macros.h"
24 26
 #include "../HAL.h"
25 27
 #include "HardwareSerial.h"
@@ -634,3 +636,5 @@ void UART3_IRQHandler (void)
634 636
 #ifdef __cplusplus
635 637
 }
636 638
 #endif
639
+
640
+#endif // TARGET_LPC1768

+ 2
- 1
Marlin/src/HAL/HAL_LPC1768/LPC1768_Servo.cpp View File

@@ -61,6 +61,7 @@
61 61
  *
62 62
  */
63 63
 
64
+#ifdef TARGET_LPC1768
64 65
 
65 66
 #if HAS_SERVOS
66 67
 
@@ -166,5 +167,5 @@
166 167
 
167 168
 #endif // HAS_SERVOS
168 169
 
169
-
170
+#endif // TARGET_LPC1768
170 171
 

+ 3
- 0
Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp View File

@@ -29,6 +29,7 @@ The latest version of this library can always be found at
29 29
 http://arduiniana.org.
30 30
 */
31 31
 
32
+#ifdef TARGET_LPC1768
32 33
 
33 34
 //
34 35
 // Includes
@@ -396,3 +397,5 @@ int SoftwareSerial::peek()
396 397
   // Read from "head"
397 398
   return _receive_buffer[_receive_buffer_head];
398 399
 }
400
+
401
+#endif // TARGET_LPC1768

+ 4
- 0
Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp View File

@@ -16,6 +16,8 @@
16 16
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 17
 */
18 18
 
19
+#ifdef TARGET_LPC1768
20
+
19 21
 #include "../../../macros.h"
20 22
 #include "../HAL.h"
21 23
 #include "arduino.h"
@@ -222,3 +224,5 @@ return; //silences warning
222 224
 }
223 225
 }
224 226
 #endif
227
+
228
+#endif // TARGET_LPC1768

+ 9
- 9
platformio.ini View File

@@ -25,7 +25,7 @@ lib_deps =
25 25
   https://github.com/lincomatic/LiquidTWI2.git
26 26
   https://github.com/teemuatlut/TMC2130Stepper.git
27 27
   https://github.com/adafruit/Adafruit_NeoPixel.git
28
-default_src_filter = +<*> -<example_configurations> -<src/HAL/HAL_*> -<frameworks>
28
+default_src_filter = +<*> -<example_configurations> -<frameworks>
29 29
 
30 30
 [env:megaatmega2560]
31 31
 platform = atmelavr
@@ -34,7 +34,7 @@ board = megaatmega2560
34 34
 build_flags = -I $BUILDSRC_DIR
35 35
 board_f_cpu = 16000000L
36 36
 lib_deps = ${common.lib_deps}
37
-src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
37
+src_filter = ${common.default_src_filter}
38 38
 
39 39
 [env:megaatmega1280]
40 40
 platform = atmelavr
@@ -43,7 +43,7 @@ board = megaatmega1280
43 43
 build_flags = -I $BUILDSRC_DIR
44 44
 board_f_cpu = 16000000L
45 45
 lib_deps = ${common.lib_deps}
46
-src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
46
+src_filter = ${common.default_src_filter}
47 47
 
48 48
 [env:printrboard]
49 49
 platform = teensy
@@ -53,7 +53,7 @@ build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_PRINTRBOARD
53 53
 # Bug in arduino framework does not allow boards running at 20Mhz
54 54
 #board_f_cpu = 20000000L
55 55
 lib_deps = ${common.lib_deps}
56
-src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
56
+src_filter = ${common.default_src_filter}
57 57
 
58 58
 [env:printrboard_revf]
59 59
 platform = teensy
@@ -68,7 +68,7 @@ framework = arduino
68 68
 board = teensy20pp
69 69
 build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_BRAINWAVE_PRO
70 70
 lib_deps = ${common.lib_deps}
71
-src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
71
+src_filter = ${common.default_src_filter}
72 72
 
73 73
 [env:rambo]
74 74
 platform = atmelavr
@@ -77,7 +77,7 @@ board = reprap_rambo
77 77
 build_flags = -I $BUILDSRC_DIR
78 78
 board_f_cpu = 16000000L
79 79
 lib_deps = ${common.lib_deps}
80
-src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
80
+src_filter = ${common.default_src_filter}
81 81
 
82 82
 [env:anet10]
83 83
 platform = atmelavr
@@ -98,7 +98,7 @@ framework = arduino
98 98
 board = due
99 99
 build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_RAMPS4DUE_EFB
100 100
 lib_deps = ${common.lib_deps}
101
-src_filter = ${common.default_src_filter} +<src/HAL/HAL_DUE>
101
+src_filter = ${common.default_src_filter}
102 102
 
103 103
 [env:teensy35]
104 104
 platform = teensy
@@ -107,7 +107,7 @@ board = teensy35
107 107
 build_flags = -I $BUILDSRC_DIR
108 108
 lib_deps = ${common.lib_deps}
109 109
 lib_ignore = Adafruit NeoPixel
110
-src_filter = ${common.default_src_filter} +<src/HAL/HAL_TEENSY35_36>
110
+src_filter = ${common.default_src_filter}
111 111
 
112 112
 [env:Re-ARM]
113 113
 platform = nxplpc
@@ -115,5 +115,5 @@ board_f_cpu = 100000000L
115 115
 build_flags = !python Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
116 116
 lib_ldf_mode = off
117 117
 lib_deps = U8glib-ARM
118
-src_filter = ${common.default_src_filter} +<src/HAL/HAL_LPC1768> +<frameworks/CMSIS/LPC1768>
118
+src_filter = ${common.default_src_filter} +<frameworks/CMSIS/LPC1768>
119 119
 extra_scripts = Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py

Loading…
Cancel
Save