aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSelene ToyKeeper2015-04-19 23:20:03 -0600
committerSelene ToyKeeper2015-04-19 23:20:03 -0600
commit24d9f9efc8bb4963e7e48266d80fd3ca9b1b0a86 (patch)
treee2c3e70a5f21faacfade348a1891fade11c147cf /bin
parentAdded nicer avr-size output during builds. (diff)
downloadanduril-24d9f9efc8bb4963e7e48266d80fd3ca9b1b0a86.tar.gz
anduril-24d9f9efc8bb4963e7e48266d80fd3ca9b1b0a86.tar.bz2
anduril-24d9f9efc8bb4963e7e48266d80fd3ca9b1b0a86.zip
Added "-c -std=gnu99" to build script, made some small 'inline' changes to sources, and made output even smaller.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/build.sh b/bin/build.sh
index 3a3ff96..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 -C --mcu=attiny13 $PROGRAM.elf | grep Full