This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Failed to prepare DFU package

I'm trying to use DFU for the first time

I'm working my way through these instructions:

https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader

When I get to "Step C. Generate DFU .zip packet" I get the following

C:\nordic\nRF5_SDK_15.3.0_59ac345\nRF5SDK153059ac345\nRF5_SDK_15.3.0_59ac345\examples\peripheral\blinky\pca10056\blank\ses\Output\Release\Exe>C:\Users\TURNBODB\Downloads\Nordic\nrfutil pkg generate --hw-version 52 --application-version 1 --application blinky_pca10056.hex --sd-req 0xB8 --key-file private.key blinky_app_dfu_package.zip
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 1464, in <module>
File "click\core.py", line 764, in __call__
File "click\core.py", line 717, in main
File "click\core.py", line 1137, in invoke
File "click\core.py", line 1137, in invoke
File "click\core.py", line 956, in invoke
File "click\core.py", line 555, in invoke
File "nordicsemi\__main__.py", line 867, in generate
File "nordicsemi\dfu\package.py", line 407, in generate_package
File "nordicsemi\dfu\package.py", line 606, in normalize_firmware_to_bin
File "nordicsemi\dfu\nrfhex.py", line 187, in tobinfile
File "nordicsemi\dfu\nrfhex.py", line 152, in size
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
[14156] Failed to execute script __main__

I'm using:

SDK 15.3.0

nrfutil 5.2.0

python 3.7.4

Windows 10 Enterprise

x64-based processor

I confirmed that I could build and download the blinky program into the nRF52840-PreviewDK board without using the DFU bootloader.

Another related question:

Once I get DFU working on the dev board I'll port it over to our custom board.

We plan to use Secure DFU Bootloader over Serial Link (UART) - not downloading over BLE.

In this case what should I set the --sd-req to in the call to nrfutil?

Parents Reply Children
Related