nrfutil not working on M1

Hi,

I am using a M1 and I've installed the flashing scripts. But I am getting the following errors.

As I've already figured out it is a bug in https://github.com/NordicSemiconductor/pc-ble-driver/pull/271

And although it is merged into the master it is still not available via pip3. Any other solution to get the bug fix?

Kind regards,

C.W.

raceback (most recent call last):
  File "/opt/homebrew/bin/nrfutil", line 8, in <module>
    sys.exit(cli())
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/nordicsemi/__main__.py", line 389, in generate
    sett.generate(arch=family, app_file=application, app_ver=application_version_internal, bl_ver=bootloader_version,
  File "/opt/homebrew/lib/python3.9/site-packages/nordicsemi/dfu/bl_dfu_sett.py", line 203, in generate
    self.app_bin = Package.normalize_firmware_to_bin(self.temp_dir, app_file)
  File "/opt/homebrew/lib/python3.9/site-packages/nordicsemi/dfu/package.py", line 605, in normalize_firmware_to_bin
    temp = nRFHex(firmware_path)
  File "/opt/homebrew/lib/python3.9/site-packages/nordicsemi/dfu/nrfhex.py", line 77, in __init__
    self.loadfile(source, self.file_format)
  File "/opt/homebrew/lib/python3.9/site-packages/nordicsemi/dfu/intelhex/__init__.py", line 243, in loadfile
    self.loadhex(fobj)
  File "/opt/homebrew/lib/python3.9/site-packages/nordicsemi/dfu/intelhex/__init__.py", line 206, in loadhex
    decode(s, line)
  File "/opt/homebrew/lib/python3.9/site-packages/nordicsemi/dfu/intelhex/__init__.py", line 137, in _decode_record
    for i in xrange(4, 4+record_length):
NameError: name 'xrange' is not defined

Related