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