diff options
author | Gregwar <g.passault@gmail.com> | 2014-04-24 10:15:05 +0200 |
---|---|---|
committer | Gregwar <g.passault@gmail.com> | 2014-04-24 10:15:23 +0200 |
commit | 731e2ab24755b3706daf7d64eaa53f2ec0512277 (patch) | |
tree | 8dc7170e295756116dcdc9e973dee028b9cb2454 /Makefile | |
parent | 3c8ded4743c09a7b0c7737392d4e4c15e6959852 (diff) | |
download | librambutan-731e2ab24755b3706daf7d64eaa53f2ec0512277.tar.gz librambutan-731e2ab24755b3706daf7d64eaa53f2ec0512277.zip |
Adding ROBOTIS "make install" and reset hook
Signed-off-by: Grégoire Passault <g.passault@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -35,6 +35,9 @@ MEMORY_TARGET ?= flash # Chooses the bootloader, available: maple and robotis BOOTLOADER ?= maple +# This is the serial port used by robotis bootloader +ROBOTIS_PORT ?= /dev/ttyACM0 + # $(BOARD)- and $(MEMORY_TARGET)-specific configuration include $(MAKEDIR)/target-config.mk @@ -105,12 +108,19 @@ include $(SRCROOT)/build-targets.mk # USB ID for DFU upload -- FIXME: do something smarter with this BOARD_USB_VENDOR_ID := 1EAF BOARD_USB_PRODUCT_ID := 0003 + +ifeq ($(BOOTLOADER),maple) UPLOAD_ram := $(SUPPORT_PATH)/scripts/reset.py && \ sleep 1 && \ $(DFU) -a0 -d $(BOARD_USB_VENDOR_ID):$(BOARD_USB_PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R UPLOAD_flash := $(SUPPORT_PATH)/scripts/reset.py && \ sleep 1 && \ $(DFU) -a1 -d $(BOARD_USB_VENDOR_ID):$(BOARD_USB_PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R +endif + +ifeq ($(BOOTLOADER),robotis) +UPLOAD_flash := $(SUPPORT_PATH)/scripts/robotis-loader.py $(ROBOTIS_PORT) $(BUILD_PATH)/$(BOARD).bin +endif # Conditionally upload to whatever the last build was install: INSTALL_TARGET = $(shell cat $(BUILD_PATH)/build-type 2>/dev/null) |