From 5045d17a39d46de34b155ba45f71370a3d42a992 Mon Sep 17 00:00:00 2001 From: Tim Hawkins Date: Tue, 13 Jan 2015 13:01:43 +0800 Subject: [PATCH] fix avrdude upload in makefile --- Marlin/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Marlin/Makefile b/Marlin/Makefile index 4cc9de168..1bc1c37ef 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -36,11 +36,12 @@ # Note that all settings are set with ?=, this means you can override them # from the commandline with "make HARDWARE_MOTHERBOARD=71" for example -# This defined the board you are compiling for (see Configuration.h for the options) +# This defined the board you are compiling for (see boards.h for the options) HARDWARE_MOTHERBOARD ?= 11 # Arduino source install directory, and version number -ARDUINO_INSTALL_DIR ?= /Applications/Arduino.app/Contents/Resources/Java +# On most linuxes this will be /usr/share/arduino +ARDUINO_INSTALL_DIR ?= /usr/share/arduino ARDUINO_VERSION ?= 105 # You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin) @@ -49,9 +50,11 @@ AVR_TOOLS_PATH ?= #Programmer configuration UPLOAD_RATE ?= 115200 AVRDUDE_PROGRAMMER ?= arduino +# on most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1 UPLOAD_PORT ?= /dev/arduino -#Directory used to build files in, contains all the build files, from object files to the final hex file. +#Directory used to build files in, contains all the build files, from object files to the final hex file +#on linux it is best to put an absolute path like /home/username/tmp . BUILD_DIR ?= applet # This defines whether Liquid_TWI2 support will be built @@ -351,15 +354,15 @@ LDFLAGS = -lm # Programming support using avrdude. Settings and variables. AVRDUDE_PORT = $(UPLOAD_PORT) -AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex:i +AVRDUDE_WRITE_FLASH = -Uflash:w:$(BUILD_DIR)/$(TARGET).hex:i ifeq ($(shell uname -s), Linux) AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf else AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf endif -AVRDUDE_FLAGS = -D -C $(AVRDUDE_CONF) \ - -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \ - -b $(UPLOAD_RATE) +AVRDUDE_FLAGS = -q -q -D -C$(AVRDUDE_CONF) \ + -p$(MCU) -P$(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -cwiring\ + -b$(UPLOAD_RATE) # Define all object files. OBJ = ${patsubst %.c, $(BUILD_DIR)/%.o, ${SRC}}