Permalink
Browse files

intermediate commit: firmware für außen

  • Loading branch information...
1 parent b25aab3 commit 8a8f4dc9a1d64d30a30c4baa12f3cd235d14f5fd @stapelberg stapelberg committed Feb 19, 2011
Showing with 1,151 additions and 0 deletions.
  1. +36 −0 aussen-neu/Makefile
  2. +609 −0 aussen-neu/lcd.c
  3. +265 −0 aussen-neu/lcd.h
  4. +241 −0 aussen-neu/main.c
View
@@ -0,0 +1,36 @@
+CC = avr-gcc
+
+MCU := atmega644p
+MHZ := 16000000UL
+ADDRESS := 1
+
+# CFLAGS for ATmega
+CFLAGS += -Wall
+CFLAGS += -std=c99
+CFLAGS += -DF_CPU=${MHZ}
+CFLAGS += -DMCU=${MCU}
+CFLAGS += -mmcu=${MCU}
+CFLAGS += -Os
+
+CFLAGS += -I../lib
+CFLAGS += -DMYADDRESS=${ADDRESS}
+
+#.SILENT:
+
+.PHONY: clean
+
+all: firmware.hex
+
+firmware.hex: main.o lcd.o
+ $(CC) -mmcu=atmega644p -o $(shell basename $@ .hex).bin $^
+ avr-objcopy -O ihex -R .eeprom $(shell basename $@ .hex).bin $@
+ avr-size --mcu=${MCU} -C $(shell basename $@ .hex).bin
+
+clean:
+ rm -f *.o
+
+program:
+ sudo avrdude -c usbasp -p atmega644p -P usb -U flash:w:firmware.hex:i
+
+fuses:
+ sudo avrdude -c usbasp -p atmega644p -P usb -U lfuse:w:0x9f:m -U hfuse:w:0xd9:m
Oops, something went wrong.

0 comments on commit 8a8f4dc

Please sign in to comment.