@@ -103,6 +103,34 @@ You can specify a version with the `--target` argument.
1031031 . Connect your device via USB
1041041 . Run ` particle update ` .
105105
106+ ### particle compile --compiler local
107+
108+ ` particle compile ` and ` particle flash ` build your project in the cloud by default. Pass
109+ ` --compiler local ` to build on your own machine with the same toolchain Particle Workbench
110+ uses: the Device OS source, the ` gcc-arm ` cross compiler, ` buildtools ` and the build scripts.
111+
112+ ``` sh
113+ $ particle compile argon my-project --compiler local
114+ $ particle flash --local --compiler local
115+ $ particle flash my-device my-project --compiler local
116+ ```
117+
118+ * The toolchain is installed under ` ~/.particle/toolchains ` , the directory Workbench uses, so
119+ anything Workbench already installed is reused and nothing is downloaded twice. The first
120+ local compile on a machine without Workbench downloads about 1 GB for one Device OS version;
121+ the CLI prints what it fetches and shows a progress bar.
122+ * ` --target <version> ` picks the Device OS version to build against, resolved from the public
123+ toolchain manifest. Without it the CLI uses the default version for the platform and prints it.
124+ On ` flash --local ` the same version is flashed to the device.
125+ * A local compile needs no login once the toolchain and the project's libraries are on disk.
126+ Libraries listed as ` dependencies.* ` in ` project.properties ` are copied into ` lib/ ` the first
127+ time, which does need a login (` particle login ` ).
128+ * The project directory is built in place, as in Workbench: output goes to
129+ ` <project>/target/<version>/<platform>/ ` , ` .ino ` files are preprocessed next to their
130+ sources, and ` particle.include ` / ` particle.ignore ` are not applied.
131+ * Supported on macOS, Linux and Windows on x64, and on Apple Silicon through Rosetta. Not
132+ available on Linux arm64, and project paths must not contain spaces.
133+
106134
107135## Command Reference
108136
0 commit comments