initial commit

This commit is contained in:
2021-10-18 13:30:23 +02:00
commit 2b4d907200
3 changed files with 133 additions and 0 deletions

20
Makefile Normal file
View File

@@ -0,0 +1,20 @@
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