I'm excited to announce that particle flash --local
is now in public beta! It brings single step multi file local flash to the CLI, includes upgrades and downgrades to any Device OS version, and supports assets! Get it with particle update-cli
Example uses include:
particle flash --local
- Cloud compiles the application in the current directory against the default Device OS version for the connected device
- Flashes it locally
- Updates Device OS if necessary to avoid safe mode
- Can also pass the path to a project directory as an additional argument
particle flash --local --target 4.1.0
- Cloud compiles the application in the current directory against the target Device OS
- Flashes it locally
- Forces an update to Device OS (might lead to a downgrade)
particle flash --local application.bin
- Flashes the application binary or bundle of application and assets, or Device OS binary
- Updates Device OS if necessary (unless Device OS binaries are included)
- Can pass several binaries or a directory with several binaries in order to flash an application and all its Device OS dependencies
particle flash --local /path/to/project --target 4.1.0 --application-only
- Compile sources in the cloud against the target Device OS version
- Doesn’t flash Device OS, even if it’s outdated
particle flash --local tinker
- Flashes tinker locally
- Won’t update Device OS since tinker is compiled against a very old Device OS version
- Can force an update of Device OS by passing
--target
particle flash --local my-device application.bin --target 4.1.0
- For all the options above, you can also pass a device name or id as the first parameter to select which device to flash if multiple devices are connected
The goal for the beta is to collect feedback and bug reports. Meanwhile, we'll keep tweaking the implementation to make it more robust.
If you run into issues, include your operating system, which type of device you tried to flash, what was the current Device OS version before starting the flash operation (run particle serial inspect
in listening mode if possible) and the exact command.
Next steps are to rework particle update
to use the particle flash --local
mechanism under the hood, and update Workbench to use particle flash --local
in the Flash (local) commands.