Skip to content

Instantly share code, notes, and snippets.

@nrobinson2000
Last active September 29, 2017 07:56
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nrobinson2000/6be1dbf6ef77bb947e42 to your computer and use it in GitHub Desktop.
Particle Offline Utility: A handy script for installing and using the Particle Toolchain on Ubuntu-based Distros and OSX
@nrobinson2000
Copy link
Author

nrobinson2000 commented Mar 13, 2016

UPDATE:

This is now a repository. https://github.com/nrobinson2000/po-util/

Notes:

To fully make use of this script you must first download and save it to your home folder.
Make the script executable and create an alias for it in your .bashrc.

$ chmod +x po-util.sh
$ echo 'alias po="~/po-util.sh"' >> .bashrc

You next have to install the Particle toolchain and dependecies. All of this can be taken care with:

$ po install

To format your working directory into a project folder run:

$ po init

Next, put your device into dfu mode and install the firmware patch with:

$ po DEVICE patch

replace _DEVICE_ with either _photon_ or _electron_

To compile and test your firmware run:

$ po DEVICE build

To compile and automagically upload your firmware with dfu-util run:

$ po DEVICE flash

Discuss on Particle Forums

Donate Bitcoin

@kikolobo
Copy link

kikolobo commented Apr 3, 2016

This is very nice script!

Thank you for it!
Saves a ton of time!

@davidhaile
Copy link

This is one fantastic tool! I've been using it on a side project for about a month. I'm totally impressed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment