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

NORDIC52840 DFU

Hi,Guys

I met a problem when I study the Nordic DFU following the nordic DFU guideline, but chocked by generating the ZIP pakage.When I use the nrfutil commond, it couldn't generate ZIP

nrfutil pkg generate --hw-version 52 --application-version 1 --application nrf52832_xxaa.hex --sd-req 0x98 --key-file private.key app_dfu_package.zip

The reported error:

$ nrfutil pkg generate --hw-version 52 --application-version 1 --application app.hex --sd-req 0xAE --key-file private.key app_dfu_package.zip
Traceback (most recent call last):
File "C:\Python\Scripts\nrfutil-script.py", line 11, in <module>
load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
File "c:\python\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "c:\python\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\python\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\python\lib\site-packages\nordicsemi\__main__.py", line 881, in generate
package.generate_package(zipfile_path)
File "c:\python\lib\site-packages\nordicsemi\dfu\package.py", line 414, in generate_package
Package.normalize_firmware_to_bin(self.work_dir, firmware_data[FirmwareKeys.FIRMWARE_FILENAME])
File "c:\python\lib\site-packages\nordicsemi\dfu\package.py", line 615, in normalize_firmware_to_bin
temp.tobinfile(new_filepath)
File "c:\python\lib\site-packages\nordicsemi\dfu\nrfhex.py", line 181, in tobinfile
start_address = self.minaddr()
File "c:\python\lib\site-packages\nordicsemi\dfu\nrfhex.py", line 135, in minaddr
min_address = max(self.get_mbr_end_address(), min_address)
TypeError: '>' not supported between instances of 'NoneType' and 'int'

I put the privait.key, app.hex bootloader.hex,softdevice.hex in the same location. It seems that there is something wrong with the Python, but I don't know what is, Iinstalled python3.7.4.

Can anyone help me? Thanks.

Related