main
Last change
on this file since ea32107 was ea32107, checked in by Adrien Destugues <pulkomandy@…>, 10 years ago |
kbd: working XTK on ATtiny2313
- Move more stuff to common.mk and handle multicpu support
- Fix some pins mixups to get things working
git-svn-id: svn://pulkomandy.tk/avrstuff@113 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe
|
-
Property mode
set to
100644
|
File size:
612 bytes
|
Line | |
---|
1 | # Executables (with Haiku hybrids support)
|
---|
2 | CC := $(shell { which avr-gcc || which avr-gcc-x86; } 2>/dev/null)
|
---|
3 | OBJCOPY := $(shell { which avr-objcopy || which avr-objcopy-x86; } 2>/dev/null)
|
---|
4 | AVRDUDE := $(shell { which avrdude || which avrdude-x86; } 2>/dev/null)
|
---|
5 |
|
---|
6 | # Some useful paths (relative to each project)
|
---|
7 | LIBS=../../../libs
|
---|
8 |
|
---|
9 | CFLAGS=-DF_CPU=$(F_CPU) -DBAUD=$(BAUD) -mmcu=$(MCU) -Os
|
---|
10 |
|
---|
11 | # default target
|
---|
12 | all: $(MCU).hex
|
---|
13 |
|
---|
14 | # Generic rules
|
---|
15 | %.hex: %.bin
|
---|
16 | $(OBJCOPY) -j .text -j .data -O ihex $^ $@
|
---|
17 |
|
---|
18 | $(MCU):
|
---|
19 | mkdir -p $(MCU)
|
---|
20 |
|
---|
21 | flash: $(MCU).hex
|
---|
22 | $(AVRDUDE) -c usbasp -p $(MCU) -Uflash:w:$^
|
---|
23 |
|
---|
24 | clean:
|
---|
25 | rm *.bin *.o *.hex
|
---|
Note:
See
TracBrowser
for help on using the repository browser.