[SOLVED] "No debuggers were discovered" error coming while flashing using nrfjprog util

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] "No debuggers were discovered" error coming while flashing using nrfjprog util

    Hi All,

    I am new in using SEGGER tools. For my current project, I am using nRF5340 DK(PCA10095 2.0.0) as my target and I wanted to flash my demo application or any existing sample application via onboard SEGGER J-Link programmer/debugger using nrfjprog. When I tried to flash my application using the command "nrfjprog -f NRF53 --program /ncs/nrf/samples/keys/hw_unique_key/build/zephyr/zephyr.hex --chiperase --log" I am getting following error: "ERROR: No debuggers were discovered."

    Note: I am doing all this from a Docker image.

    I am pasting the log taken from the nrfjprog command.

    [ info]: --------------------------------------------------------------------------------
    [ info]: nrfjprog -f NRF53 --program /ncs/nrf/samples/keys/hw_unique_key/build/zephyr/zephyr.hex --chiperase --log
    [ info]: nrfjprog version 10.17.2 external
    [ info]: --------------------------------------------------------------------------------
    [ info]: Load library at /opt/nordic/nrf-command-line-tools/lib/libnrfjprogdll.so.
    [ info]: Library loaded, loading member functions.
    [ info]: Member functions succesfully loaded.
    [debug]: [ Client] - open
    [debug]: [ Client] - start
    [ info]: [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence 41abb62e-f1f7-4172-96b8-0b5951500b3a.
    [debug]: [SeggerBackend] - Logger sink registered in Segger backend logger
    [debug]: [ JLink] - Logger sink registered in JLink logger
    [debug]: [ nRF53] - open
    [debug]: [ nRF53] - just_check_family
    [debug]: [SeggerBackend] - open_dll
    [debug]: [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
    [ info]: [SeggerBackend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.7.70.3.
    [trace]: [ Client] - Command open executed for 35 milliseconds with result 0
    [debug]: [ Client] - config
    [trace]: [ Client] - Command config executed for 1 milliseconds with result 0
    [debug]: [ Client] - enum_emu_snr
    [ info]: [SeggerBackend] - Library loaded, loading member functions.
    [ info]: [SeggerBackend] - Member functions succesfully loaded.
    [debug]: [SeggerBackend] - Set batch mode
    [debug]: [SeggerBackend] - dll_version
    [ info]: [SeggerBackend] - Segger dll version 7.70.c loaded.
    [trace]: [ Worker] - Command open executed for 33 milliseconds with result 0
    [debug]: [ nRF53] - config
    [trace]: [ Worker] - Command config executed for 1 milliseconds with result 0

    [debug]: [ nRF53] - enum_emu_con_info

    [debug]: [SeggerBackend] - is_connected_to_emu

    [debug]: [SeggerBackend] - enum_emu_con_info

    [trace]: [ Client] - Command enum_emu_con_info executed for 45 milliseconds with result 0
    [debug]: [SeggerBackend] - is_connected_to_emu

    [trace]: [ Worker] - Command enum_emu_con_info executed for 45 milliseconds with result 0

    [debug]: [ nRF53] - close

    [debug]: [SeggerBackend] - is_connected_to_emu

    [debug]: [SeggerBackend] - close

    [debug]: [SeggerBackend] - disconnect_from_emu

    [debug]: [SeggerBackend] - is_connected_to_emu

    [debug]: [SeggerBackend] - Segger Backend closed.

    [debug]: [ nRF53] - nRF family DLL closed

    [trace]: [ Client] - Command close executed for 11 milliseconds with result 0
    [debug]: [ Client] - terminate
    [trace]: [ Client] - Command terminate executed for 0 milliseconds with result 0
    [trace]: [ Worker] - Command close executed for 11 milliseconds with result 0

    [trace]: [ Worker] - Command terminate executed for 0 milliseconds with result 0

    [trace]: [ Worker] - Executed 5 commands for 90 milliseconds

    [debug]: [ Client] - Worker process exited with code: 0
    [debug]: [ Client] - Child process terminated with result 0
    [debug]: [ Client] - Worker process exited with code: 0
    [trace]: [ Client] - Executed 5 commands for 92 milliseconds
    [debug]: [ Client] - terminate


    I followed some discussions and tried to execute JLinkExe but that doesn't help but throws another error. Below is the output of that.

    SEGGER J-Link Commander V7.70c (Compiled Aug 18 2022 17:30:05)
    DLL version V7.70c, compiled Aug 18 2022 17:29:50

    Connecting to J-Link via USB..../JLinkGUIServerExe: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
    FAILED: Cannot connect to J-Link.

    Any kind of support is highly appreciated. Feel free to ask any further informations on my steps and on about the target details.

    The post was edited 2 times, last by vdb ().

  • Hi,
    Did you add the required rules file to allow J-Links to be discovered via USB?
    If you have not added the 99-jlink.rules file (part of the J-Link Software Pack) to your linux system, you would have to call any
    application using the J-Link DLL (e.g. nrfjprog) as with sudo (as super user).

    J-Link Software Pack:
    segger.com/downloads/jlink#J-L…twareAndDocumentationPack

    Could you please check this?

    On a side note:
    nrfjprog is not a SEGGER application but developed and maintained by Nordic Semiconductor.

    BR
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi fabian,

    Thank you for reply and above provided suggestion. I have not added any rules file in to the Linux system. But now I added the 99-jlink.rules file from the J-Link Software Pack to /usr/lib/udev/rules.d. But the result os the same.

    Output:
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build# cp /opt/SEGGER/JLink/99-jlink.rules /usr/lib/udev/rules.d/
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build#
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build#
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build#
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build#
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build#
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build#
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build# nrfjprog -f NRF53 --program zephyr/zephyr.hex --chiperase
    ERROR: No debuggers were discovered.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    root@fcc4c8f2d60e:/in3/c/demo/key-management/build#
  • Very much sounds like a setup issue, not a product defect.
    We recommend to try on a 2nd machine and maybe a Windows VM etc. just for testing.
    Also, for Linux we recommend to use the DEB / RPM installers instead of the tgz file, as the installers take care of the rules file and other setup.
    We will consider this thread as closed.
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.