source:
avrstuff/blinkled/Makefile@
38a6d09
Last change on this file since 38a6d09 was 4fbae10, checked in by , 10 years ago | |
---|---|
|
|
File size: 447 bytes |
Rev | Line | |
---|---|---|
[26d7f34] | 1 | #Set vars |
[4fbae10] | 2 | MCU=atmega48p |
3 | FCPU=16000000 | |
[df91872] | 4 | COMPILE = avr-gcc -Wall -Os -std=c99 -mmcu=$(MCU) -DF_CPU=20000000 |
[26d7f34] | 5 | |
6 | #Rules | |
[4fbae10] | 7 | $(MCU).hex: blinkdel.bin |
8 | avr-objcopy -j .text -j .data -O ihex $^ $@ | |
[26d7f34] | 9 | |
10 | blinkdel.bin: main.o | |
11 | $(COMPILE) main.o -o blinkdel.bin | |
12 | ||
13 | #Generic rules | |
14 | .S.o: | |
15 | $(COMPILE) -x assembler-with-cpp -c $< -o $@ | |
16 | ||
17 | .c.o: | |
[4fbae10] | 18 | $(COMPILE) -mmcu=$(MCU) -std=c99 -c $< -o $@ |
[26d7f34] | 19 | |
20 | flash: | |
[4fbae10] | 21 | avrdude -c usbasp -p $(MCU) -Uflash:w:$(MCU).hex |
[26d7f34] | 22 | |
23 | clean: | |
24 | rm *.bin *.o *.hex |
Note:
See TracBrowser
for help on using the repository browser.