Is it possible to generate a DFU package for both bootloader-only and fully-programmed (bootloader, softdevice, and app) chips?
I'm unable to do so for an nrf52833 using nrfutil version 6.1.0.
Here's how I generate the package:
nrfutil pkg generate \
--hw-version 52 \
--sd-req 0x00,0xCA \
--sd-id 0xCA \
--application _build/app.hex \
--application-version-string 0.0.0 \
--softdevice /Users/dev/Downloads/nRF5_SDK_17.0.0_9d13099/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex \
--key-file app.pem \
_build/app_dfu.zip
(nrfutil pkg display app_dfu.zip follows at end of post.)
This flashes fine to a bootloader-only chip.
But when I try to flash again, I get
pc_ble_driver_py.exceptions.NordicSemiException: Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.
However, the memory at 0x0000300C shows 0xffff00CA, indicating that the expected softdevice has been programmed fine.
Am I misunderstanding something?
Here is the output of nrfutil pkg display.
DFU Package: <_build/app_dfu.zip>:
|
|- Image count: 2
|
|- Image #0:
|- Type: softdevice
|- Image file: s140_nrf52_7.0.1_softdevice.bin
|- Init packet file: s140_nrf52_7.0.1_softdevice.dat
|
|- op_code: INIT
|- signature_type: ECDSA_P256_SHA256
|- signature (little-endian): b'f420bf315bc80e8f4d8c1ef77239588d758949fd8e87c0f785e5b1f5805ad58567a0122ecf2cef74d7d5455d520553d89bf24f246990b0cf4a52d07f35f5d7f9'
|
|- fw_version: 0xFFFFFFFF (4294967295)
|- hw_version 0x00000034 (52)
|- sd_req: 0x00, 0xCA
|- type: SOFTDEVICE
|- sd_size: 152984
|- bl_size: 0
|- app_size: 0
|
|- hash_type: SHA256
|- hash (little-endian): b'b48b4dc06490f8e1d5fad5804b1718c47487ba463a5325cfb8dcb8b460ee9f93'
|
|- boot_validation_type: ['VALIDATE_GENERATED_CRC']
|- boot_validation_signature (little-endian): [b'']
|
|- is_debug: False
|
|- Image #1:
|- Type: application
|- Image file: app.bin
|- Init packet file: app.dat
|
|- op_code: INIT
|- signature_type: ECDSA_P256_SHA256
|- signature (little-endian): b'39b73aba0b5414408a55b74114a9f4a7f1f4a49e2bfc92439a0bcef5c10f0515522a57ee3a026a5af00f90cb443d3cdaf65bdc66b658897f02643bb4d4dc3226'
|
|- fw_version: 0x00000000 (0)
|- hw_version 0x00000034 (52)
|- sd_req: 0xCA
|- type: APPLICATION
|- sd_size: 0
|- bl_size: 0
|- app_size: 86924
|
|- hash_type: SHA256
|- hash (little-endian): b'58c0dff1f5c10bd17478b9f776d59daaac9177ad3f174f98f2dd894dd7ade1da'
|
|- boot_validation_type: ['VALIDATE_GENERATED_CRC']
|- boot_validation_signature (little-endian): [b'']
|
|- is_debug: False