initial commit, compiles for ATTINY84 with TX on PA5 and RX on PA6

This commit is contained in:
juraj
2020-02-21 20:48:19 +01:00
commit 95ccf534a4
7 changed files with 400 additions and 0 deletions

22
Makefile Normal file
View File

@@ -0,0 +1,22 @@
MCU=attiny84
CC=avr-gcc
LD=avr-ld
OBJCOPY=avr-objcopy
SIZE=avr-size
AVRDUDE=avrdude
CFLAGS=-Wall -g -Os -mmcu=${MCU} -I. -I..
TARGET=main
SRCS=main.c suart.c
all:
${CC} ${CFLAGS} -o ${TARGET}.o ${SRCS}
${LD} -o ${TARGET}.elf ${TARGET}.o
${OBJCOPY} -j .text -j .data -O ihex ${TARGET}.o ${TARGET}.hex
${SIZE} -C --mcu=${MCU} ${TARGET}.elf
flash:
${AVRDUDE} -p ${MCU} -c usbasp -U flash:w:${TARGET}.hex:i -F -P usb
clean:
rm -f *.c~ *.o *.elf *.hex