This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF Connect Linux Desktop J-Link issues

Good day

I have Ubuntu 20.04.3 LTS installed on my laptop + fresh installation ( ~/.nrfconnect-apps was cleared and app reinstalled ) of nRF Connect 3.9.1

I use Bluetooth Low Energy application 3.0.0 and Programmer application 2.0.1, my tools are JLink debugger and nRF USB dongle, my target is nrf52840

1. Programmer issue

JLink is connected to target, target is powered and running. nrfjprog utility successfully flashes/erases target from command line

When I open Programmer app I am not able to select JLink ( no devices at all ) and I get log output as:

13:05:11.337 Failed to get the library versions: JLINKARM_DLL_COULD_NOT_BE_OPENED (Origin: "Failed to get module versions.")
13:05:11.427 Application data folder: /home/vvs/.config/nrfconnect/pc-nrfconnect-programmer
13:05:17.510 Error while probing devices, more details in the debug log: JLINKARM_DLL_COULD_NOT_BE_OPENED (Origin: "Error when running nrfdl_enumerate")
2. Bluetooth Low Energy issues
JLink is connected to target, target is powered and running. NRF USB dongle plugged and discovered as ttyACM device
When I open Bluetooth Low Energy app I am not able to select NRF USB dongle to use within application. I get this log output:
13:57:38.286 Failed to get the library versions: JLINKARM_DLL_COULD_NOT_BE_OPENED (Origin: "Failed to get module versions.")
13:57:38.463 Application data folder: /home/vvs/.config/nrfconnect/pc-nrfconnect-ble
13:57:44.536 Error while probing devices, more details in the debug log: JLINKARM_DLL_COULD_NOT_BE_OPENED (Origin: "Error when running nrfdl_enumerate")
As soon as JLink disconnected and Bluetooth Low Energy app relaunched it NRF USB dongle becomes available in select device section
Please advise hot to overcome this - or did I miss something ?
Thank you
 
  • If I use the command you ask to execute I get such output to log

    [2021-Dec-15 18:13:46] [ info] --------------------------------------------------------------------------------
    [2021-Dec-15 18:13:46] [ info] nrfjprog --memrd 0 -f nrf52 --log 
    [2021-Dec-15 18:13:46] [ info] nrfjprog version 10.12.1 
    [2021-Dec-15 18:13:46] [ info] --------------------------------------------------------------------------------
    [2021-Dec-15 18:13:46] [debug] [ nRF0x0] - open_dll
    [2021-Dec-15 18:13:46] [ info] [ nRF0x0] - Load library at /opt/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.so.
    [2021-Dec-15 18:13:46] [ info] [ nRF0x0] - Library loaded, loading member functions.
    [2021-Dec-15 18:13:46] [ info] [ nRF0x0] - Member functions succesfully loaded.
    [2021-Dec-15 18:13:46] [ info] [Backend] - Logger callback at 0x55e38e9b1130 registered in Segger backend logger.
    [2021-Dec-15 18:13:46] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0x55e38e9b1130 registered in JLink logger.
    [2021-Dec-15 18:13:46] [debug] [nRF520x0] - open
    [2021-Dec-15 18:13:46] [debug] [Backend] - open_dll
    [2021-Dec-15 18:13:46] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
    [2021-Dec-15 18:13:46] [ info] [Backend] - Load library at libjlinkarm.so.
    [2021-Dec-15 18:13:46] [ info] [Backend] - Dll failed to open.
    [2021-Dec-15 18:13:46] [debug] [Backend] - close
    [2021-Dec-15 18:13:46] [debug] [Backend] - Segger Backend closed.
    [2021-Dec-15 18:13:46] [debug] [nRF520x0] - close
    [2021-Dec-15 18:13:46] [debug] [nRF520x0] - nRF family DLL closed
    [2021-Dec-15 18:13:46] [debug] [ nRF0x0] - close_dll

    From other hand if I specify exact path to JLink dll like:

    nrfjprog --jdll <project path>/nrf-tools/JLink_Linux_V688a_x86_64/libjlinkarm.so --memrd 0 -f nrf52

    I get valid output like

    0x00000000: 20000400

  • Hi,

     

    swisst said:
    12:43:14.681 Application data folder: /home/vvs/.config/nrfconnect/pc-nrfconnect-programmer
    12:43:14.722 Using nrfjprog library 10.12.1, pc-nrfjprog-js 1.7.6
    12:43:23.940 Using nrfjprog to communicate with target
    12:43:23.944 Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: Unknown value (ffffff5e)
    swisst said:
    From other hand if I specify exact path to JLink dll like:

    It seems that you are the victim of a bug with the older nrfjprog:

    https://devzone.nordicsemi.com/f/nordic-q-a/64956/nrfjprog-on-linux-support-for-ld_library_path-broken-from-10-5-0-onwards-and-opt-segger-jlink-hardcoded-instead

    It expects the libjlinkarm.so to be in $PATH or at /opt/SEGGER/JLink.

    If you symlink your path/to/nrf-tools/JLink_Linux_V688..../ to /opt/SEGGER/JLink, it should be able to pick it up in nrf connect for desktop as well. This issue is fixed in newer versions of nrfjprog.

     

    Kind regards,

    Håkon

Related