Notes for using Particle.io Boron IoT via USB.
Flashing OTA has been a major paint for me as Boron 2G/3G can take forever before connecting to network. During development, it is best to use USB instead of Cell connection to Flash code.
brew install dfu-util
bash <( curl -sL https://particle.io/install-cli )
Put device in DFU mode - Flashing Yellow (Mode+Reset, then release Reset, when flashing Yello, release reset)
particle update
Put device in DFU mode, then flash
particle usb dfu
particle flash wombat_zombie --usb firmware.bin
Developing, building then downloading compiled firmware in Particle Web IDE to flash via USB is the easiest.
Having said that, you can't automate any build using Particle Web IDE. So no CI/CD, you have to manually build, flash and test your code on a local test setup before flashing over the air to poptentially thousands of devices. That'd be a pain.
You can automate the build, but this gets involved. First, you need gcc-arm locally.
Homebrew has gcc-arm-embedded but Particle only recommends specific version (9-2019-q4-major for DeviceOS 2.0 at this time).
Need to download specific formula since the version we want is not tagged in homebrew.
wget https://raw.githubusercontent.com/Homebrew/homebrew-cask/24baf6c72920c409e6b5c6486b6664eb11d1343d/Casks/gcc-arm-embedded.rb
brew install gcc-arm-embedded.rb
Addtionally, gcc-arm-embedded is a cask and you can't pin it. So you'll have to re-run the above after every homebrew upgrade to stay on 9-2019-q4-major. I haven't tried the latest, but it just might work.
Info for building ARM binary locally is here: