]> git.zerfleddert.de Git - rsbs2/blame_incremental - bmc/Makefile
decrease CPU frequency from 8 to 1MHz
[rsbs2] / bmc / Makefile
... / ...
CommitLineData
1PROG=dragon_jtag
2PORT=usb
3PMCU=m16
4GCCMCU=atmega16
5#Fuses for 1MHz:
6#avrdude -v -p m16 -U lfuse:w:0xa1:m -U hfuse:w:0x19:m
7
8CPUFLAG=-mmcu=$(GCCMCU)
9CC=avr-gcc
10CFLAGS=$(CPUFLAG) -DF_CPU=1000000UL -Wall -g
11LDFLAGS=$(CPUFLAG)
12OBJCOPY=avr-objcopy
13
14all: bmc.bin
15
16bmc: bmc.o usart.o i2c.o ipmb.o chassis.o
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
27
28clean:
29 -rm -f *.o bmc bmc.bin
30
31.PHONY: all clean flash debug
Impressum, Datenschutz