initial commit
This commit is contained in:
20
Makefile
Normal file
20
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user