TARGET = tuer
INSTALL_DIR = $(PWD)/arduino
-PORT = /dev/ttyUSB0
+PORT = /dev/door
#UPLOAD_RATE = 19200
UPLOAD_RATE = 57600
AVRDUDE_PROGRAMMER = stk500v1
############################################################################
# Below here nothing should be changed...
+RESET_TTY_DIR=../reset_tty/
+RESET_TTY=$(RESET_TTY_DIR)reset_tty
ARDUINO = $(INSTALL_DIR)/hardware/cores/arduino
AVR_TOOLS_PATH = /usr/bin
SRC = $(ARDUINO)/pins_arduino.c $(ARDUINO)/wiring.c \
sym: applet/$(TARGET).sym
# Program the device.
-upload: applet/$(TARGET).hex
+upload: applet/$(TARGET).hex $(RESET_TTY)
+ $(RESET_TTY) $(PORT)
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
+$(RESET_TTY):
+ make -C $(RESET_TTY_DIR)
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) applet/$(TARGET).hex