# makefile, written by guido socher # example how to integrate the lprintf_flt library Target=atmega32 MCU=atmega32 F_CPU=14745600 CC=avr-gcc OBJCOPY=avr-objcopy LINKER=avr-ld # optimize for size: CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues #------------------- all: base.hex #------------------- base.hex : base.out $(OBJCOPY) -R .eeprom -O ihex base.out base.hex base.out : base.o $(CC) $(CFLAGS) -o base.out -Wl,-Map,base.map,-L/opt/cdk4avr/avr/lib/avr5,-u,vfprintf base.o -lprintf_flt -lm base.o : base.c $(CC) $(CFLAGS) -Os -c base.c # you need to erase first before loading the program. # load (program) the software into the eeprom: load: base.hex uisp -dlpt=/dev/parport0 --erase -dprog=dapa uisp -dlpt=/dev/parport0 --upload if=base.hex -dprog=dapa -v=3 --hash=32 #------------------- clean: rm -f *.o *.map *.out #-------------------