From 121eff2882f448cc88705af66f5cbaa08972bfac Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 5 Aug 2019 01:41:02 -0600 Subject: replaced deprecated avr-size with avr-objdump in build.sh --- bin/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/build.sh') diff --git a/bin/build.sh b/bin/build.sh index ddd2a72..192fa30 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -33,4 +33,6 @@ function run () { run $CC $OTHERFLAGS $CFLAGS -o $PROGRAM.o -c $PROGRAM.c run $CC $OFLAGS $LDFLAGS -o $PROGRAM.elf $PROGRAM.o run $OBJCOPY $OBJCOPYFLAGS $PROGRAM.elf $PROGRAM.hex -run avr-size -C --mcu=$MCU $PROGRAM.elf | grep Full +# deprecated +#run avr-size -C --mcu=$MCU $PROGRAM.elf | grep Full +run avr-objdump -Pmem-usage $PROGRAM.elf | grep Full -- cgit v1.2.3 From 87f5095f52e8e9ccb30ee4ff4beda75ef5b11baa Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Wed, 18 Sep 2019 16:17:27 -0600 Subject: added a compile flag to fix compatibility with GCC 7/8/9's new semantics for "inline" (should fix builds on newer compilers, I think) --- bin/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/build.sh') diff --git a/bin/build.sh b/bin/build.sh index 192fa30..fbb24ea 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -14,9 +14,9 @@ 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 -DATTINY=$ATTINY -I.. -I../.. -I../../.. -fshort-enums" +export CFLAGS="-Wall -g -Os -mmcu=$MCU -c -std=gnu99 -fgnu89-inline -DATTINY=$ATTINY -I.. -I../.. -I../../.. -fshort-enums" export OFLAGS="-Wall -g -Os -mmcu=$MCU" -export LDFLAGS= +export LDFLAGS="-fgnu89-inline" export OBJCOPYFLAGS='--set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex' export OBJS=$PROGRAM.o -- cgit v1.2.3