From bc8caf8358dfb1c87bcbdef107fe5a7d74b37c4a Mon Sep 17 00:00:00 2001 From: Jan Gosmann Date: Thu, 1 Nov 2012 12:01:54 +0100 Subject: [PATCH 1/2] Fixing problem of hanging upload. --- arduino-mk/Arduino.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 8fc8e5c..84d6573 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -848,6 +848,8 @@ raw_upload: $(TARGET_HEX) reset: $(RESET_CMD) $(ARD_PORT) + sleep 1 # If avrdude is called to early after the reset, the upload may + # hang. # stty on MacOS likes -F, but on Debian it likes -f redirecting # stdin/out appears to work but generates a spurious error on MacOS at From 90e3c9ad0bb75d87e19d9eb017024aed55b544d1 Mon Sep 17 00:00:00 2001 From: Jan Gosmann Date: Fri, 2 Nov 2012 12:51:53 +0100 Subject: [PATCH 2/2] Fix upload in case of parallelized make. --- arduino-mk/Arduino.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 84d6573..b47a025 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -840,16 +840,14 @@ $(CORE_LIB): $(CORE_OBJS) $(LIB_OBJS) $(USER_LIB_OBJS) $(DEP_FILE): $(OBJDIR) $(DEPS) cat $(DEPS) > $(DEP_FILE) -upload: reset raw_upload +upload: raw_upload -raw_upload: $(TARGET_HEX) +raw_upload: reset $(TARGET_HEX) $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \ -U flash:w:$(TARGET_HEX):i reset: $(RESET_CMD) $(ARD_PORT) - sleep 1 # If avrdude is called to early after the reset, the upload may - # hang. # stty on MacOS likes -F, but on Debian it likes -f redirecting # stdin/out appears to work but generates a spurious error on MacOS at