Particle local flash and update

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:

  1. 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
  2. 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)
  3. 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
  4. 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
  5. 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
  6. 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.

11 Likes

The particle update command now uses the same mechanism as particle flash --local to update Device OS.

Example uses are:

  1. particle update
    • Update a device connected over USB to the latest Device OS version (preferring long-term support - LTS).
  2. particle update --target 4.1.0
    • Upgrade or downgrade the device to Device OS 4.1.0

It's not necessary to put the device in DFU mode first. If the device is in an unknown state, it's still ok to put the device in DFU then do particle update to get Device OS back to a known state.

1 Like