summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2012-09-26 18:48:18 +0000
committerChristian Pointner <equinox@spreadspace.org>2012-09-26 18:48:18 +0000
commit68f2a7b7f79fa085bb6b39038523c72a81b64193 (patch)
tree1731625c899c8963accd33c21272c175e6a4aff3
parentremoved deprecated info (diff)
updated README
added minimus reset script git-svn-id: https://svn.spreadspace.org/avr/trunk@60 aa12f405-d877-488e-9caf-2d797e2a1cc7
-rw-r--r--README3
-rw-r--r--defines.mk6
-rwxr-xr-xtools/reset_dummy (renamed from tools/dummy_reset)0
-rwxr-xr-xtools/reset_minimus36
-rw-r--r--usb-led/Makefile2
5 files changed, 43 insertions, 4 deletions
diff --git a/README b/README
index 7351be0..0a64b5d 100644
--- a/README
+++ b/README
@@ -51,9 +51,8 @@ build and flash blink example
-----------------------------
# cd blink
-# make
+adapt Makefile (set BOARD_TYPE)
# make program
-# make run
License
diff --git a/defines.mk b/defines.mk
index 824636c..4d4439e 100644
--- a/defines.mk
+++ b/defines.mk
@@ -59,6 +59,8 @@ ifeq ($(BOARD_TYPE),minimus)
F_USB = $(F_CPU)
PROG := DFU
LUFA_BOARD = MINIMUS
+ RESET_FUNC := ../tools/reset_minimus
+ RESET_PARAM = "03eb:2ffa"
endif
ifeq ($(BOARD_TYPE),minimus32)
MCU := atmega32u2
@@ -67,6 +69,8 @@ ifeq ($(BOARD_TYPE),minimus32)
F_USB = $(F_CPU)
PROG := DFU
LUFA_BOARD = MINIMUS
+ RESET_FUNC := ../tools/reset_minimus
+ RESET_PARAM = "03eb:2ff0"
endif
ifeq ($(BOARD_TYPE),hhd70dongle)
MCU := atmega32u4
@@ -127,7 +131,7 @@ ifeq ($(BOARD_TYPE),arduinoNG)
UPLOAD_RATE := 19200
PROG_TYPE := stk500v1
AVRDUDE_PORT := /dev/ttyUSB0
- RESET_FUNC := ../tools/dummy_reset
+ RESET_FUNC := ../tools/reset_dummy
endif
ifeq ($(BOARD_TYPE),AvrNetIo)
MCU := atmega32
diff --git a/tools/dummy_reset b/tools/reset_dummy
index 36db140..36db140 100755
--- a/tools/dummy_reset
+++ b/tools/reset_dummy
diff --git a/tools/reset_minimus b/tools/reset_minimus
new file mode 100755
index 0000000..38ba7b8
--- /dev/null
+++ b/tools/reset_minimus
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ IDS="03eb:2ff0 03eb:2ffa"
+else
+ IDS=$1
+fi
+
+WAIT_MAX=15
+
+FOUND=0
+echo -n "Please press and hold 'H' button and reset the device using the 'R' button "
+i=$WAIT_MAX
+while (test $i -gt 0); do
+ echo -n "."
+ for id in $IDS; do
+ lsusb -d $id > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ FOUND=1
+ break;
+ fi
+ done
+ if [ $FOUND -eq 1 ]; then
+ break;
+ fi
+ sleep 1
+ i=$(($i-1))
+done
+
+if [ $FOUND -eq 1 ]; then
+ echo " device found!"
+else
+ echo " timout - trying anyway"
+fi
+
+exit 0
diff --git a/usb-led/Makefile b/usb-led/Makefile
index 8e23877..d73cb3e 100644
--- a/usb-led/Makefile
+++ b/usb-led/Makefile
@@ -21,7 +21,7 @@
##
NAME := usb-led
-BOARD_TYPE := minimus
+BOARD_TYPE := minimus32
OBJ := $(NAME).o
LIBS := util led lufa-descriptor-usbserial
EXTERNAL_LIBS := lufa