upgradeBootloader

suspend fun upgradeBootloader(release: FirmwareRelease, hardware: DeviceHardware, target: String, asset: BootloaderDfuZip, updateState: (FirmwareUpdateState) -> Unit): FirmwareArtifact?(source)

Installs asset's SoftDevice and bootloader over Legacy DFU, waits out the bootloader's own swap, then reinstalls release's application, which staging the new images erased. Both packages are downloaded and checked before the device leaves its application, and nothing is written unless the bootloader's DIS reports the board and SoftDevice asset was built for.