]> git.zerfleddert.de Git - rsbs2/blob - bmc/Makefile
whitespace cleanup; URL to buster oracle jre
[rsbs2] / bmc / Makefile
1 #PROG=-c dragon_jtag -P usb
2 PMCU=m16
3 GCCMCU=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
9 CPUFLAG=-mmcu=$(GCCMCU)
10 CC=avr-gcc
11 CFLAGS=$(CPUFLAG) -DF_CPU=1000000UL -Wall -g
12 LDFLAGS=$(CPUFLAG)
13 OBJCOPY=avr-objcopy
14
15 all: bmc.bin
16
17 bmc: bmc.o usart.o i2c.o ipmb.o chassis.o
18
19 bmc.bin: bmc
20 $(OBJCOPY) -j .text -j .data -O binary $^ $@
21
22 flash: bmc.bin
23 avrdude -v $(PROG) -p $(PMCU) -U flash:w:$^
24
25 debug: bmc bmc.bin
26 setsid avarice -g -D :4242
27 -avr-gdb -ex 'target remote localhost:4242' bmc
28
29 clean:
30 -rm -f *.o bmc bmc.bin
31
32 .PHONY: all clean flash debug
Impressum, Datenschutz