initial commit
[LightSticks] / FIRMWARE / make_c
1 #!/bin/bash
2
3 targetProjectFile=lightstick
4
5 # targetAVR=attiny10;
6 # -DF_CPU=12000000UL 
7 export DEFINES="-mmcu=attiny25 -DF_CPU=8000000UL -DBOARD=1 -fno-strict-aliasing"
8
9 # export PATH=$PATH:/usr/local/avr/bin
10
11 rm *.hex *.elf
12
13 # /usr/local/avr/bin/avr-gcc
14
15 avr-gcc $DEFINES -Wall -O1 -std=gnu99 -o $targetProjectFile.o -c $targetProjectFile.c
16 avr-gcc $DEFINES -Wl,-Map=$targetProjectFile.map $targetProjectFile.o  -o $targetProjectFile.elf
17 avr-objcopy -O ihex $targetProjectFile.elf $targetProjectFile.hex
18
19 avr-size $targetProjectFile.hex
20
21 echo "Compilatoin done"
22 exit
Contact me: dev (at) shalnoff (dot) com
PGP fingerprint: A6B8 3B23 6013 F18A 0C71 198B 83D8 C64D 917A 5717