Subversion Repositories group.electronics

Rev

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

Rev 134 Rev 136
Line 1... Line 1...
1
 
1
 
2
DEVICE=attiny85
2
DEVICE=attiny85
3
F_CPU=16500000
3
F_CPU=16500000
-
 
4
 
-
 
5
 
4
HFUSE=0xdd
6
HFUSE=0xdd
5
LFUSE=0xe1
7
LFUSE=0xe1
6
 
8
 
7
HDUSE=0xdf	# Default fuses for device
9
HDUSE=0xdf	# Default fuses for device
8
LDUSE=0x62
10
LDUSE=0x62
9
 
11
 
10
PROGTYPE=avrispmkii
12
PROGTYPE=avrispmkii
11
PROGPORT=usb
13
PROGPORT=usb
12
 
14
 
13
INCLUDES=-I. -I./lib/
15
INCLUDES=-I. -I./lib/ -I./usbdrv/
14
VALUES=-DF_CPU=$(F_CPU)
16
VALUES=-DF_CPU=$(F_CPU)
15
AVRDUDE = avrdude -c $(PROGTYPE) -P $(PROGPORT) -p $(DEVICE)
17
AVRDUDE = avrdude -c $(PROGTYPE) -P $(PROGPORT) -p $(DEVICE)
16
#COMPILE = avr-gcc  -Wall -Os -DDEBUG_LEVEL=0  -mmcu=$(DEVICE) $(INCLUDES) $(VALUES)
18
#COMPILE = avr-gcc  -Wall -Os -DDEBUG_LEVEL=0  -mmcu=$(DEVICE) $(INCLUDES) $(VALUES)
17
 
19
 
18
# Use this one to rip out unused functions
20
# Use this one to rip out unused functions
19
COMPILE = avr-gcc -mtiny-stack  -Wall -Wl,-gc-section -fdata-sections -ffunction-sections -Os -DDEBUG_LEVEL=0  -mmcu=$(DEVICE) $(INCLUDES) $(VALUES)
21
COMPILE = avr-gcc -mtiny-stack  -Wall -Wl,-gc-section -fdata-sections -ffunction-sections -Os -DDEBUG_LEVEL=0  -mmcu=$(DEVICE) $(INCLUDES) $(VALUES)
20
 
22
 
21
OBJECTS = main.o
23
OBJECTS = main.o
22
OBJECTS += lib/avrutil.o 
24
OBJECTS += lib/avrutil.o
23
 
-
 
24
#OBJECTS += lib/hc595.o
-
 
25
#OBJECTS += lib/usiTwiSlave.o
-
 
26
#OBJECTS += lib/twires.o
-
 
27
#OBJECTS += lib/uart.o 
-
 
28
#OBJECTS += lib/twi.o 
-
 
29
#OBJECTS += lib/wire.o 
-
 
30
#OBJECTS += lib/lcd.o 
-
 
31
#OBJECTS += lib/e2p.o 
25
OBJECTS += lib/i2cbb.o 
32
#OBJECTS += lib/mio.o 
-
 
33
#OBJECTS += lib/oled.o 
26
OBJECTS += usbdrv/usbdrv.o
34
#OBJECTS += lib/gfx.o
-
 
35
#OBJECTS += lib/dht.o 
-
 
36
 
-
 
37
#OBJECTS += lib/lmd.o 
27
OBJECTS += usbdrv/usbdrvasm.o
38
 
28
 
39
# Compiling:
29
# Compiling:
40
all:	main.hex
30
all:	main.hex
41
 
31
 
42
.c.o:
32
.c.o:
Line 77... Line 67...
77
 
67
 
78
readcal:
68
readcal:
79
	sudo $(AVRDUDE) -U calibration:r:/dev/stdout:i | head -1
69
	sudo $(AVRDUDE) -U calibration:r:/dev/stdout:i | head -1
80
	
70
	
81
readfuse:
71
readfuse:
82
	sudo $(AVRDUDE) -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h -U lock:r:-:h
72
	sudo $(AVRDUDE) -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h
-
 
73
	
-
 
74
$(CMDLINE): usbtest.c
-
 
75
	gcc -I ./libusb/include -L ./libusb/lib/gcc -O -Wall usbtest.c -o usbtest -lusb