]> git.zerfleddert.de Git - rsbs2/blame_incremental - bmc/Makefile
just a bit documentation...
[rsbs2] / bmc / Makefile
... / ...
CommitLineData
1#PROG=-c dragon_jtag -P usb
2PMCU=m16
3GCCMCU=atmega16
4#Fuses for 1MHz:
5#avrdude -v -p m16 -U lfuse:w:0xa1:m -U hfuse:w:0x19:m
6#Fuses for 8MHz:
7#avrdude -v -p m16 -U lfuse:w:0xa4:m -U hfuse:w:0x19:m
8
9CPUFLAG=-mmcu=$(GCCMCU)
10CC=avr-gcc
11CFLAGS=$(CPUFLAG) -DF_CPU=1000000UL -Wall -g
12LDFLAGS=$(CPUFLAG)
13OBJCOPY=avr-objcopy
14
15all: bmc.bin
16
17bmc: bmc.o usart.o i2c.o ipmb.o chassis.o
18
19bmc.bin: bmc
20 $(OBJCOPY) -j .text -j .data -O binary $^ $@
21
22flash: bmc.bin
23 avrdude -v $(PROG) -p $(PMCU) -U flash:w:$^
24
25debug: bmc bmc.bin
26 setsid avarice -g -D :4242
27 -avr-gdb -ex 'target remote localhost:4242' bmc
28
29clean:
30 -rm -f *.o bmc bmc.bin
31
32.PHONY: all clean flash debug
Impressum, Datenschutz