CXX=avr-gcc CXXFLAGS=-std=gnu99 -Os -mmcu=atmega644 -DF_CPU=10000000ul LDFLAGS= LDLIBS= SOURCE= main.c COM=/dev/ttyUSB0 #mit "lsusb" und "sudo dmesg | grep tty" herausfinden PLATFORM=atmega644 BOARD=stk500 all: clean build push clean: rm -f *.elf rm -f *.hex build: $(CXX) $(CXXFLAGS) main.c -o main.elf avr-objcopy -O ihex -j .text -j .data main.elf main.hex push: sudo avrdude -p $(PLATFORM) -c $(BOARD) -P $(COM) -U flash:w:main.hex