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