Переглянути джерело

Merge pull request #3224 from yarda/fix-melzi2-arduino-1.6.x

Fixed Makefile to work with Melzi2 boards on arduino-1.6.x
Scott Lahteine 8 роки тому
джерело
коміт
6f36b7c1cd
1 змінених файлів з 18 додано та 11 видалено
  1. 18
    11
      Marlin/Makefile

+ 18
- 11
Marlin/Makefile Переглянути файл

@@ -41,17 +41,17 @@ HARDWARE_MOTHERBOARD ?= 11
41 41
 
42 42
 # Arduino source install directory, and version number
43 43
 # On most linuxes this will be /usr/share/arduino
44
-ARDUINO_INSTALL_DIR  ?= /usr/share/arduino
45
-ARDUINO_VERSION      ?= 105
44
+ARDUINO_INSTALL_DIR  ?= ${HOME}/Arduino
45
+ARDUINO_VERSION      ?= 106
46 46
 
47 47
 # You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)
48 48
 AVR_TOOLS_PATH ?=
49 49
 
50 50
 #Programmer configuration
51
-UPLOAD_RATE        ?= 115200
52
-AVRDUDE_PROGRAMMER ?= wiring
51
+UPLOAD_RATE        ?= 57600
52
+AVRDUDE_PROGRAMMER ?= arduino
53 53
 # on most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1 
54
-UPLOAD_PORT        ?= /dev/arduino
54
+UPLOAD_PORT        ?= /dev/ttyUSB0
55 55
 
56 56
 #Directory used to build files in, contains all the build files, from object files to the final hex file
57 57
 #on linux it is best to put an absolute path like /home/username/tmp .
@@ -147,6 +147,9 @@ MCU              ?= atmega1284p
147 147
 else ifeq  ($(HARDWARE_MOTHERBOARD),66)
148 148
 HARDWARE_VARIANT ?= Sanguino
149 149
 MCU              ?= atmega1284p
150
+else ifeq  ($(HARDWARE_MOTHERBOARD),69)
151
+HARDWARE_VARIANT ?= Sanguino
152
+MCU              ?= atmega1284p
150 153
 
151 154
 #Ultimaker
152 155
 else ifeq  ($(HARDWARE_MOTHERBOARD),7)
@@ -225,7 +228,7 @@ F_CPU ?= 16000000
225 228
 # Libraries, the "hardware variant" are for boards
226 229
 # that derives from that, and their source are present in
227 230
 # the main Marlin source directory
228
-ifeq ($(HARDWARE_VARIANT), arduino)
231
+ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Sanguino))
229 232
 HARDWARE_DIR = $(ARDUINO_INSTALL_DIR)/hardware
230 233
 else
231 234
 ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
@@ -234,7 +237,7 @@ else
234 237
 HARDWARE_DIR = ../ArduinoAddons/Arduino_0.xx
235 238
 endif
236 239
 endif
237
-HARDWARE_SRC = $(HARDWARE_DIR)/$(HARDWARE_VARIANT)/cores/arduino
240
+HARDWARE_SRC = $(HARDWARE_DIR)/marlin/avr/cores/arduino
238 241
 
239 242
 TARGET = $(notdir $(CURDIR))
240 243
 
@@ -245,9 +248,9 @@ TARGET = $(notdir $(CURDIR))
245 248
 VPATH = .
246 249
 VPATH += $(BUILD_DIR)
247 250
 VPATH += $(HARDWARE_SRC)
248
-ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy))
249
-VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal
250
-VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI
251
+ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
252
+VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/LiquidCrystal/src
253
+VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/SPI
251 254
 ifeq ($(LIQUID_TWI2), 1)
252 255
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
253 256
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
@@ -274,13 +277,17 @@ ifeq ($(HARDWARE_VARIANT), arduino)
274 277
 HARDWARE_SUB_VARIANT ?= mega
275 278
 VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/$(HARDWARE_SUB_VARIANT)
276 279
 else
280
+ifeq ($(HARDWARE_VARIANT), Sanguino)
281
+VPATH += $(HARDWARE_DIR)/marlin/avr/variants/sanguino
282
+else
277 283
 HARDWARE_SUB_VARIANT ?= standard
278 284
 VPATH += $(HARDWARE_DIR)/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
279 285
 endif
286
+endif
280 287
 SRC = wiring.c \
281 288
 	wiring_analog.c wiring_digital.c \
282 289
 	wiring_pulse.c \
283
-	wiring_shift.c WInterrupts.c
290
+	wiring_shift.c WInterrupts.c hooks.c
284 291
 ifeq ($(HARDWARE_VARIANT), Teensy)
285 292
 SRC = wiring.c
286 293
 VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy

Завантаження…
Відмінити
Зберегти