1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-22 18:25:18 +00:00

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
This commit is contained in:
Christopher Pepper 2017-08-26 21:25:25 +01:00 committed by Scott Lahteine
parent a037ddbf7b
commit b908e38d08
5 changed files with 22 additions and 10 deletions

View File

@ -20,6 +20,8 @@
*
*/
#ifdef TARGET_LPC1768
#include "../../../macros.h"
#include "../HAL.h"
#include "HardwareSerial.h"
@ -634,3 +636,5 @@ void UART3_IRQHandler (void)
#ifdef __cplusplus
}
#endif
#endif // TARGET_LPC1768

View File

@ -61,6 +61,7 @@
*
*/
#ifdef TARGET_LPC1768
#if HAS_SERVOS
@ -166,5 +167,5 @@
#endif // HAS_SERVOS
#endif // TARGET_LPC1768

View File

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

View File

@ -16,6 +16,8 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef TARGET_LPC1768
#include "../../../macros.h"
#include "../HAL.h"
#include "arduino.h"
@ -222,3 +224,5 @@ return; //silences warning
}
}
#endif
#endif // TARGET_LPC1768

View File

@ -25,7 +25,7 @@ lib_deps =
https://github.com/lincomatic/LiquidTWI2.git
https://github.com/teemuatlut/TMC2130Stepper.git
https://github.com/adafruit/Adafruit_NeoPixel.git
default_src_filter = +<*> -<example_configurations> -<src/HAL/HAL_*> -<frameworks>
default_src_filter = +<*> -<example_configurations> -<frameworks>
[env:megaatmega2560]
platform = atmelavr
@ -34,7 +34,7 @@ board = megaatmega2560
build_flags = -I $BUILDSRC_DIR
board_f_cpu = 16000000L
lib_deps = ${common.lib_deps}
src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
src_filter = ${common.default_src_filter}
[env:megaatmega1280]
platform = atmelavr
@ -43,7 +43,7 @@ board = megaatmega1280
build_flags = -I $BUILDSRC_DIR
board_f_cpu = 16000000L
lib_deps = ${common.lib_deps}
src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
src_filter = ${common.default_src_filter}
[env:printrboard]
platform = teensy
@ -53,7 +53,7 @@ build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_PRINTRBOARD
# Bug in arduino framework does not allow boards running at 20Mhz
#board_f_cpu = 20000000L
lib_deps = ${common.lib_deps}
src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
src_filter = ${common.default_src_filter}
[env:printrboard_revf]
platform = teensy
@ -68,7 +68,7 @@ framework = arduino
board = teensy20pp
build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_BRAINWAVE_PRO
lib_deps = ${common.lib_deps}
src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
src_filter = ${common.default_src_filter}
[env:rambo]
platform = atmelavr
@ -77,7 +77,7 @@ board = reprap_rambo
build_flags = -I $BUILDSRC_DIR
board_f_cpu = 16000000L
lib_deps = ${common.lib_deps}
src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
src_filter = ${common.default_src_filter}
[env:anet10]
platform = atmelavr
@ -98,7 +98,7 @@ framework = arduino
board = due
build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_RAMPS4DUE_EFB
lib_deps = ${common.lib_deps}
src_filter = ${common.default_src_filter} +<src/HAL/HAL_DUE>
src_filter = ${common.default_src_filter}
[env:teensy35]
platform = teensy
@ -107,7 +107,7 @@ board = teensy35
build_flags = -I $BUILDSRC_DIR
lib_deps = ${common.lib_deps}
lib_ignore = Adafruit NeoPixel
src_filter = ${common.default_src_filter} +<src/HAL/HAL_TEENSY35_36>
src_filter = ${common.default_src_filter}
[env:Re-ARM]
platform = nxplpc
@ -115,5 +115,5 @@ board_f_cpu = 100000000L
build_flags = !python Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
lib_ldf_mode = off
lib_deps = U8glib-ARM
src_filter = ${common.default_src_filter} +<src/HAL/HAL_LPC1768> +<frameworks/CMSIS/LPC1768>
src_filter = ${common.default_src_filter} +<frameworks/CMSIS/LPC1768>
extra_scripts = Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py