Particle Dev Local Compiler
apm install particle-dev-local-compiler
Particle Dev Local Compiler
Note: local compilation is an experimental feature and may have issues with some projects.
Install Docker Toolbox
First follow instructions for OS X / Windows / Linux.
If everything went well, open Docker Quickstart Terminal and type:
$ docker-machine env default
and take note of values that were shown.
Install and setup this package
- Open Atom or Particle Dev
- Open Command Palette (
Pon OS X or
- Type install packages
- Choose Settings View: Install Packages and Themes
- Search for Particle Dev Local Compiler
- Install found package
- Click Settings next to package
- Fill Docker Cert Path and Docker Host with noted values from
- Open Command Palette
- Type update firmware
- Choose Particle Dev Local Compiler: Update Firmware Versions
After this finishes you should be ready to start using local compiler.
Selecting target platform/version
After installation you should see two new items in status bar next to selected device:
First one allows you to select for which platform you want to build the firmware.
Second allows to select which firmware version should be targeted.
Note: those currently affect only local compilation.
Note: not all platforms are compatible with all versions (i.e.
0.3.4 won’t work for Photon).
With project opened you should see two icons with check icon on them:
First one will do a cloud compile as previously.
Second does a local compilation. Clicking it will create
build directory in your project and fill it with compilation results.
Resulting binary can be flashed over the air using Flash icon on over the wire using
particle flash --usb <filename> CLI command.
Q: Update Firmware Versions takes a very long time. Did it hang?
A: Depending on many factors, first update may take up to dozens of minutes as it pulls image for every firmware version. There’s an issue that should make first update much quicker. Until then it’s best to wait until it finishes.
Q: I already entered Docker settings but still get error telling me I don’t have Docker environment set up
A: On Windows and OS X, docker requires running a small virtual machine to work. This is managed by
docker-machine tool. Make sure you run
docker-machine start default after restarting your computer.
Q: I get
Platform 'core' does not support dynamic modules error
A: Some platforms and versions won’t work together. You have to try using different version.
Q: After updating firmware versions Docker VM has grown to over 20GB
A: Alpha version of local compiler tries to download all available versions which may take a lot of disk space. If you prefer just to keep latest version you can recreate VM using:
$ docker-machine rm default
$ docker-machine create --driver=virtualbox default
$ eval "$(docker-machine env default)"
$ docker pull particle/buildpack-particle-firmware:v0.4.7
Note: it is possible you will need to update Docker settings in Atom/Particle Dev.
Q: How can I uninstall local compiler and all related software?
A: To uninstall Particle Dev Local Compiler package, go to Settings View: Uninstall packages and click Uninstall next to it. To uninstall Docker Toolbox:
On Windows you can remove Docker Toolbox and VirtualBox using Programs and Features in Control Panael.
On OS X you can use the official script to uninstall Docker Machine and use VirtualBox removal tool from latest VirtualBox.