From dcc52fdfc95e9b2621b46a18250051234891f563 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 3 Nov 2018 16:00:15 -0600 Subject: Renamed flash/build scripts to better indicate MCU type. --- bin/build-25.sh | 30 ------------------------------ bin/build-85.sh | 30 ------------------------------ bin/build-tiny13.sh | 30 ++++++++++++++++++++++++++++++ bin/build-tiny25.sh | 30 ++++++++++++++++++++++++++++++ bin/build-tiny85.sh | 30 ++++++++++++++++++++++++++++++ bin/build.sh | 30 ------------------------------ bin/flash-25.sh | 4 ---- bin/flash-85.sh | 4 ---- bin/flash-tiny13.bat | 1 + bin/flash-tiny13.sh | 3 +++ bin/flash-tiny25.sh | 4 ++++ bin/flash-tiny85.sh | 4 ++++ bin/flash.sh | 3 --- 13 files changed, 102 insertions(+), 101 deletions(-) delete mode 100755 bin/build-25.sh delete mode 100755 bin/build-85.sh create mode 100755 bin/build-tiny13.sh create mode 100755 bin/build-tiny25.sh create mode 100755 bin/build-tiny85.sh delete mode 100755 bin/build.sh delete mode 100755 bin/flash-25.sh delete mode 100755 bin/flash-85.sh create mode 100755 bin/flash-tiny13.bat create mode 100755 bin/flash-tiny13.sh create mode 100755 bin/flash-tiny25.sh create mode 100755 bin/flash-tiny85.sh delete mode 100755 bin/flash.sh (limited to 'bin') diff --git a/bin/build-25.sh b/bin/build-25.sh deleted file mode 100755 index a775a0f..0000000 --- a/bin/build-25.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Instead of using a Makefile, since most of the firmwares here build in the -# same exact way, here's a script to do the same thing - -export PROGRAM=$1 ; shift -export ATTINY=25 -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 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 - -for arg in "$*" ; do - OTHERFLAGS="$OTHERFLAGS $arg" -done - -function run () { - echo $* - $* - if [ x"$?" != x0 ]; then exit 1 ; fi -} - -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 diff --git a/bin/build-85.sh b/bin/build-85.sh deleted file mode 100755 index f0cf1b9..0000000 --- a/bin/build-85.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Instead of using a Makefile, since most of the firmwares here build in the -# same exact way, here's a script to do the same thing - -export PROGRAM=$1 ; shift -export ATTINY=85 -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 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 - -for arg in "$*" ; do - OTHERFLAGS="$OTHERFLAGS $arg" -done - -function run () { - echo $* - $* - if [ x"$?" != x0 ]; then exit 1 ; fi -} - -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 diff --git a/bin/build-tiny13.sh b/bin/build-tiny13.sh new file mode 100755 index 0000000..c1f0446 --- /dev/null +++ b/bin/build-tiny13.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Instead of using a Makefile, since most of the firmwares here build in the +# same exact way, here's a script to do the same thing + +export PROGRAM=$1 ; shift +export ATTINY=13 +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 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 + +for arg in "$*" ; do + OTHERFLAGS="$OTHERFLAGS $arg" +done + +function run () { + echo $* + $* + if [ x"$?" != x0 ]; then exit 1 ; fi +} + +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 diff --git a/bin/build-tiny25.sh b/bin/build-tiny25.sh new file mode 100755 index 0000000..a775a0f --- /dev/null +++ b/bin/build-tiny25.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Instead of using a Makefile, since most of the firmwares here build in the +# same exact way, here's a script to do the same thing + +export PROGRAM=$1 ; shift +export ATTINY=25 +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 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 + +for arg in "$*" ; do + OTHERFLAGS="$OTHERFLAGS $arg" +done + +function run () { + echo $* + $* + if [ x"$?" != x0 ]; then exit 1 ; fi +} + +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 diff --git a/bin/build-tiny85.sh b/bin/build-tiny85.sh new file mode 100755 index 0000000..f0cf1b9 --- /dev/null +++ b/bin/build-tiny85.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Instead of using a Makefile, since most of the firmwares here build in the +# same exact way, here's a script to do the same thing + +export PROGRAM=$1 ; shift +export ATTINY=85 +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 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 + +for arg in "$*" ; do + OTHERFLAGS="$OTHERFLAGS $arg" +done + +function run () { + echo $* + $* + if [ x"$?" != x0 ]; then exit 1 ; fi +} + +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 diff --git a/bin/build.sh b/bin/build.sh deleted file mode 100755 index c1f0446..0000000 --- a/bin/build.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Instead of using a Makefile, since most of the firmwares here build in the -# same exact way, here's a script to do the same thing - -export PROGRAM=$1 ; shift -export ATTINY=13 -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 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 - -for arg in "$*" ; do - OTHERFLAGS="$OTHERFLAGS $arg" -done - -function run () { - echo $* - $* - if [ x"$?" != x0 ]; then exit 1 ; fi -} - -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 diff --git a/bin/flash-25.sh b/bin/flash-25.sh deleted file mode 100755 index 0b24bb2..0000000 --- a/bin/flash-25.sh +++ /dev/null @@ -1,4 +0,0 @@ -#/bin/sh -FIRMWARE=$1 -avrdude -c usbasp -p t25 -u -U lfuse:w:0xd2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:$FIRMWARE -# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny25&P=ATtiny25&M_LOW_0x3F=0x22&M_HIGH_0x07=0x07&M_HIGH_0x20=0x00&B_SUT1=P&B_SPIEN=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&V_LOW=D2&V_HIGH=DF&V_EXTENDED=FF diff --git a/bin/flash-85.sh b/bin/flash-85.sh deleted file mode 100755 index 8d1636d..0000000 --- a/bin/flash-85.sh +++ /dev/null @@ -1,4 +0,0 @@ -#/bin/sh -FIRMWARE=$1 -avrdude -c usbasp -p t85 -u -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:$FIRMWARE -# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny85&P=ATtiny85&M_LOW_0x3F=0x22&M_HIGH_0x07=0x06&M_HIGH_0x20=0x00&B_SPIEN=P&B_SUT0=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&B_BODLEVEL0=P&V_LOW=E2&V_HIGH=DE&V_EXTENDED=FF diff --git a/bin/flash-tiny13.bat b/bin/flash-tiny13.bat new file mode 100755 index 0000000..5324ab6 --- /dev/null +++ b/bin/flash-tiny13.bat @@ -0,0 +1 @@ +avrdude -p t13 -c usbasp -u -Uflash:w:%1.hex:a -Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m diff --git a/bin/flash-tiny13.sh b/bin/flash-tiny13.sh new file mode 100755 index 0000000..9c2ef82 --- /dev/null +++ b/bin/flash-tiny13.sh @@ -0,0 +1,3 @@ +#/bin/sh +FIRMWARE=$1 +avrdude -c usbasp -p t13 -u -Uflash:w:$FIRMWARE -Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m diff --git a/bin/flash-tiny25.sh b/bin/flash-tiny25.sh new file mode 100755 index 0000000..0b24bb2 --- /dev/null +++ b/bin/flash-tiny25.sh @@ -0,0 +1,4 @@ +#/bin/sh +FIRMWARE=$1 +avrdude -c usbasp -p t25 -u -U lfuse:w:0xd2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:$FIRMWARE +# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny25&P=ATtiny25&M_LOW_0x3F=0x22&M_HIGH_0x07=0x07&M_HIGH_0x20=0x00&B_SUT1=P&B_SPIEN=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&V_LOW=D2&V_HIGH=DF&V_EXTENDED=FF diff --git a/bin/flash-tiny85.sh b/bin/flash-tiny85.sh new file mode 100755 index 0000000..8d1636d --- /dev/null +++ b/bin/flash-tiny85.sh @@ -0,0 +1,4 @@ +#/bin/sh +FIRMWARE=$1 +avrdude -c usbasp -p t85 -u -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:$FIRMWARE +# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny85&P=ATtiny85&M_LOW_0x3F=0x22&M_HIGH_0x07=0x06&M_HIGH_0x20=0x00&B_SPIEN=P&B_SUT0=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&B_BODLEVEL0=P&V_LOW=E2&V_HIGH=DE&V_EXTENDED=FF diff --git a/bin/flash.sh b/bin/flash.sh deleted file mode 100755 index 9c2ef82..0000000 --- a/bin/flash.sh +++ /dev/null @@ -1,3 +0,0 @@ -#/bin/sh -FIRMWARE=$1 -avrdude -c usbasp -p t13 -u -Uflash:w:$FIRMWARE -Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m -- cgit v1.2.3