Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Gen 3] SoftDevice update support #1816
Currently, the only way to upgrade the SoftDevice is by using the debugger and manually flashing the SoftDevice binary into the appropriate location.
We've specifically decoupled our Gen 3 bootloader from SoftDevice, so it should be possible for us to employ current OTA update mechanics to update the SoftDevice, where the module is first copied into the OTA region by the DeviceOS, the device is reset and then the bootloader copies the module from the OTA region to the appropriate location in the internal flash. The only caveat is that we'll need to strip off the header/footer.
It should ideally also be possible to flash the SoftDevice over DFU as a means of recovery.
Steps to Test
// Optional, but might be required $ pip install intelhex $ python3 build/create_module.py --platform argon --function radio_stack ../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/hex/s140_nrf52_6.1.1_softdevice.hex argon-softdevice-6.1.1.bin
$ particle flash --serial argon-softdevice-6.1.1.bin $ particle flash %deviceid% argon-softdevice-6.1.1.bin
DFU writes into address range
The device should still able to boot into the bootloader even if SoftDevice upgrade is interrupted in the middle of the copying process from OTA region into the correct location.
SoftDevice DFU upgrade
It should be possible to upgrade SoftDevice using DFU. Particle CLI supports
$ particle flash --usb argon-softdevice-6.1.1.bin
Introduction of this feature will require two release.
The first release will only include this PR, but will not trigger the SoftDevice upgrade using our standard dependency mechanism. This will be the mandatory release and its system-part1 and bootloader versions will be used as dependencies in generated SoftDevice binaries.
The second release will add a dependency to
@m-mcgowan I have no strong preferences towards the naming, but honestly I prefer to call things what they really are. This naming was proposed in https://app.clubhouse.io/particle/story/31496/nordic-softdevice-upgrade and I didn't hear any negative feedback towards it. This naming also somewhat coincides with what we have on Photons and P1s for example, where there is a a proprietary WiFi firmware blob, which could also be considered a 'radio stack` module.