From 5bd4c4015789ee5823c4eb3f7ed6f67a8e416d38 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Fri, 29 Apr 2011 10:23:45 +0200 Subject: [PATCH] [avr] encapsulate stopping/starting the flukso daemon in rprogram --- mote/v2/avr/makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mote/v2/avr/makefile b/mote/v2/avr/makefile index 25b8eb3..a5efa8b 100644 --- a/mote/v2/avr/makefile +++ b/mote/v2/avr/makefile @@ -412,10 +412,19 @@ program: $(TARGET).hex $(TARGET).eep $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FUSES) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) # Program the device remotely. +FLUKSO = /etc/init.d/flukso + rprogram: $(TARGET).hex $(TARGET).eep @scp $(TARGET).hex $(TARGET).eep root@192.168.255.1:/tmp - @ssh root@192.168.255.1 "cd /tmp; $(AVRDUDE_R) $(AVRDUDE_FLAGS_R) $(AVRDUDE_WRITE_FUSES) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)" - + @ssh root@192.168.255.1 \ + "echo +++ stopping the flukso daemon +++;" \ + "$(FLUKSO) stop;" \ + "cd /tmp;" \ + "$(AVRDUDE_R) $(AVRDUDE_FLAGS_R) $(AVRDUDE_WRITE_FUSES) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM);" \ + "sleep 1;" \ + "echo;" \ + "echo +++ starting the flukso daemon +++;" \ + "$(FLUKSO) start <&- 2>&- >/dev/null" # Generate avr-gdb config/init file which does the following: # define the reset signal, load the target file, connect to target, and set