Ponyprog nütze ich sehr gern, ist ein guter Programmer.
Kompilieren kannst du es mit einem simplen Makefile, musst es nur anpassen:
Code:
MCU=atmega16
CC=avr-gcc
OBJCOPY=avr-objcopy
# optimize for size:
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues
#-------------------
all: binuhr.hex
#-------------------
binuhr.hex : binuhr.out
$(OBJCOPY) -R .eeprom -O ihex binuhr.out binuhr.hex
binuhr.out : binuhr.o
$(CC) $(CFLAGS) -o binuhr.out -Wl,-Map,binuhr.map binuhr.o
binuhr.o : binuhr.c
$(CC) $(CFLAGS) -Os -c binuhr.c
# you need to erase first before loading the program.
# load (program) the software into the eeprom:
#load: avrledtest.hex
# uisp -dlpt=/dev/parport0 --erase -dprog=dapa
# uisp -dlpt=/dev/parport0 --upload if=avrledtest.hex -dprog=dapa -v=3 --hash=32
# here is a pre-compiled version in case you have trouble with
# your development environment
#load_pre: avrledtest_pre.hex
# uisp -dlpt=/dev/parport0 --erase -dprog=dapa
# uisp -dlpt=/dev/parport0 --upload if=avrledtest_pre.hex -dprog=dapa -dno-poll -v=3 --hash=32
#-------------------
clean:
rm -f *.o *.map *.out
#-------------------
Lesezeichen