[ArDrone] Fix breaking autoconfig

This commit is contained in:
Christophe De Wagter
2013-09-24 17:06:01 +02:00
parent 7c474917e0
commit 4e7975cea9
+36 -1
View File
@@ -81,6 +81,38 @@ load upload program: $(OBJDIR)/$(TARGET).elf
# Kill the application
-echo "killall -9 $(TARGET).elf" | telnet $(HOST)
# Make the target dir and edit the config
-{ \
echo "mkdir -p $(TARGET_DIR)"; \
} | telnet $(HOST)
# Upload the drivers and new application
{ \
echo "binary"; \
echo "put $(PAPARAZZI_SRC)/sw/ext/ardrone2_drivers/cdc-acm.ko /$(SUB_DIR)/cdc-acm.ko"; \
echo "put $(OBJDIR)/$(TARGET).elf /$(SUB_DIR)/$(TARGET).elf"; \
echo "quit"; \
} | ftp -n $(HOST)
# Upload the modules and start the application
-{ \
echo "insmod $(TARGET_DIR)/cdc-acm.ko"; \
echo "chmod 777 $(TARGET_DIR)/$(TARGET).elf"; \
echo "$(TARGET_DIR)/$(TARGET).elf > /dev/null 2>&1 &"; \
} | telnet $(HOST)
ifeq ($(ARDRONE2_REBOOT),1)
-{ \
echo "reboot"; \
} | telnet $(HOST)
endif
# Program the device and start it.
load2 upload2 program2: $(OBJDIR)/$(TARGET).elf
# Kill the application
-echo "killall -9 $(TARGET).elf" | telnet $(HOST)
# Make the target dir and edit the config
-{ \
echo "mkdir -p $(TARGET_DIR)"; \
@@ -111,7 +143,7 @@ load upload program: $(OBJDIR)/$(TARGET).elf
echo "chmod 777 $(TARGET_DIR)/$(TARGET).elf"; \
echo "$(TARGET_DIR)/$(TARGET).elf > /dev/null 2>&1 &"; \
} | telnet $(HOST)
ifeq ($(ARDRONE2_REBOOT),1)
-{ \
echo "reboot"; \
@@ -119,6 +151,8 @@ ifeq ($(ARDRONE2_REBOOT),1)
endif
# Link: create ELF output file from object files.
.SECONDARY : $(OBJDIR)/$(TARGET).elf
.PRECIOUS : $(OBJ_C_OMAP) $(OBJ_CPP_OMAP)
@@ -140,6 +174,7 @@ $(OBJDIR)/%.o : %.cpp $(OBJDIR)/../Makefile.ac
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
$(Q)$(CXX) -c $(CXXFLAGS) $< -o $@
# Listing of phony targets.
.PHONY : all build elf clean clean_list