From c47f52d6ca056f697081b3ef1f6aef2e5de16cc4 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 12 Jul 2011 04:40:03 -0300 Subject: [PATCH 1/2] atusb/fw/board_app.c (INT0_vect): limit interrupt serials to 0x00-0x7f This leaves the range 0x80-0xff for other uses. --- atusb/fw/board_app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atusb/fw/board_app.c b/atusb/fw/board_app.c index 22b93c3..000d8eb 100644 --- a/atusb/fw/board_app.c +++ b/atusb/fw/board_app.c @@ -157,7 +157,7 @@ ISR(INT0_vect) { if (eps[1].state == EP_IDLE) { led(1); - irq_serial++; + irq_serial = (irq_serial+1) & 0x7f; usb_send(&eps[1], &irq_serial, 1, done, NULL); } } From 1ad8683858d8c7c6ef0b0dd65c78d764663ff504 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 12 Jul 2011 05:39:49 -0300 Subject: [PATCH 2/2] atusb/fw/Makefile (bindist): new target to upload and describe atusb.bin --- atusb/fw/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/atusb/fw/Makefile b/atusb/fw/Makefile index ec27c5e..db0e9a7 100644 --- a/atusb/fw/Makefile +++ b/atusb/fw/Makefile @@ -61,7 +61,7 @@ endif # ----- Rules ----------------------------------------------------------------- -.PHONY: all clean upload prog dfu update version.c +.PHONY: all clean upload prog dfu update version.c bindist .PHONY: prog-app prog-read on off reset all: $(NAME).bin boot.hex @@ -135,6 +135,19 @@ boot-%.o: usb/%.c $(CC) $(CFLAGS) -DBOOT_LOADER -Os -o $@ -c $< $(MKDEP) +# ----- Distribution ---------------------------------------------------------- + +BINDIST_BASE=http://downloads.qi-hardware.com/people/werner/wpan/bindist +ATUSB_BIN_NAME=atusb-`git rev-parse HEAD | cut -c 1-7`.bin + +bindist: + qippl atusb.bin wpan/bindist/$(ATUSB_BIN_NAME) + @echo $(BINDIST_BASE)/$(ATUSB_BIN_NAME) + @echo md5sum: `md5sum atusb.bin | sed 's/ .*//'` + @echo atrf-id: \ + `sed '/.*number = \(.*\);/s//#\1/p;d' version.c` \ + `sed '/.*date = "\(.*\)";/s//\1/p;d' version.c` + # ----- Programming and device control ---------------------------------------- upload: $(NAME).bin boot.hex