mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-05 04:55:19 +02:00
atusb/fw/Makefile: new target "update" to update the application via DFU
- Makefile (USB_ID, dfu): moved USB ID to variable, for sharing - Makefile (.PHONY, update): new target to reset atusb and to DFU new firmware
This commit is contained in:
parent
62a03bbf32
commit
b82db55f4a
@ -28,7 +28,9 @@ OBJCOPY = $(AVR_PREFIX)objcopy
|
|||||||
#OBJDUMP = $(AVR_PREFIX)objdump
|
#OBJDUMP = $(AVR_PREFIX)objdump
|
||||||
SIZE = $(AVR_PREFIX)size
|
SIZE = $(AVR_PREFIX)size
|
||||||
|
|
||||||
USB_OBJS = usb.o atu2.o
|
USB_ID = 20b7:1540
|
||||||
|
|
||||||
|
USB_OBJS = usb.o atu2.o
|
||||||
OBJS = atusb.o board.o sernum.o spi.o descr.o ep0.o $(USB_OBJS)
|
OBJS = atusb.o board.o sernum.o spi.o descr.o ep0.o $(USB_OBJS)
|
||||||
BOOT_OBJS = boot.o board.o sernum.o spi.o flash.o dfu.o $(USB_OBJS)
|
BOOT_OBJS = boot.o board.o sernum.o spi.o flash.o dfu.o $(USB_OBJS)
|
||||||
|
|
||||||
@ -58,7 +60,7 @@ endif
|
|||||||
|
|
||||||
# ----- Rules -----------------------------------------------------------------
|
# ----- Rules -----------------------------------------------------------------
|
||||||
|
|
||||||
.PHONY: all clean upload prog dfu version.c
|
.PHONY: all clean upload prog dfu update version.c
|
||||||
.PHONY: prog-app prog-read on off reset
|
.PHONY: prog-app prog-read on off reset
|
||||||
|
|
||||||
all: $(NAME).bin boot.hex
|
all: $(NAME).bin boot.hex
|
||||||
@ -144,7 +146,12 @@ prog-read:
|
|||||||
-U flash:r:mcu.bin:r
|
-U flash:r:mcu.bin:r
|
||||||
|
|
||||||
dfu: $(NAME).bin
|
dfu: $(NAME).bin
|
||||||
dfu-util -d 20b7:1540 -D $(NAME).bin
|
dfu-util -d $(USB_ID) -D $(NAME).bin
|
||||||
|
|
||||||
|
update: $(NAME).bin
|
||||||
|
-atrf-reset -a
|
||||||
|
usbwait -r -i 0.01 -t 5 $(USB_ID)
|
||||||
|
$(MAKE) dfu
|
||||||
|
|
||||||
on:
|
on:
|
||||||
ssh $(HOST) poke 0x10010318 4
|
ssh $(HOST) poke 0x10010318 4
|
||||||
|
Loading…
Reference in New Issue
Block a user