Last active
September 29, 2017 07:56
-
-
Save nrobinson2000/6be1dbf6ef77bb947e42 to your computer and use it in GitHub Desktop.
Revisions
-
nrobinson2000 revised this gist
Apr 23, 2016 . 2 changed files with 10 additions and 196 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,196 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # UPDATE: [](https://travis-ci.org/nrobinson2000/po-util) [I have moved this script over from a gist to a repository.](https://github.com/nrobinson2000/po-util) I have also made it super easy to install this utility: ``` curl -fsSL https://git.io/vwRRf | bash ``` Additional functions have also been added, including OTA flashing and manual DFU control. Find out more in the repository, https://github.com/nrobinson2000/po-util -
nrobinson2000 revised this gist
Apr 22, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -136,11 +136,11 @@ fi cd ~/github/firmware || exit if [ "$1" == "photon" ]; then git checkout release/v0.5.0 fi if [ "$1" == "electron" ]; then git checkout release/v0.5.0 fi if [ "$2" == "patch" ]; -
nrobinson2000 revised this gist
Apr 22, 2016 . 1 changed file with 17 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -101,14 +101,30 @@ stty -f $modem 19200 sleep 1 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" exit else stty -F /dev/ttyACM0 19200 sleep 1 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" exit fi fi if [ "$1" == "dfu-open" ]; then if [ "$(uname -s)" == "Darwin" ]; then stty -f $modem 19200 exit else stty -F /dev/ttyACM0 19200 exit fi fi if [ "$1" == "dfu-close" ]; then dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D /dev/null exit fi if [ "$1" == "photon" ] || [ "$1" == "electron" ]; -
nrobinson2000 revised this gist
Apr 3, 2016 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -124,7 +124,7 @@ then git checkout latest fi if [ "$1" == "electron" ]; then git checkout latest fi if [ "$2" == "patch" ]; @@ -134,11 +134,11 @@ sed '2s/.*/START_DFU_FLASHER_SERIAL_SPEED=19200/' ~/github/firmware/build/module rm -f ~/github/firmware/build/module-defaults.mk mv temp ~/github/firmware/build/module-defaults.mk cd ~/github/firmware/modules/"$1"/system-part1 make clean all PLATFORM="$1" program-dfu cd ~/github/firmware/modules/"$1"/system-part2 make clean all PLATFORM="$1" program-dfu sleep 1 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D /dev/null exit @@ -159,7 +159,7 @@ particle flash "$3" "$CWD/bin/firmware.bin" fi if [ "$2" == "build" ]; then make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" echo "Binary saved to $CWD/bin/firmware.bin" fi @@ -177,4 +177,4 @@ make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PL dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" fi fi -
nrobinson2000 revised this gist
Apr 2, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -159,7 +159,7 @@ particle flash "$3" "$CWD/bin/firmware.bin" fi if [ "$2" == "build" ]; then make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" || exit echo "Binary saved to $CWD/bin/firmware.bin" fi @@ -168,12 +168,12 @@ then if [ "$(uname -s)" == "Darwin" ]; then stty -f $modem 19200 make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" || exit dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" else stty -F /dev/ttyACM0 19200 make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" || exit dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" fi -
nrobinson2000 revised this gist
Apr 1, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -139,6 +139,8 @@ make clean all PLATFORM="photon" program-dfu cd ~/github/firmware/modules/photon/system-part2 make clean all PLATFORM="photon" program-dfu sleep 1 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D /dev/null exit fi -
nrobinson2000 revised this gist
Apr 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -137,7 +137,7 @@ mv temp ~/github/firmware/build/module-defaults.mk cd ~/github/firmware/modules/photon/system-part1 make clean all PLATFORM="photon" program-dfu cd ~/github/firmware/modules/photon/system-part2 make clean all PLATFORM="photon" program-dfu exit fi -
nrobinson2000 revised this gist
Apr 1, 2016 . No changes.There are no files selected for viewing
-
nrobinson2000 revised this gist
Apr 1, 2016 . No changes.There are no files selected for viewing
-
nrobinson2000 revised this gist
Apr 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -139,7 +139,7 @@ make clean all PLATFORM="photon" program-dfu cd ~/github/firmware/modules/photon/system-part1 make clean all PLATFORM="photon" program-dfu exit fi -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 27 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ #!/bin/bash # Particle Offline Utility if [ "$1" == "help" ]; then echo " po-util 1.1 @@ -17,6 +18,11 @@ Summary: Code in the firmware/ directory is compiled and saved as a binary. exit fi if [ "$(uname -s)" == "Darwin" ]; then modem=`ls -1 /dev/cu.* | grep -vi bluetooth | tail -1` fi CWD=$(pwd) if [ "$1" == "install" ]; @@ -56,7 +62,6 @@ sudo npm install -g particle-cli wget https://gist.github.com/monkbroc/b283bb4da8c10228a61e/raw/e59c77021b460748a9c80ef6a3d62e17f5947be1/50-particle.rules sudo mv 50-particle.rules /etc/udev/rules.d/50-particle.rules fi if [ "$(uname -s)" == "Darwin" ]; then /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" @@ -72,13 +77,6 @@ fi echo "Sucessfully Installed!" && exit fi if [ "$1" == "init" ]; then @@ -99,31 +97,25 @@ if [ "$1" == "dfu" ]; then if [ "$(uname -s)" == "Darwin" ]; then stty -f $modem 19200 sleep 1 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" exit else stty -F /dev/ttyACM0 19200 sleep 1 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" exit fi fi if [ "$1" == "photon" ] || [ "$1" == "electron" ]; then echo "$1 selected." else echo "Please select photon or electron. Try \"po-util help\" for help." && exit fi cd ~/github/firmware || exit @@ -135,6 +127,22 @@ if [ "$1" == "electron" ]; then git checkout prereleases/electron-v0.4.8-rc.6 fi if [ "$2" == "patch" ]; then cd "$CWD" sed '2s/.*/START_DFU_FLASHER_SERIAL_SPEED=19200/' ~/github/firmware/build/module-defaults.mk > temp rm -f ~/github/firmware/build/module-defaults.mk mv temp ~/github/firmware/build/module-defaults.mk cd ~/github/firmware/modules/photon/system-part1 make clean all PLATFORM="photon" program-dfu cd ~/github/firmware/modules/photon/system-part1 make clean all PLATFORM="photon" program-dfu fi if [ "$2" == "update" ]; then git pull fi @@ -157,14 +165,14 @@ if [ "$2" == "flash" ]; then if [ "$(uname -s)" == "Darwin" ]; then stty -f $modem 19200 make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" else stty -F /dev/ttyACM0 19200 make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" fi fi -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 19 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -95,6 +95,25 @@ then echo else echo "Please run with \"init\" to setup this project directory." && exit fi if [ "$1" == "dfu" ]; then if [ "$(uname -s)" == "Darwin" ]; then stty -f /dev/tty.usbmodem1411 14400 sleep 1 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" exit else ~/po-helper-linux.py sleep 1 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" exit fi fi if [ "$1" == "photon" ] || [ "$1" == "electron" ]; then echo "$1 selected." else echo "Please select photon or electron. Try \"po-util help\" for help." && exit @@ -149,17 +168,3 @@ dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" fi fi -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -100,9 +100,9 @@ then echo "$1 selected." else echo "Please select photon or electron. Try \"po-util help\" for help." && exit fi if [ "$2" == "build" ] || [ "$2" == "flash" ] || [ "$2" == "clean" ] || [ "$2" == "update" ] || [ "$2" == "ota" ] || [ "$2" == "dfu" ]; then echo "$2 selected." else echo "Please decide whether to update, dfu, ota, clean, build, or build and flash. Try \"po-util help\" for help." && exit fi @@ -124,7 +124,7 @@ if [ "$2" == "clean" ]; then make clean fi if [ "$2" == "ota" ]; then particle flash "$3" "$CWD/bin/firmware.bin" fi -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,5 @@ #!/bin/bash # Particle Offline Utility if [ "$1" == "help" ]; then echo " po-util 1.1 @@ -105,8 +103,7 @@ fi if [ "$2" == "build" ] || [ "$2" == "flash" ] || [ "$2" == "clean" ] || [ "$2" == "update" ] || [ "$2" == "upload" ] || [ "$2" == "dfu" ]; then echo "$2 selected." else echo "Please decide whether to update, dfu, upload, clean, build, or build and flash. Try \"po-util help\" for help." && exit fi cd ~/github/firmware || exit @@ -155,6 +152,8 @@ fi if [ "$2" == "dfu" ]; then if [ "$(uname -s)" == "Darwin" ]; then stty -f /dev/tty.usbmodem1411 14400 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 21 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -102,9 +102,11 @@ then echo "$1 selected." else echo "Please select photon or electron. Try \"po-util help\" for help." && exit fi if [ "$2" == "build" ] || [ "$2" == "flash" ] || [ "$2" == "clean" ] || [ "$2" == "update" ] || [ "$2" == "upload" ] || [ "$2" == "dfu" ]; then echo "$2 selected." else echo "Please decide whether to update, dfu, upload, clean, build, or build and flash. Try \"po-util help\" for help." && exit fi cd ~/github/firmware || exit @@ -125,6 +127,11 @@ if [ "$2" == "clean" ]; then make clean fi if [ "$2" == "upload" ]; then particle flash "$3" "$CWD/bin/firmware.bin" fi if [ "$2" == "build" ]; then make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" echo "Binary saved to $CWD/bin/firmware.bin" @@ -145,3 +152,15 @@ dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" fi fi if [ "$2" == "dfu" ]; then stty -f /dev/tty.usbmodem1411 14400 dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" else ~/po-helper-linux.py dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" fi fi -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,15 +5,15 @@ if [ "$1" == "help" ]; then echo " po-util 1.1 To install dependencies run \"po-util install\" To correctly format a project folder run \"po-util init\" To build a binary run \"po-util DEVICE build\", with DEVICE as either \"photon\" or \"electron\" To build a binary and upload (flash) to the connected device using dfu-util run \"po-util DEVICE flash\" If you need to reset the build directory run \"po-util DEVICE clean\" Summary: Code in the firmware/ directory is compiled and saved as a binary. The binary can be flashed to a connected device over dfu-util." exit @@ -74,7 +74,7 @@ fi echo "Sucessfully Installed!" && exit fi if [ "$1" == "install-helper" ]; then cd ~ curl -O https://gist.github.com/nrobinson2000/7f9dfaef66dccc6c34834ca2ef5dd8ca/raw/d02769d732801965e8bddbd89887755d6e7bc4d5/po-helper-linux.py @@ -133,7 +133,7 @@ fi if [ "$2" == "flash" ]; then if [ "$(uname -s)" == "Darwin" ]; then stty -f /dev/tty.usbmodem1411 14400 make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -74,6 +74,14 @@ fi echo "Sucessfully Installed!" && exit fi if [ "$1" == "install-helper“ ]; then cd ~ curl -O https://gist.github.com/nrobinson2000/7f9dfaef66dccc6c34834ca2ef5dd8ca/raw/d02769d732801965e8bddbd89887755d6e7bc4d5/po-helper-linux.py chmod +x po-helper-linux.py fi if [ "$1" == "init" ]; then mkdir firmware/ @@ -131,6 +139,7 @@ make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PL dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" else ~/po-helper-linux.py make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -94,9 +94,9 @@ then echo "$1 selected." else echo "Please select photon or electron. Try \"po-util help\" for help." && exit fi if [ "$2" == "build" ] || [ "$2" == "flash" ] || [ "$2" == "clean" ] || [ "$2" == "update" ]; then echo "$2 selected." else echo "Please decide whether to update, clean, build, or build and flash. Try \"po-util help\" for help." && exit fi cd ~/github/firmware || exit @@ -109,7 +109,9 @@ if [ "$1" == "electron" ]; then git checkout prereleases/electron-v0.4.8-rc.6 fi if [ "$2" == "update" ]; then git pull fi if [ "$2" == "clean" ]; then make clean -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -123,13 +123,14 @@ fi if [ "$2" == "flash" ]; then if [ "$(uname -s)" == "Darwin" ]; then stty -f /dev/tty.usbmodem1411 14400 make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" else make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D "$CWD/bin/firmware.bin" fi fi -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 10 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -116,13 +116,20 @@ then make clean fi if [ "$2" == "build" ]; then make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" echo "Binary saved to $CWD/bin/firmware.bin" fi if [ "$2" == "flash" ]; then if [ "$(uname -s)" == "Darwin" ]; then make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" stty -f /dev/tty.usbmodem1411 14400 particle flash --usb "$CWD/bin/firmware.bin" else make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" particle flash --usb "$CWD/bin/firmware.bin" fi fi -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -123,6 +123,6 @@ if [ "$2" == "flash" ]; then if [ "$(uname -s)" == "Darwin" ]; then make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" && stty -f /dev/tty.usbmodem1411 14400 && particle flash --usb "$CWD/bin/firmware.bin" else make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" && particle flash --usb "$CWD/bin/firmware.bin" fi fi -
nrobinson2000 revised this gist
Mar 31, 2016 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ then mkdir ~/github cd ~/github git clone https://github.com/spark/firmware.git if [ "$(uname -s)" == "Linux" ]; then cd ~/github || exit # Install dependencies @@ -59,7 +59,7 @@ wget https://gist.github.com/monkbroc/b283bb4da8c10228a61e/raw/e59c77 sudo mv 50-particle.rules /etc/udev/rules.d/50-particle.rules fi if [ "$(uname -s)" == "Darwin" ]; then /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew tap PX4/homebrew-px4 @@ -120,5 +120,9 @@ then make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bi fi if [ "$2" == "flash" ]; then if [ "$(uname -s)" == "Darwin" ]; then make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1" && stty -f /dev/tty.usbmodem1411 14400 && particle flash --usb "$CWD/bin/firmware.bin" else make all -s -C ~/github/firmware APPDIR="$CWD/firmware" TARGET_DIR="$CWD/bin" PLATFORM="$1"&& particle flash --usb "$CWD/bin/firmware.bin" fi fi -
nrobinson2000 revised this gist
Mar 13, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ if [ "$1" == "help" ]; then echo " po-util 1.1 To install dependencies run \"po-util install\" To correctly format a project folder run \"po-util init\" To build a binary run \"po-util DEVICE build\", with DEVICE as either \"photon\" -
nrobinson2000 revised this gist
Mar 13, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,7 @@ echo " po-util 1.1 Summary: Code in the firmware/ directory is compiled and saved as a binary. The binary can be flashed to a connected device over dfu-util." exit fi CWD=$(pwd) -
nrobinson2000 revised this gist
Mar 13, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,7 @@ echo " po-util 1.1 To build a binary and upload (flash) to the connected device using dfu-util run \"po-util DEVICE flash\" If you need to reset the build directory run \"po-util DEVICE clean\" Summary: Code in the firmware/ directory is compiled and saved as a binary. The binary can be flashed to a connected device over dfu-util." fi -
nrobinson2000 revised this gist
Mar 13, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -69,6 +69,7 @@ rm node-v5.8.0.pkg sudo npm install -g node-pre-gyp npm sudo npm install -g particle-cli fi echo "Sucessfully Installed!" && exit fi if [ "$1" == "init" ]; -
nrobinson2000 revised this gist
Mar 13, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,9 +21,11 @@ CWD=$(pwd) if [ "$1" == "install" ]; then mkdir ~/github cd ~/github git clone https://github.com/spark/firmware.git if [ $(uname -s) == "Linux" ]; then cd ~/github || exit # Install dependencies echo "installing dependencies..." -
nrobinson2000 revised this gist
Mar 13, 2016 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,6 @@ echo " po-util 1.1 To build a binary and upload (flash) to the connected device using dfu-util run \"po-util DEVICE flash\" If you need to reset the build directory run \"po-util DEVICE clean\" Summary: Code in the firmware/ directory is compiled and saved as a binary. The binary can be flashed to a connected device over dfu-util." fi @@ -22,7 +21,7 @@ CWD=$(pwd) if [ "$1" == "install" ]; then if [ $(uname -s) == "Linux" ]; then mkdir ~/github cd ~/github || exit @@ -56,7 +55,7 @@ wget https://gist.github.com/monkbroc/b283bb4da8c10228a61e/raw/e59c77 sudo mv 50-particle.rules /etc/udev/rules.d/50-particle.rules fi if [ $(uname -s) == "Darwin" ]; then /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew tap PX4/homebrew-px4 -
nrobinson2000 revised this gist
Mar 13, 2016 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,10 @@ echo " po-util 1.1 To install dependencies run \"po-util install\" To correctly format a project folder run \"po-util init\" To build a binary run \"po-util DEVICE build\", with DEVICE as either \"photon\" or \"electron\" To build a binary and upload (flash) to the connected device using dfu-util run \"po-util DEVICE flash\" If you need to reset the build directory run \"po-util DEVICE clean\" Summary: Code in the firmware/ directory is compiled and saved as a binary. -
nrobinson2000 revised this gist
Mar 13, 2016 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -68,7 +68,6 @@ sudo npm install -g particle-cli fi fi if [ "$1" == "init" ]; then mkdir firmware/
NewerOlder