source: avrstuff/kbd/common.mk@ 6390cc3

main
Last change on this file since 6390cc3 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
Line 
1# Executables (with Haiku hybrids support)
2CC := $(shell { which avr-gcc || which avr-gcc-x86; } 2>/dev/null)
3OBJCOPY := $(shell { which avr-objcopy || which avr-objcopy-x86; } 2>/dev/null)
4AVRDUDE := $(shell { which avrdude || which avrdude-x86; } 2>/dev/null)
5
6# Some useful paths (relative to each project)
7LIBS=../../../libs
8
9CFLAGS=-DF_CPU=$(F_CPU) -DBAUD=$(BAUD) -mmcu=$(MCU) -Os
10
11# default target
12all: $(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
21flash: $(MCU).hex
22 $(AVRDUDE) -c stk500 -P /dev/ports/usb0 -p $(MCU) -Uflash:w:$^
23
24clean:
25 rm *.bin *.o *.hex
Note: See TracBrowser for help on using the repository browser.