Merge pull request #1353 from thawkins/Development
fix avrdude upload in makefile
This commit is contained in:
commit
f2cb4a3655
1 changed files with 10 additions and 7 deletions
|
@ -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}}
|
||||
|
|
Reference in a new issue