]>
Commit | Line | Data |
---|---|---|
d7bda89e MG |
1 | CC=avr-gcc |
2 | CFLAGS=-mmcu=atmega16 -g | |
3 | OBJCOPY=avr-objcopy | |
4 | PROG=dragon_jtag | |
5 | PORT=usb | |
6 | PMCU=m16 | |
7 | ||
8 | all: bmc.bin | |
9 | ||
10 | bmc: bmc.o | |
11 | ||
12 | bmc.bin: bmc | |
13 | $(OBJCOPY) -j .text -j .data -O binary $^ $@ | |
14 | ||
15 | flash: bmc.bin | |
16 | avrdude -v -c $(PROG) -P $(PORT) -p $(PMCU) -U flash:w:$^ | |
17 | ||
18 | debug: bmc bmc.bin | |
19 | setsid avarice -g -D :4242 | |
20 | -avr-gdb -ex 'target remote localhost:4242' bmc | |
21 | -pkill avarice | |
22 | ||
23 | clean: | |
24 | -rm -f *.o bmc bmc.bin | |
25 | ||
26 | .PHONY: all clean flash debug |