main
Last change
on this file since 0853bac was 98713b5, checked in by Adrien Destugues <pulkomandy@…>, 14 years ago |
Copy of blinkled as a baseproject for attiny2313 tests for microserial.
git-svn-id: svn://pulkomandy.tk/avrstuff@30 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe
|
-
Property mode
set to
100644
|
File size:
493 bytes
|
Line | |
---|
1 | #Set vars
|
---|
2 | MCU=attiny2313
|
---|
3 | COMPILE = avr-gcc -Wall -Os -std=c99 -mmcu=$(MCU) -DF_CPU=20000000
|
---|
4 |
|
---|
5 | #Rules
|
---|
6 | blinkdel.hex: blinkdel.bin
|
---|
7 | avr-objcopy -j .text -j .data -O ihex blinkdel.bin blinkdel.hex
|
---|
8 |
|
---|
9 | blinkdel.bin: main.o
|
---|
10 | $(COMPILE) main.o -o blinkdel.bin
|
---|
11 |
|
---|
12 | main.o: main.c
|
---|
13 | $(COMPILE) -c main.c -o main.o
|
---|
14 |
|
---|
15 | #Generic rules
|
---|
16 | .S.o:
|
---|
17 | $(COMPILE) -x assembler-with-cpp -c $< -o $@
|
---|
18 |
|
---|
19 | .c.o:
|
---|
20 | $(COMPILE) -std=c99 -c $< -o $@
|
---|
21 |
|
---|
22 | flash:
|
---|
23 | avrdude -c usbasp -p $(MCU) -Uflash:w:blinkdel.hex
|
---|
24 |
|
---|
25 | clean:
|
---|
26 | rm *.bin *.o *.hex
|
---|
Note:
See
TracBrowser
for help on using the repository browser.