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

nrfutil fails with " Application file not found." but return code is 0

nrfutil version 2.3.0 correctly fails with message  " Application file not found." but incorrectly sets the return code to 0

 nrfutil settings generate --family NRF52 --application _build/nrf52832_xxaa.hex --application-version 1  \

    +                                                                                 --bootloader-version  1  \

    +                                                                                 --bl-settings-version 1     settings.hex

---    starting

---------bl_dfu_sett.py- intelhex import IntelHexErrorext ed 

---------bl_dfu_sett.py-   nrfhex  star ed;      from nordicsemi.dfu.package import Package  next

 ---- package.py init_packet_pb import star next

 ---- init_packet_pb.py  --   dfu_cc_pb2 as pb  (nextline )from enum import Enum

--   dfu_cc_pb2.py  sys.version_info(major=2, minor=7, micro=16, releaselevel='final', serial=0) 

-- from protobuf/internal import enum_type_wrapper. OK added as a workaround.

----descriptor.py import api_implementation, OK workaround

 ---- init_packet_pb.py  --   dfu_cc_pb2 as pb  (nextline )from enum import Enum done

 ---- package.py init_packet_pb import star done

 ---------bl_dfu_sett.py- pc_ble_driver_py.exceptions import NordicSemiException  next

---    Dfu next

---    version next

---    ipc_ble_driver next

Error: Application file not found.

 > echo $?

0

Parents
  • Hello,

    Do you have a particular reason to use such an old nrfutil?
    I tested using nrfutil v6.1.0 (current version), and in that case nrfutil settings generate returns 1 when the application .hex file doesn't exist.

    Either way, I guess it is fixed at this point. I don't see it very likely that our nrfutil team will go back and create a new nrfutil 2.3.1 version.

    Is upgrading nrfutil an alternative for you? Or do you have another way of working around this issue? To be fair, I wasn't aware that this returned anything until now.

    Best regards,

    Edvin

  • Sorry. I didn't realize the version I was using was old.
    Thank you.

    I updated nrfutil (under Mac OS Big Sur (oops)) and now I can not longer run nrfutil !

    Jan 28 08:16 /usr/local/bin/nrfutil

    > /usr/local/bin/nrfutil

    Traceback (most recent call last): 
    File "/usr/local/bin/nrfutil", line 5, in <module> 
     from nordicsemi.__main__ import cli

     File "/usr/local/lib/python3.7/site-packages/nordicsemi/__main__.py", line 52, in <module> 
    from nordicsemi.dfu.dfu_transport_serial import DfuTransportSerial
    ...
    File "/usr/local/lib/python3.7/site-packages/serial/tools/list_ports_posix.py", line 31, in <module>
    from serial.tools.list_ports_osx import comports
    File "/usr/local/lib/python3.7/site-packages/serial/tools/list_ports_osx.py", line 32, in <module>
    kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault")

    ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found

    From the  pyserial (rather lengthly) issue at GitHub :

    It seems that Apple has removed kIOMasterPortDefault from the iokit library.

    From the macOS Big Sur release notes (https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes): ...attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail....

    github.com/pyserial/pyserial/issues/509

    Is this something that Nordic development needs to address?

    Should I create a new problem :"nrfutil fails on Mac OS Big Sur" ?

  • Try updating to python 3.8.x. I use v 3.8.7.  I don't have any knowledge with Mac OS, but please check the discussion in this ticket:

    https://devzone.nordicsemi.com/f/nordic-q-a/68518/nrfutil-on-osx-big-sur-fails-to-execute-symbol-not-found/286199#286199

    I noticed that your Big Sur release notes link is a beta release. Do you have the beta release, or the final version? If not the final, can you try to upgrade? 

    And yes, check the discussion on pyserial in the link above, and let me know if updating pySerial doesn't work either.

    Best regards,

    Edvin

Reply Children
Related