#!/bin/bash targetProjectFile=lightstick # targetAVR=attiny10; # -DF_CPU=12000000UL export DEFINES="-mmcu=attiny25 -DF_CPU=8000000UL -DBOARD=1 -fno-strict-aliasing" # export PATH=$PATH:/usr/local/avr/bin rm *.hex *.elf # /usr/local/avr/bin/avr-gcc avr-gcc $DEFINES -Wall -O1 -std=gnu99 -o $targetProjectFile.o -c $targetProjectFile.c avr-gcc $DEFINES -Wl,-Map=$targetProjectFile.map $targetProjectFile.o -o $targetProjectFile.elf avr-objcopy -O ihex $targetProjectFile.elf $targetProjectFile.hex avr-size $targetProjectFile.hex echo "Compilatoin done" exit