Browse Source

Merge pull request #1353 from thawkins/Development

fix avrdude upload in makefile
pull/1/head
Bo Herrmannsen 10 years ago
parent
commit
f2cb4a3655
  1. 17
      Marlin/Makefile

17
Marlin/Makefile

@ -36,11 +36,12 @@
# Note that all settings are set with ?=, this means you can override them # Note that all settings are set with ?=, this means you can override them
# from the commandline with "make HARDWARE_MOTHERBOARD=71" for example # 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 HARDWARE_MOTHERBOARD ?= 11
# Arduino source install directory, and version number # 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 ARDUINO_VERSION ?= 105
# You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin) # 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 #Programmer configuration
UPLOAD_RATE ?= 115200 UPLOAD_RATE ?= 115200
AVRDUDE_PROGRAMMER ?= arduino AVRDUDE_PROGRAMMER ?= arduino
# on most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1
UPLOAD_PORT ?= /dev/arduino 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 BUILD_DIR ?= applet
# This defines whether Liquid_TWI2 support will be built # This defines whether Liquid_TWI2 support will be built
@ -351,15 +354,15 @@ LDFLAGS = -lm
# Programming support using avrdude. Settings and variables. # Programming support using avrdude. Settings and variables.
AVRDUDE_PORT = $(UPLOAD_PORT) 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) ifeq ($(shell uname -s), Linux)
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf
else else
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
endif endif
AVRDUDE_FLAGS = -D -C $(AVRDUDE_CONF) \ AVRDUDE_FLAGS = -q -q -D -C$(AVRDUDE_CONF) \
-p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \ -p$(MCU) -P$(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -cwiring\
-b $(UPLOAD_RATE) -b$(UPLOAD_RATE)
# Define all object files. # Define all object files.
OBJ = ${patsubst %.c, $(BUILD_DIR)/%.o, ${SRC}} OBJ = ${patsubst %.c, $(BUILD_DIR)/%.o, ${SRC}}

Loading…
Cancel
Save