Subversion Repositories group.electronics

Rev

Rev 87 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87 Rev 89
Line 5... Line 5...
5
# Tabsize: 4
5
# Tabsize: 4
6
# Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
6
# Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
7
# License: GPLv2.
7
# License: GPLv2.
8
# This Revision: $Id$
8
# This Revision: $Id$
9
 
9
 
10
DEVICE=atmega168a
10
DEVICE=atmega168
11
F_CPU=20000000
11
F_CPU=20000000
12
HID_SIZE=44
12
HID_SIZE=44
13
 
13
 
14
AVRDUDE = avrdude -c avrispmkii -P usb -p $(DEVICE)
14
AVRDUDE = avrdude -c avrispmkii -P usb -p $(DEVICE)
15
# The two lines above are for "avrdude" and the STK500 programmer connected
15
# The two lines above are for "avrdude" and the STK500 programmer connected
Line 52... Line 52...
52
readcal:
52
readcal:
53
	$(AVRDUDE) -U calibration:r:/dev/stdout:i | head -1
53
	$(AVRDUDE) -U calibration:r:/dev/stdout:i | head -1
54
 
54
 
55
 
55
 
56
clean:
56
clean:
57
	rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.bin *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s
57
	rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.bin *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s usbtest
58
 
58
 
59
# file targets:
59
# file targets:
60
main.bin:	$(OBJECTS)
60
main.bin:	$(OBJECTS)
61
	$(COMPILE) -o main.bin $(OBJECTS)
61
	$(COMPILE) -o main.bin $(OBJECTS)
62
 
62
 
Line 70... Line 70...
70
disasm:	main.bin
70
disasm:	main.bin
71
	avr-objdump -d main.bin
71
	avr-objdump -d main.bin
72
 
72
 
73
cpp:
73
cpp:
74
	$(COMPILE) -E main.c
74
	$(COMPILE) -E main.c
-
 
75
 
-
 
76
# Command-line client
-
 
77
CMDLINE = usbtest
-
 
78
 
-
 
79
# One-liner to compile the command-line client from usbtest.c
-
 
80
$(CMDLINE): usbtest.c
-
 
81
	gcc -I ./libusb/include -L ./libusb/lib/gcc -O -Wall usbtest.c -o usbtest -lusb