The terminal process “C:\Users\R.particle\toolchains\buildtools\1.1.1\bin\bash.exe ‘-c’, ‘make -f ‘C:\Users\R.particle\toolchains\buildscripts\1.15.0\Makefile’ flash-all -s’” terminated with exit code: 2.
Particularly on Windows, you can significantly speed up builds by using Docker. Also, if you get the error Argument list too long on Windows, using Docker can work around this issue. For more information, see also building using a buildpack.
They suggest to build with docker in the doc if that happens on Windows. Did you try that?
To avoid other developers and EI experts all the hassle I had trying to Flash Particle Photon 2 I will post my notes.
You can flash the You’re muted example with VS Code for Windows and Linux following the instructions
If you try to flash an exported Particle Library from Edge Impulse, you will get Argument List Too Long both in Windows and Linux. I don’t have a Mac to test it.
Using the You’re muted zip and replacing tf-lite folder as suggested by Particle does not work
This Docker method works:
Download and install Docker Docker Desktop: The #1 Containerization Tool for Developers | Docker
Download and install CLI Command Line Interface (CLI) | Reference | Particle
Extract Edge Impulse library into a folder (For this example Photon2)
Run docker pull particle/buildpack-particle-firmware:5.5.0-p2
Run docker run --name=AnyName -v C:\Users\R\Desktop\Photon2:/input -v C:\Users\R\Desktop\Photon2:/output -e PLATFORM_ID=32 particle/buildpack-particle-firmware:5.5.0-p2
A firmware.bin file will be generated into the same folder
Run particle usb list (get device ID for the next step)
Run particle flash --local 0a10aced202194944a045144 firmware.bin