breaker27 / smarthomatic

smarthomatic
http://www.smarthomatic.org
34 stars 12 forks source link

Add flash.sh script to binary packages #3

Closed breaker27 closed 10 years ago

breaker27 commented 11 years ago

There's now a command line file (Windows). A Linux script with the same functionality has to be added. Assume that avrdude is configured with the config file before (don't ask user for options).

mxmxchere commented 10 years ago

I don't know where to commit this, but i wrote the linux version of the script:

flash_all.sh:

#!/bin/bash

echo
# find the e2p file
for file in *.e2p
do
        SHC_E2P=$file
done

# find the hex file
for file in *.hex
do
        SHC_HEX=$file
done

# find the processortype
SHC_PROC=m328p

if [ $SHC_HEX == "hc_SOME168DEVICE.hex" ]
then
        SHC_PROC=m168
fi

echo "Firmware: $SHC_HEX"
echo "EEPROM:   $SHC_E2P"
echo "ATMega:   $SHC_PROC"
echo
read -p "Do you want to flash fuses, eeprom and firmware now? (Continue with enter/Abort with Ctrl+C)"
avrdude -p $SHC_PROC -U flash:w:$SHC_HEX -U eeprom:w:$SHC_E2P:r -U lfuse:w:lfuse.bin:r -U hfuse:w:hfuse.bin:r -U efuse:w:efuse.bin:r

flash_firmware.sh:

#!/bin/bash

echo
# find the hex file
for file in *.hex
do
        SHC_HEX=$file
done

# find the processortype
SHC_PROC=m328p

if [ $SHC_HEX == "hc_SOME168DEVICE.hex" ]
then
        SHC_PROC=m168
fi

echo "Firmware: $SHC_HEX"
echo "ATMega:   $SHC_PROC"
echo
read -p "Do you want to flash firmware now? (Continue with enter/Abort with Ctrl+C)"
avrdude -p $SHC_PROC -U flash:w:$SHC_HEX
breaker27 commented 10 years ago

Thanks, but as you can see I wrote and committed it yesterday already after the issue was open for 5 months. Bad luck that we nearly wrote that script at the same time.

mxmxchere commented 10 years ago

no problem, shit happens. So why is this issue still open? Where can i find the script in the repo?

mxmxchere commented 10 years ago

ah ok, develop-branch.

breaker27 commented 10 years ago

See here http://www.smarthomatic.org/board/board.html about the status. I close issues after they are integrated into a master ("official") build. Before, the issues are marked with label "implementing" or "testing".

mxmxchere commented 10 years ago

ok, thank you ;-)