# Project: u-wire (Control WS2812 LED over USB with ATtiny10 and modified V-USB)
# Author: Jenna Fox; portions by Christian Starkjohann, Louis Beaudoin
###############################################################################
# Configure the following variables according to your AVR.
# Program the device with
# make fuse # to set the clock generator, boot section size etc.
# make flash # to load firmware
F_CPU = 12000000
DEVICE = attiny10
#I have versions 492 and 530
PATH := c:\programme\WinAVR\gcc530\bin;$(PATH)
PGM = avrpp -6
# Tools:
CC = avr-gcc
# Options:
DEFINES =
CFLAGS = -g2 -nostartfiles -I. -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) $(DEFINES)
CFLAGS+= -Os -ffunction-sections -fdata-sections -fpack-struct -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-functions
CFLAGS+= -Wall -Wno-pointer-to-int-cast
LDFLAGS = -Wl,--relax,--section-start=.text=0
OBJECTS = crt1.o usbdrv/usbdrvasm.o main.o osccalASM.o
# symbolic targets:
all: u-wire.elf
.c.o:
.S.o:
@$(CC) $(CFLAGS) -c $< -o $@
flash: all
$(PGM) u-wire.elf
clean:
rm -f u-wire.elf *.o usbdrv/*.o
# file targets:
u-wire.elf: $(OBJECTS)
@$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
@avr-size $@
u-wire.hex: u-wire.elf
@rm -f $@
@avr-objcopy -j .text -j .data -O ihex $< $@
u-wire.lst: u-wire.elf
avr-objdump -d -S $< >$@
Detected encoding: ASCII (7 bit) | 2
|