Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udp dev #41

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 34 additions & 10 deletions firmware/scripts/ArduinoWifiShield_upgrade.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/bin/sh

WIFI_FW_PATH="/hardware/arduino/firmwares/wifi-shield"
WIFI_FW_PATH="/hardware/arduino/firmwares/wifishield/binary"
AVR_TOOLS_PATH="/hardware/tools/avr/bin"

TARGET_MICRO="at32uc3a1256"


progname=$0

usage () {
Expand All @@ -20,28 +23,49 @@ EOF
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"
dfu-programmer $TARGET_MICRO erase
dfu-programmer $TARGET_MICRO flash --suppress-bootloader-mem $WIFI_FW_PATH/wifi_dnld.hex
dfu-programmer $TARGET_MICRO start

if [ $? != 0 ] ; then
echo "\nError during device initialization, please close the J3 jumper and press the reset button.\nTry -h for help\n"
exit 1 # if the device is not recognized exit
fi

echo -n "\nPress 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
dfu-programmer $TARGET_MICRO erase
dfu-programmer $TARGET_MICRO flash --suppress-bootloader-mem $WIFI_FW_PATH/wifiHD.hex
dfu-programmer $TARGET_MICRO start

if [ $? != 0 ] ; then
echo "\nError during device initialization, please close the J3 jumper and press the reset button.\nTry -h for help\n"
exit 1 # if the device is not recognized exit
fi

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.
Instructions:

To access to the USB devices correctly, the dfu-programmer needs to have the root permissions.

You can upgrade the firmware of the antenna togheter with the shield firmware or only the shield firmware
if there aren't changes on the antenna firmware.

Use the '-h' parameter for help
=========================================

EOF

Expand Down Expand Up @@ -90,7 +114,7 @@ if [ $USER = 'root' ] ; then #check if the current user is root
esac
done
else
echo "You are not root!\n"
echo "Please retry running the script as root.\n"
fi

shift $(($OPTIND - 1))
96 changes: 0 additions & 96 deletions firmware/scripts/ArduinoWifiShield_upgrade_mac.sh

This file was deleted.

Binary file modified firmware/wifiHD/Release/wifiHD.elf
Binary file not shown.
Loading