main
Last change
on this file since 3587f7f was 3587f7f, checked in by Adrien Destugues <pulkomandy@…>, 12 years ago |
Add first version of herePic, an AVR based PIc programmer using ICSP protocol.
Untested, no host software written yet.
git-svn-id: svn://pulkomandy.tk/avrstuff@64 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe
|
-
Property mode
set to
100644
|
File size:
544 bytes
|
Line | |
---|
1 | #Set vars
|
---|
2 | COMPILE = avr-gcc -Wall -Os -Iusbdrv -I. -std=c99 -mmcu=atmega8 -DF_CPU=16000000
|
---|
3 | PROGNAME = herepic
|
---|
4 |
|
---|
5 | #Rules
|
---|
6 | $(PROGNAME).hex: $(PROGNAME).bin
|
---|
7 | avr-objcopy -j .text -j .data -O ihex $^ $@
|
---|
8 |
|
---|
9 | $(PROGNAME).bin: main.o usbdrv/usbdrv.o usbdrv/usbdrvasm.o
|
---|
10 | $(COMPILE) $^ -o $@
|
---|
11 |
|
---|
12 | main.o: main.c
|
---|
13 | $(COMPILE) -c $^ -mmcu=atmega8 -Os -o $@ -mmcu=atmega8 -Os -I../../libs/ -I.
|
---|
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 atmega8 -Uflash:w:$(PROGNAME).hex
|
---|
Note:
See
TracBrowser
for help on using the repository browser.