particle flash deviceName test01.ino
uploads the source to the cloud, compiles it and then pushes it to the device.
particle flash deviceName firmware.bin
uploads the firmware to the cloud, and then pushes it to the device.
particle flash --serial firmware.bin
does a local update of the firmware file over USB
why cant we combine them into particle flash --serial test01.ino
? currently, it happily tries to upload the source file as binary to the device.
Isnt this pretty much the way you are supposed to work with an electron or am i missing something?
The command flash
, as the name implies, is to perform a flashing action and --serial
tells it to do so via the wires. Maybe another verb
needs to be introduced to perform the compile and flash action together.
You can do this:
particle compile electron test01.ino --saveTo firmware.bin && particle flash --serial firmware.bin
or
particle compile electron test01.ino --saveTo firmware.bin && particle flash --serial ls -tr firmware* | tail -1
1 Like
but if you want upload via the cloud, you can do it in 1 go with particle flash device_id file1.ino
.
Just looks weird to me that that would not be possible when done via serial. and also that it kinda does the wrong thing without giving you an error
Sounds like the file extension detection might not be working…
Opened an issue here: https://github.com/spark/particle-cli/issues/223
The main issue with particle flash --serial test01.ino
is that there’s no way to tell which device you are compiling for. The
can tell based on the deviceID you passed on