I’ve been building a lot of Particle projects recently on the command line rather than using the cloud IDE, so I figured I’d share my boilerplate app template for new Particle projects:
The web IDE is awesome, but there are many situations where it is more convenient to use your desktop text editor, or to pull in libraries and other source code you already have on your computer.
Some features:
Organize your code however you like in the src folder
Include libraries as git submodules in the lib folder
Build with make
Install via USB (with auto switch to DFU mode) with make install-usb
Since building using the firmware makefile requires a ton of steps, and Particle is meant to be a great platform for beginners, I built this to avoid having to pull down the firmware repo and install all the dependencies.
I'm hoping that one day Particle will come to the awesome PlatformIO to make this process much easier in future.
Using that installer one or 2 of the programs that are part of the whole package of programs has a error and did not install which leaves me having to install it properly manually which I have not done yet.
I’m looking for the easiest way to compile locally to use the latest firmware that is not official firmware yet. There is a Sleep function bug fix that I want to test out and building locally is the only way to do it. I also want to be able to setup Webhooks.
So what your sharing sounds like a easier path to build locally.
Pardon my ignorance at this point but will what your offering allow me to build locally without all the programs that the Auto installer here is trying to install? Toolchain for Windows Installer
@RWB, the tool uses the Particle CLI so there is no “local” compiling since the CLI uses the Cloud compile servers. For true local compiling, you still need to install a local toolchain.
It automatically installs the toolchain for the ARM, probably need to add some stuff to automatically install dfu-util. Now I need to know what the absolute minimum source is to build and flash it in the photon.
How do you autoswitch to DFU mode? I noticed this in the make file, how does it work?
enter-dfu-mode: ## Enter DFU mode on the attached USB device
-stty -f /dev/tty.usbmodem1411 14400