main
Last change
on this file was 6390cc3, checked in by Adrien Destugues <pulkomandy@…>, 7 years ago |
chiptest: Start to hack on ATmega128 and STK500 devboard.
- Set the proper clock for it (generated by the STK500 master MCU, did
not get crystal working reliably yet)
- Instead of just 'H', generate the whole alphabet for more action!
- Use ATmega128 since that's what happens to be seated on my board for
now.
|
-
Property mode
set to
100644
|
File size:
631 bytes
|
Rev | Line | |
---|
[b83dc2a] | 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 |
|
---|
[ea32107] | 9 | CFLAGS=-DF_CPU=$(F_CPU) -DBAUD=$(BAUD) -mmcu=$(MCU) -Os
|
---|
| 10 |
|
---|
| 11 | # default target
|
---|
| 12 | all: $(MCU).hex
|
---|
| 13 |
|
---|
[f51aacc] | 14 | # Generic rules
|
---|
[b83dc2a] | 15 | %.hex: %.bin
|
---|
| 16 | $(OBJCOPY) -j .text -j .data -O ihex $^ $@
|
---|
| 17 |
|
---|
[ea32107] | 18 | $(MCU):
|
---|
| 19 | mkdir -p $(MCU)
|
---|
| 20 |
|
---|
| 21 | flash: $(MCU).hex
|
---|
[6390cc3] | 22 | $(AVRDUDE) -c stk500 -P /dev/ports/usb0 -p $(MCU) -Uflash:w:$^
|
---|
[ea32107] | 23 |
|
---|
[f51aacc] | 24 | clean:
|
---|
| 25 | rm *.bin *.o *.hex
|
---|
Note:
See
TracBrowser
for help on using the repository browser.