]> git.zerfleddert.de Git - rsbs2/blob - bmc/Makefile
decode packets
[rsbs2] / bmc / Makefile
1 PROG=dragon_jtag
2 PORT=usb
3 PMCU=m16
4 GCCMCU=atmega16
5
6 CPUFLAG=-mmcu=$(GCCMCU)
7 CC=avr-gcc
8 CFLAGS=$(CPUFLAG) -DF_CPU=8000000UL -Wall -g
9 LDFLAGS=$(CPUFLAG)
10 OBJCOPY=avr-objcopy
11
12 all: bmc.bin
13
14 bmc: bmc.o usart.o i2c.o
15
16 bmc.bin: bmc
17 $(OBJCOPY) -j .text -j .data -O binary $^ $@
18
19 flash: bmc.bin
20 avrdude -v -c $(PROG) -P $(PORT) -p $(PMCU) -U flash:w:$^
21
22 debug: bmc bmc.bin
23 setsid avarice -g -D :4242
24 -avr-gdb -ex 'target remote localhost:4242' bmc
25
26 clean:
27 -rm -f *.o bmc bmc.bin
28
29 .PHONY: all clean flash debug
Impressum, Datenschutz