Autoreset on upload
[svn42.git] / rf433ctl / Makefile
index 916e3fe..2b06faf 100755 (executable)
@@ -114,7 +114,8 @@ lss: applet/$(TARGET).lss
 sym: applet/$(TARGET).sym
 
 # Program the device.  
-upload: applet/$(TARGET).hex
+upload: applet/$(TARGET).hex reset_tty
+       ./reset_tty
        $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
 
 
@@ -207,4 +208,7 @@ depend:
                >> $(MAKEFILE); \
        $(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE)
 
+reset_tty: reset_tty.c
+       $(CC) -o reset_tty reset_tty.c
+
 .PHONY:        all build elf hex eep lss sym program coff extcoff clean depend applet_files sizebefore sizeafter