From 481ba09b19630d2742fdc34a81484524838439f3 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Fri, 22 Nov 2019 15:55:51 -0700 Subject: added -fwhole-program gcc flag, suggested by Agro. Signficantly reduces ROM size! :) --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index fbb24ea..3992c38 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -14,7 +14,7 @@ export PROGRAM=$1 ; shift export MCU=attiny$ATTINY export CC=avr-gcc export OBJCOPY=avr-objcopy -export CFLAGS="-Wall -g -Os -mmcu=$MCU -c -std=gnu99 -fgnu89-inline -DATTINY=$ATTINY -I.. -I../.. -I../../.. -fshort-enums" +export CFLAGS="-Wall -g -Os -mmcu=$MCU -c -std=gnu99 -fgnu89-inline -fwhole-program -DATTINY=$ATTINY -I.. -I../.. -I../../.. -fshort-enums" export OFLAGS="-Wall -g -Os -mmcu=$MCU" export LDFLAGS="-fgnu89-inline" export OBJCOPYFLAGS='--set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex' -- cgit v1.2.3