From 9b2f2c42826d96e7b1177448e51f8609fa1197f7 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 19 Apr 2015 19:55:11 -0600 Subject: Added nicer avr-size output during builds. --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/build.sh') diff --git a/bin/build.sh b/bin/build.sh index 1c27212..3a3ff96 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -21,4 +21,4 @@ function run () { run $CC $CFLAGS -o $PROGRAM.o -c $PROGRAM.c run $CC $CFLAGS $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 -- cgit v1.2.3 From 24d9f9efc8bb4963e7e48266d80fd3ca9b1b0a86 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 19 Apr 2015 23:20:03 -0600 Subject: Added "-c -std=gnu99" to build script, made some small 'inline' changes to sources, and made output even smaller. --- bin/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/build.sh') 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 -- cgit v1.2.3