forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of ../wifishield
- Loading branch information
Showing
270 changed files
with
147,275 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
15,921 changes: 15,921 additions & 0 deletions
15,921
hardware/arduino/firmwares/wifishield/binary/wifiHD.hex
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
10,470 changes: 10,470 additions & 0 deletions
10,470
hardware/arduino/firmwares/wifishield/binary/wifi_dnld.hex
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
96 changes: 96 additions & 0 deletions
96
hardware/arduino/firmwares/wifishield/scripts/ArduinoWifiShield_upgrade.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#!/bin/sh | ||
|
||
WIFI_FW_PATH="/hardware/arduino/firmwares/wifi-shield" | ||
AVR_TOOLS_PATH="/hardware/tools/avr/bin" | ||
|
||
progname=$0 | ||
|
||
usage () { | ||
cat <<EOF | ||
Usage: $progname [-a Arduino_path] [-f which_firmware] [-h] | ||
-a set the path where the Arduino IDE is installed | ||
-f the firmware you want to upload, valid parameters are: | ||
shield - to upgrade the WiFi shield firmware | ||
all - to upgrade both firmwares | ||
-h help | ||
EOF | ||
exit 0 | ||
} | ||
|
||
upgradeHDmodule () { | ||
sleep 1 # Give time to the shield to end the boot | ||
echo "****Upgrade HD WiFi module firmware****\n" | ||
dfu-programmer at32uc3a1256 erase | ||
dfu-programmer at32uc3a1256 flash --suppress-bootloader-mem $WIFI_FW_PATH/wifi_dnld.hex | ||
dfu-programmer at32uc3a1256 start | ||
echo -n "\nRemove the J3 jumper then press the RESET button on the shield then type [ENTER] to upgrade the firmware of the shield..\n" | ||
read readEnter | ||
} | ||
|
||
upgradeShield () { | ||
sleep 1 # Give time to the shield to end the boot | ||
echo "****Upgrade WiFi Shield firmware****\n" | ||
dfu-programmer at32uc3a1256 erase | ||
dfu-programmer at32uc3a1256 flash --suppress-bootloader-mem $WIFI_FW_PATH/wifiHD.hex | ||
dfu-programmer at32uc3a1256 start | ||
echo "\nDone. Remove the J3 jumper and press the RESET button on the shield." | ||
echo "Thank you!\n" | ||
} | ||
|
||
cat <<EOF | ||
Arduino WiFi Shield upgrade | ||
========================================= | ||
Disclaimer: to access to the USB devices correctly, the dfu-programmer needs to be used as root. Run this script as root. | ||
EOF | ||
|
||
if [ $USER = 'root' ] ; then #check if the current user is root | ||
while getopts ":a:f:h" opt; do | ||
case $opt in | ||
a) | ||
ARDUINO_PATH=$OPTARG | ||
WIFI_FW_PATH=$ARDUINO_PATH$WIFI_FW_PATH | ||
AVR_TOOLS_PATH=$ARDUINO_PATH$AVR_TOOLS_PATH | ||
cd $AVR_TOOLS_PATH | ||
./avr-objcopy --output-target=ihex $WIFI_FW_PATH/wifi_dnld.elf $WIFI_FW_PATH/wifi_dnld.hex | ||
./avr-objcopy --output-target=ihex $WIFI_FW_PATH/wifiHD.elf $WIFI_FW_PATH/wifiHD.hex | ||
;; | ||
f) | ||
if [ "$ARDUINO_PATH" != "" ] ; then | ||
if [ "$OPTARG" = "all" ] ; then | ||
upgradeHDmodule | ||
upgradeShield | ||
exit 0 | ||
else | ||
if [ "$OPTARG" = "shield" ] ; then | ||
upgradeShield | ||
exit 0 | ||
else | ||
echo "invalid parameter for the -f [firmware] option, please retry." | ||
echo "Type -h for help\n" | ||
exit 1 | ||
fi | ||
fi | ||
else | ||
echo "Arduino Path not setted. Retry...\n" | ||
fi | ||
;; | ||
h) | ||
usage ;; | ||
\?) | ||
echo "Invalid option: $OPTARG" >&2 | ||
usage | ||
exit 1 | ||
;; | ||
:) | ||
echo "Option -$OPTARG requires an argument." >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
else | ||
echo "You are not root!\n" | ||
fi | ||
|
||
shift $(($OPTIND - 1)) |
96 changes: 96 additions & 0 deletions
96
hardware/arduino/firmwares/wifishield/scripts/ArduinoWifiShield_upgrade_mac.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#!/bin/sh | ||
|
||
WIFI_FW_PATH="/hardware/arduino/firmwares/wifi-shield" | ||
AVR_TOOLS_PATH="/hardware/tools/avr/bin" | ||
|
||
progname=$0 | ||
|
||
usage () { | ||
cat <<EOF | ||
Usage: $progname [-a Arduino_path] [-f which_firmware] [-h] | ||
-a set the path where the Arduino IDE is installed | ||
-f the firmware you want to upload, valid parameters are: | ||
shield - to upgrade the WiFi shield firmware | ||
all - to upgrade both firmwares | ||
-h help | ||
EOF | ||
exit 0 | ||
} | ||
|
||
upgradeHDmodule () { | ||
sleep 1 # Give time to the shield to end the boot | ||
echo "****Upgrade HD WiFi module firmware****\n" | ||
dfu-programmer at32uc3a1256 erase | ||
dfu-programmer at32uc3a1256 flash --suppress-bootloader-mem $WIFI_FW_PATH/wifi_dnld.hex | ||
dfu-programmer at32uc3a1256 start | ||
echo -n "\nRemove the J3 jumper then press the RESET button on the shield then type [ENTER] to upgrade the firmware of the shield..\n" | ||
read readEnter | ||
} | ||
|
||
upgradeShield () { | ||
sleep 1 # Give time to the shield to end the boot | ||
echo "****Upgrade WiFi Shield firmware****\n" | ||
dfu-programmer at32uc3a1256 erase | ||
dfu-programmer at32uc3a1256 flash --suppress-bootloader-mem $WIFI_FW_PATH/wifiHD.hex | ||
dfu-programmer at32uc3a1256 start | ||
echo "\nDone. Remove the J3 jumper and press the RESET button on the shield." | ||
echo "Thank you!\n" | ||
} | ||
|
||
cat <<EOF | ||
Arduino WiFi Shield upgrade | ||
========================================= | ||
Disclaimer: to access to the USB devices correctly, the dfu-programmer needs to be used as root. Run this script as root. | ||
EOF | ||
|
||
if [ $USER = 'root' ] ; then #check if the current user is root | ||
while getopts ":a:f:h" opt; do | ||
case $opt in | ||
a) | ||
ARDUINO_PATH=$OPTARG | ||
WIFI_FW_PATH=$ARDUINO_PATH$WIFI_FW_PATH | ||
AVR_TOOLS_PATH=$ARDUINO_PATH$AVR_TOOLS_PATH | ||
cd $AVR_TOOLS_PATH | ||
./avr-objcopy --output-target=ihex $WIFI_FW_PATH/wifi_dnld.elf $WIFI_FW_PATH/wifi_dnld.hex | ||
./avr-objcopy --output-target=ihex $WIFI_FW_PATH/wifiHD.elf $WIFI_FW_PATH/wifiHD.hex | ||
;; | ||
f) | ||
if [ "$ARDUINO_PATH" != "" ] ; then | ||
if [ "$OPTARG" = "all" ] ; then | ||
upgradeHDmodule | ||
upgradeShield | ||
exit 0 | ||
else | ||
if [ "$OPTARG" = "shield" ] ; then | ||
upgradeShield | ||
exit 0 | ||
else | ||
echo "invalid parameter for the -f [firmware] option, please retry." | ||
echo "Type -h for help\n" | ||
exit 1 | ||
fi | ||
fi | ||
else | ||
echo "Arduino Path not setted. Retry...\n" | ||
fi | ||
;; | ||
h) | ||
usage ;; | ||
\?) | ||
echo "Invalid option: $OPTARG" >&2 | ||
usage | ||
exit 1 | ||
;; | ||
:) | ||
echo "Option -$OPTARG requires an argument." >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
else | ||
echo "You are not root!\n" | ||
fi | ||
|
||
shift $(($OPTIND - 1)) |
Oops, something went wrong.