|
@@ -147,6 +147,11 @@ else ifeq ($(HARDWARE_MOTHERBOARD),91)
|
147
|
147
|
HARDWARE_VARIANT ?= Sanguino
|
148
|
148
|
MCU ?= atmega644p
|
149
|
149
|
|
|
150
|
+#Rambo
|
|
151
|
+else ifeq ($(HARDWARE_MOTHERBOARD),301)
|
|
152
|
+HARDWARE_VARIANT ?= arduino
|
|
153
|
+MCU ?= atmega2560
|
|
154
|
+
|
150
|
155
|
endif
|
151
|
156
|
|
152
|
157
|
# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
|
|
@@ -158,10 +163,8 @@ F_CPU ?= 16000000
|
158
|
163
|
# Libraries, the "hardware variant" are for boards
|
159
|
164
|
# that derives from that, and their source are present in
|
160
|
165
|
# the main Marlin source directory
|
161
|
|
-ARDUINO = $(ARDUINO_INSTALL_DIR)/hardware/arduino/cores/arduino
|
162
|
|
-
|
163
|
|
-ifeq (${HARDWARE_VARIANT}, arduino)
|
164
|
|
-HARDWARE_SRC = $(ARDUINO)
|
|
166
|
+ifeq ($(HARDWARE_VARIANT), arduino)
|
|
167
|
+HARDWARE_SRC = $(ARDUINO_INSTALL_DIR)/hardware/arduino/cores/arduino
|
165
|
168
|
else
|
166
|
169
|
HARDWARE_SRC = $(HARDWARE_VARIANT)/cores/arduino
|
167
|
170
|
endif
|
|
@@ -175,12 +178,12 @@ TARGET = $(notdir $(CURDIR))
|
175
|
178
|
VPATH = .
|
176
|
179
|
VPATH += $(BUILD_DIR)
|
177
|
180
|
VPATH += $(HARDWARE_SRC)
|
178
|
|
-VPATH += $(ARDUINO)
|
179
|
181
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal
|
180
|
|
-#TODO: Add the path to the hardware variant when using Arduino >= 100, and adjust the files required for compilation.
|
181
|
|
-#VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/mega
|
182
|
|
-
|
183
|
|
-SRC = pins_arduino.c main.c wiring.c \
|
|
182
|
+VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI
|
|
183
|
+ifeq ($(HARDWARE_VARIANT), arduino)
|
|
184
|
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/mega
|
|
185
|
+endif
|
|
186
|
+SRC = wiring.c \
|
184
|
187
|
wiring_analog.c wiring_digital.c \
|
185
|
188
|
wiring_pulse.c \
|
186
|
189
|
wiring_shift.c WInterrupts.c
|
|
@@ -188,8 +191,15 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \
|
188
|
191
|
MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \
|
189
|
192
|
SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp \
|
190
|
193
|
stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp
|
191
|
|
-#CXXSRC += LiquidCrystal.cpp ultralcd.cpp
|
192
|
|
-#CXXSRC += ultralcd.cpp
|
|
194
|
+CXXSRC += LiquidCrystal.cpp ultralcd.cpp SPI.cpp
|
|
195
|
+
|
|
196
|
+#Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version
|
|
197
|
+ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
|
|
198
|
+CXXSRC += main.cpp
|
|
199
|
+else
|
|
200
|
+SRC += pins_arduino.c main.c
|
|
201
|
+endif
|
|
202
|
+
|
193
|
203
|
FORMAT = ihex
|
194
|
204
|
|
195
|
205
|
# Name of this Makefile (used for "make depend").
|