Inital commit

This commit is contained in:
2020-12-06 20:26:32 +13:00
parent 05fa85c78d
commit 2281caedfc
6 changed files with 136 additions and 1 deletions

21
makefile Normal file
View File

@@ -0,0 +1,21 @@
MCU=atmega32
F_CPU=8000000
PROG=dragon_jtag
CC=avr-g++
OBJCOPY=avr-objcopy
CFLAGS=-Wall -g -mmcu=${MCU} -DF_CPU=${F_CPU} -I.
TARGET=main
SRCS=*.cpp
default: build flash
build:
${CC} ${CFLAGS} -o bin/${TARGET}.bin ${SRCS}
#${CC} ${CFLAGS} -o bin/${TARGET}.elf ${SRCS}
${OBJCOPY} -j .text -j .data -O ihex bin/${TARGET}.bin bin/${TARGET}.hex
flash:
avrdude -p ${MCU} -c ${PROG} -U flash:w:bin/main.hex
clean:
rm -f bin/*