X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/blobdiff_plain/d6f38d0dfc4f602a6c790fd470deb2b2fd23da77..0b58b0e0db185986906cb8a71964f06bfa995b4a:/bmc/Makefile diff --git a/bmc/Makefile b/bmc/Makefile index 7915e96..b970878 100644 --- a/bmc/Makefile +++ b/bmc/Makefile @@ -1,19 +1,26 @@ +#PROG=-c dragon_jtag -P usb +PMCU=m16 +GCCMCU=atmega16 +#Fuses for 1MHz: +#avrdude -v -p m16 -U lfuse:w:0xa1:m -U hfuse:w:0x19:m +#Fuses for 8MHz: +#avrdude -v -p m16 -U lfuse:w:0xa4:m -U hfuse:w:0x19:m + +CPUFLAG=-mmcu=$(GCCMCU) CC=avr-gcc -CFLAGS=-mmcu=atmega16 -DF_CPU=8000000UL -Wall -g +CFLAGS=$(CPUFLAG) -DF_CPU=1000000UL -Wall -g +LDFLAGS=$(CPUFLAG) OBJCOPY=avr-objcopy -PROG=dragon_jtag -PORT=usb -PMCU=m16 all: bmc.bin -bmc: bmc.o usart.o +bmc: bmc.o usart.o i2c.o ipmb.o chassis.o bmc.bin: bmc $(OBJCOPY) -j .text -j .data -O binary $^ $@ flash: bmc.bin - avrdude -v -c $(PROG) -P $(PORT) -p $(PMCU) -U flash:w:$^ + avrdude -v $(PROG) -p $(PMCU) -U flash:w:$^ debug: bmc bmc.bin setsid avarice -g -D :4242