particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

Remove ymodem flashing #712

Closed keeramis closed 10 months ago

keeramis commented 10 months ago

Description

ymodem flashing is replaced using CLI local flashing over USB (which uses DFU and Control requests)

How to Test

I will provide some examples here but kindly think of any creative ways that users would use particle serial flash or particle flash --serial command!

  1. Checkout this branch. Install dependencies.
  2. particle serial flash
    • npm start -- serial flash /path/to/file.bin with single device
    • npm start -- serial flash /path/to/file.bin with multiple devices
    • npm start -- serial flash /path/to/file.bin --port /port/num/of/device
  3. particle flash --serial
    • npm start -- flash --serial /path/to/file.bin with single device
    • npm start -- flash --serial /path/to/file.bin with multiple devices
    • npm start -- flash --serial /path/to/file.bin --port /port/num/of/device

Related Issues / Discussions

https://app.shortcut.com/particle/epic/124394 https://app.shortcut.com/particle/story/124692/remove-ymodem-from-cli

Completeness

keeramis commented 10 months ago

@monkbroc Thanks for the clean up and the changes. I have one question for you. Over here - https://github.com/particle-iot/particle-cli/blob/feature/ep-124394/remove-ymodem-flashing/src/cmd/flash.js#L53 We are still calling this function flashYModem which gives the wrong idea because we removed ymodem flashing completely, and under-the-hood, it calls flashDevice now. Why can't we make it call flashDevice directly?