main
Last change
on this file since 7d84448 was 6f22754, checked in by Adrien Destugues <pulkomandy@…>, 5 years ago |
blinkled: cleanup a bit
I get bored of editing too much things in there after a while...
|
-
Property mode
set to
100644
|
File size:
651 bytes
|
Line | |
---|
1 | # User configurable variables
|
---|
2 | MCU=atmega8
|
---|
3 | FCPU=16000000
|
---|
4 | PROG=stk500 -P /dev/ports/usb0
|
---|
5 |
|
---|
6 | # You should not need to change anything below
|
---|
7 | # -----------------------------------------------------------------------------
|
---|
8 | COMPILE = avr-gcc -Wall -Wextra -Werror -Os -std=c99 -mmcu=$(MCU) -DF_CPU=$(FCPU)
|
---|
9 |
|
---|
10 | #Rules
|
---|
11 | $(MCU).hex: blinkdel.bin
|
---|
12 | avr-objcopy -j .text -j .data -O ihex $^ $@
|
---|
13 |
|
---|
14 | blinkdel.bin: main.o
|
---|
15 | $(COMPILE) main.o -o blinkdel.bin
|
---|
16 |
|
---|
17 | #Generic rules
|
---|
18 | .S.o:
|
---|
19 | $(COMPILE) -x assembler-with-cpp -c $< -o $@
|
---|
20 |
|
---|
21 | .c.o:
|
---|
22 | $(COMPILE) -mmcu=$(MCU) -std=c99 -c $< -o $@
|
---|
23 |
|
---|
24 | flash: $(MCU).hex
|
---|
25 | avrdude -c $(PROG) -p $(MCU) -Uflash:w:$(MCU).hex
|
---|
26 |
|
---|
27 | clean:
|
---|
28 | rm *.bin *.o *.hex
|
---|
Note:
See
TracBrowser
for help on using the repository browser.