aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2015-05-28 18:17:18 -0600
committerSelene ToyKeeper2015-05-28 18:17:18 -0600
commit2e3548d8732c820882bbadec531e8ac52afa0db2 (patch)
treee2c3e70a5f21faacfade348a1891fade11c147cf
parentAdded dual PWM support to level_calc.py, and made it work better when run via... (diff)
parentAdded "-c -std=gnu99" to build script, made some small 'inline' changes to so... (diff)
downloadanduril-2e3548d8732c820882bbadec531e8ac52afa0db2.tar.gz
anduril-2e3548d8732c820882bbadec531e8ac52afa0db2.tar.bz2
anduril-2e3548d8732c820882bbadec531e8ac52afa0db2.zip
merged trunk
-rwxr-xr-xbin/build.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/build.sh b/bin/build.sh
index 1c27212..f347a29 100755
--- a/bin/build.sh
+++ b/bin/build.sh
@@ -7,7 +7,8 @@ export PROGRAM=$1
export MCU=attiny13
export CC=avr-gcc
export OBJCOPY=avr-objcopy
-export CFLAGS="-Wall -g -Os -mmcu=$MCU"
+export CFLAGS="-Wall -g -Os -mmcu=$MCU -c -std=gnu99"
+export OFLAGS="-Wall -g -Os -mmcu=$MCU"
export LDFLAGS=
export OBJCOPYFLAGS='--set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex'
export OBJS=$PROGRAM.o
@@ -19,6 +20,6 @@ function run () {
}
run $CC $CFLAGS -o $PROGRAM.o -c $PROGRAM.c
-run $CC $CFLAGS $LDFLAGS -o $PROGRAM.elf $PROGRAM.o
+run $CC $OFLAGS $LDFLAGS -o $PROGRAM.elf $PROGRAM.o
run $OBJCOPY $OBJCOPYFLAGS $PROGRAM.elf $PROGRAM.hex
-run avr-size $PROGRAM.hex
+run avr-size -C --mcu=attiny13 $PROGRAM.elf | grep Full
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.