What I am trying to achieve is single-file executable for nrfutil tool, for performing DFU. I downloaded sources and built it using pyinstaller. I can succesfully create DFU package.
Problem comes, when I want to perform dfu with -f parameter (programming ic with serialization firmware). It seems, there is no serialization hex file anywhere.
C:\jobs\btle_git\nRF_tools\mergehex\Bootloader v4 - S132>nrfutil dfu ble -ic NRF52 -pkg Astute_v4_tx.zip -f
No target selected. Default device name: DfuTarg is used.
Please select connectivity serial port:
0 : COM48 - 682039986
Enter your choice: : 0
Flashing connectivity firmware...
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 675, in <module>
File "click\core.py", line 722, in __call__
File "click\core.py", line 697, in main
File "click\core.py", line 1066, in invoke
File "click\core.py", line 1066, in invoke
File "click\core.py", line 895, in invoke
File "click\core.py", line 535, in invoke
File "nordicsemi\__main__.py", line 645, in ble
File "pc_ble_driver_py\ble_driver.py", line 840, in fw_flash
File "pc_ble_driver_py\ble_driver.py", line 865, in program
File "wrapt\wrappers.py", line 561, in __call__
File "wrapt\decorators.py", line 440, in _synchronized
File "pc_ble_driver_py\ble_driver.py", line 872, in call_cmd
File "LIB\subprocess.py", line 573, in check_output
subprocess.CalledProcessError: Command '['nrfjprog', '--snr', '682039986', '--program', 'C:\\Users\\WOJCIE~1\\AppData\\L
ocal\\Temp\\_MEI80~1\\pc_ble_driver_py\\hex\\sd_api_v3\\connectivity_1.0.1_115k2_with_s132_3.0.hex', '--family', u'NRF52
']' returned non-zero exit status 51
Failed to execute script __main__
I checked "C:\Users\WOJCIE~1\AppData\Local\Temp\_MEI80~1" and there is no pc_ble_driver_py folder inside. Should I build it somehow different? Or just flash the serialization earlier. Without -f it works just fine for me.