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

nRF Command Line Tools 10.13.0, 10.12.0 missing JLinkARM.dll

Hello Nordic Devzone Community,

I'm having some trouble install nRF Command Line Tools on a 64-bit Linux host. From Nordic's page www.nordicsemi.com/.../download I've downloaded version 10.13.0, and then 10.12.0. SHA256 sums verify correctly. For some reason 10.14.0 is not available even though there is a selectable radio button for this version. These tools install in /opt. Updating my $PATH variable I can confirm the version of nrfjprog which is now installed:

$ nrfjprog --version

nrfjprog version: 10.12.2

JLinkARM.dll version: 6.88a

When I attempt to program a Zephyr app to a sparkfun_thing_plus_nrf9160 development board, I keep seeing the error message "JLinkARM.dll . . .  JLINK_OpenEx(...) failed to open DLL".

Both 10.13.0 and 10.12.0 show this behavior.  When working in a Linux environment is it not correct to follow the install steps?:

   *  unzip nRF-Command-Line-Tools_10_12_2_Linux-amd64.zip

   *  tar xvzf nRF-Command-Line-Tools_10_12_2_Linux-amd64.tar.gz

   *  sudo dpkg -i JLink_Linux_V750a_x86_64.deb   nRF-Command-Line-Tools_10_13_0_Linux-amd64.deb

Dragging and dropping full log file here . . .

- Ted

# Attempting to run nrfjprog version 10.13.0:
[2021-Sept-02 19:03:48] [ info] --------------------------------------------------------------------------------
[2021-Sept-02 19:03:48] [ info] nrfjprog --program /home/guest/embedded/z1-sandbox-2021-08-26/kionix-driver-demo/build/zephyr/merged.hex --sectorerase -f NRF91 --snr 59104091 --log 
[2021-Sept-02 19:03:48] [ info] nrfjprog version 10.13.0 
[2021-Sept-02 19:03:48] [ info] --------------------------------------------------------------------------------
[2021-Sept-02 19:03:48] [ info] Load library at /opt/nrfjprog/libnrfjprogdll.so.
[2021-Sept-02 19:03:48] [ info] Library loaded, loading member functions.
[2021-Sept-02 19:03:48] [ info] Member functions succesfully loaded.
[2021-Sept-02 19:03:48] [debug] [ Client] - open
[2021-Sept-02 19:03:48] [debug] [ Client] - start
[2021-Sept-02 19:03:48] [trace] [ Client] - Command open executed for 1 milliseconds with result 0
[2021-Sept-02 19:03:48] [debug] [ Client] - enum_emu_snr
[2021-Sept-02 19:03:48] [ info] [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence cc8adcde-97e5-4128-959c-77aec6ea0e82.
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - Logger sink registered in Segger backend logger
[2021-Sept-02 19:03:48] [debug] [  JLink] - Logger sink registered in JLink logger
[2021-Sept-02 19:03:48] [debug] [  nRF91] - open
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - open_dll
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Sept-02 19:03:48] [ info] [SeggerBackend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.7.
[2021-Sept-02 19:03:48] [ info] [SeggerBackend] - Library loaded, loading member functions.
[2021-Sept-02 19:03:48] [ info] [SeggerBackend] - Member functions succesfully loaded.
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - dll_version
[2021-Sept-02 19:03:48] [ info] [SeggerBackend] - Segger dll version 7.50.a loaded.
[2021-Sept-02 19:03:48] [trace] [ Worker] - Command open executed for 1 milliseconds with result 0
[2021-Sept-02 19:03:48] [debug] [  nRF91] - enum_emu_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - enum_emu_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - ---just_enum_emu_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - ---just_get_num_emus
[2021-Sept-02 19:03:48] [trace] [ Client] - Command enum_emu_snr executed for 88 milliseconds with result 0
[2021-Sept-02 19:03:48] [debug] [ Client] - connect_to_emu_with_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:03:48] [trace] [ Worker] - Command enum_emu_snr executed for 88 milliseconds with result 0
[2021-Sept-02 19:03:48] [debug] [  nRF91] - connect_to_emu_with_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - connect_to_emu_with_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - ---just_enum_emu_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - ---just_get_num_emus
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - ---just_connect_to_emu_with_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - ---just_connect_to_emu_without_snr
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - Segger logging enabled.
[2021-Sept-02 19:03:48] [trace] [  JLink] -    ***** Error: 
[2021-Sept-02 19:03:48] [trace] [  JLink] - Cannot connect to J-Link.
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 73.444ms returns "Cannot connect to J-Link."  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Cannot connect to J-Link.'
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_OpenEx(...)  
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 67.289ms returns "Failed to open DLL"  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Failed to open DLL'
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_OpenEx(...)  
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 62.642ms returns "Failed to open DLL"  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Failed to open DLL'
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_OpenEx(...)  
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 60.873ms returns "Failed to open DLL"  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Failed to open DLL'
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_OpenEx(...)  
[2021-Sept-02 19:03:48] [trace] [ Client] - Command connect_to_emu_with_snr executed for 448 milliseconds with result -102
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 61.803ms returns "Failed to open DLL"  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Failed to open DLL'
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_IsOpen()  
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 0.002ms returns 0x00  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [trace] [ Worker] - Command connect_to_emu_with_snr executed for 448 milliseconds with result -102
[2021-Sept-02 19:03:48] [debug] [  nRF91] - close
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_device
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_IsOpen()  
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 0.003ms returns 0x00  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [error] [SeggerBackend] - Cannot call is_connected_to_device when connect_to_emu_without_snr or connect_to_emu_with_snr has not been called.
[2021-Sept-02 19:03:48] [debug] [  nRF91] - close
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_IsOpen()  
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 0.003ms returns 0x00  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - close
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - disconnect_from_emu
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_IsOpen()  
[2021-Sept-02 19:03:48] [trace] [  JLink] - - 0.002ms returns 0x00  
[2021-Sept-02 19:03:48] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:03:48] [debug] [SeggerBackend] - Segger Backend closed.
[2021-Sept-02 19:03:48] [debug] [  nRF91] - nRF family DLL closed
[2021-Sept-02 19:03:48] [trace] [ Client] - Command close executed for 10 milliseconds with result 0
[2021-Sept-02 19:03:48] [debug] [ Client] - terminate
[2021-Sept-02 19:03:48] [trace] [ Client] - Command terminate executed for 0 milliseconds with result 0
[2021-Sept-02 19:03:48] [trace] [ Worker] - Command close executed for 10 milliseconds with result 0
[2021-Sept-02 19:03:48] [trace] [ Worker] - Command terminate executed for 0 milliseconds with result 0
[2021-Sept-02 19:03:48] [trace] [ Worker] - Executed 5 commands for 547 milliseconds
[2021-Sept-02 19:03:48] [debug] [ Client] - Child process terminated with result 0
[2021-Sept-02 19:03:48] [trace] [ Client] - Executed 5 commands for 547 milliseconds
[2021-Sept-02 19:03:48] [debug] [ Client] - terminate
[2021-Sept-02 19:04:11] [ info] --------------------------------------------------------------------------------
[2021-Sept-02 19:04:11] [ info] nrfjprog --program /home/guest/embedded/z1-sandbox-2021-08-26/kionix-driver-demo/build/zephyr/merged.hex --sectorerase -f NRF91 --snr 59104091 --log 
[2021-Sept-02 19:04:11] [ info] nrfjprog version 10.13.0 
[2021-Sept-02 19:04:11] [ info] --------------------------------------------------------------------------------
[2021-Sept-02 19:04:11] [ info] Load library at /opt/nrfjprog/libnrfjprogdll.so.
[2021-Sept-02 19:04:11] [ info] Library loaded, loading member functions.
[2021-Sept-02 19:04:11] [ info] Member functions succesfully loaded.
[2021-Sept-02 19:04:11] [debug] [ Client] - open
[2021-Sept-02 19:04:11] [debug] [ Client] - start
[2021-Sept-02 19:04:11] [ info] [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence 43b41f67-8448-4058-99c1-6890dcc6aed3.
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - Logger sink registered in Segger backend logger
[2021-Sept-02 19:04:11] [debug] [  JLink] - Logger sink registered in JLink logger
[2021-Sept-02 19:04:11] [debug] [  nRF91] - open
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - open_dll
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Sept-02 19:04:11] [ info] [SeggerBackend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.7.
[2021-Sept-02 19:04:11] [trace] [ Client] - Command open executed for 32 milliseconds with result 0
[2021-Sept-02 19:04:11] [debug] [ Client] - enum_emu_snr
[2021-Sept-02 19:04:11] [ info] [SeggerBackend] - Library loaded, loading member functions.
[2021-Sept-02 19:04:11] [ info] [SeggerBackend] - Member functions succesfully loaded.
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - dll_version
[2021-Sept-02 19:04:11] [ info] [SeggerBackend] - Segger dll version 7.50.a loaded.
[2021-Sept-02 19:04:11] [trace] [ Worker] - Command open executed for 32 milliseconds with result 0
[2021-Sept-02 19:04:11] [debug] [  nRF91] - enum_emu_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - enum_emu_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - ---just_enum_emu_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - ---just_get_num_emus
[2021-Sept-02 19:04:11] [trace] [ Client] - Command enum_emu_snr executed for 77 milliseconds with result 0
[2021-Sept-02 19:04:11] [debug] [ Client] - connect_to_emu_with_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:04:11] [trace] [ Worker] - Command enum_emu_snr executed for 77 milliseconds with result 0
[2021-Sept-02 19:04:11] [debug] [  nRF91] - connect_to_emu_with_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - connect_to_emu_with_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - ---just_enum_emu_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - ---just_get_num_emus
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - ---just_connect_to_emu_with_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - ---just_connect_to_emu_without_snr
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - Segger logging enabled.
[2021-Sept-02 19:04:11] [trace] [  JLink] -    ***** Error: 
[2021-Sept-02 19:04:11] [trace] [  JLink] - Cannot connect to J-Link.
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 74.589ms returns "Cannot connect to J-Link."  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Cannot connect to J-Link.'
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_OpenEx(...)  
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 64.085ms returns "Failed to open DLL"  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Failed to open DLL'
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_OpenEx(...)  
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 60.535ms returns "Failed to open DLL"  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Failed to open DLL'
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_OpenEx(...)  
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 65.709ms returns "Failed to open DLL"  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Failed to open DLL'
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_OpenEx(...)  
[2021-Sept-02 19:04:11] [trace] [ Client] - Command connect_to_emu_with_snr executed for 463 milliseconds with result -102
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 59.516ms returns "Failed to open DLL"  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [error] [SeggerBackend] - JLinkARM.dll Open returned error 'Failed to open DLL'
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_IsOpen()  
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 0.003ms returns 0x00  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [trace] [ Worker] - Command connect_to_emu_with_snr executed for 463 milliseconds with result -102
[2021-Sept-02 19:04:11] [debug] [  nRF91] - close
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_device
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_IsOpen()  
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 0.004ms returns 0x00  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [error] [SeggerBackend] - Cannot call is_connected_to_device when connect_to_emu_without_snr or connect_to_emu_with_snr has not been called.
[2021-Sept-02 19:04:11] [debug] [  nRF91] - close
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_IsOpen()  
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 0.003ms returns 0x00  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - close
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - disconnect_from_emu
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - is_connected_to_emu
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_IsOpen()  
[2021-Sept-02 19:04:11] [trace] [  JLink] - - 0.003ms returns 0x00  
[2021-Sept-02 19:04:11] [trace] [  JLink] - JLINK_HasError()  
[2021-Sept-02 19:04:11] [debug] [SeggerBackend] - Segger Backend closed.
[2021-Sept-02 19:04:11] [debug] [  nRF91] - nRF family DLL closed
[2021-Sept-02 19:04:11] [trace] [ Client] - Command close executed for 10 milliseconds with result 0
[2021-Sept-02 19:04:11] [debug] [ Client] - terminate
[2021-Sept-02 19:04:11] [trace] [ Client] - Command terminate executed for 0 milliseconds with result 0
[2021-Sept-02 19:04:11] [trace] [ Worker] - Command close executed for 10 milliseconds with result 0
[2021-Sept-02 19:04:11] [trace] [ Worker] - Command terminate executed for 0 milliseconds with result 0
[2021-Sept-02 19:04:11] [trace] [ Worker] - Executed 5 commands for 582 milliseconds
[2021-Sept-02 19:04:11] [debug] [ Client] - Child process terminated with result 0
[2021-Sept-02 19:04:11] [trace] [ Client] - Executed 5 commands for 582 milliseconds
[2021-Sept-02 19:04:11] [debug] [ Client] - terminate


# Attemping to flash sparkfun_thing_plus_nrf9160 board with nrfjprog version 10.12.0:
[2021-Sept-02 19:51:51] [ info] --------------------------------------------------------------------------------
[2021-Sept-02 19:51:51] [ info] nrfjprog --program /home/cpguest/embedded/z1-sandbox-2021-08-26/kionix-driver-demo/build/zephyr/merged.hex --sectorerase -f NRF91 --snr 59104091 --log 
[2021-Sept-02 19:51:51] [ info] nrfjprog version 10.12.2 
[2021-Sept-02 19:51:51] [ info] --------------------------------------------------------------------------------
[2021-Sept-02 19:51:51] [debug] [ nRF0x0] - open_dll
[2021-Sept-02 19:51:51] [ info] [ nRF0x0] - Load library at /opt/nrfjprog/libjlinkarm_nrf91_nrfjprogdll.so.
[2021-Sept-02 19:51:51] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2021-Sept-02 19:51:51] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2021-Sept-02 19:51:51] [ info] [Backend] - Logger callback at 0x564fa3bb4150 registered in Segger backend logger.
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0x564fa3bb4150 registered in JLink logger.
[2021-Sept-02 19:51:51] [debug] [nRF910x0] - open
[2021-Sept-02 19:51:51] [debug] [Backend] - open_dll
[2021-Sept-02 19:51:51] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Sept-02 19:51:51] [ info] [Backend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.6.88.1.
[2021-Sept-02 19:51:51] [ info] [Backend] - Library loaded, loading member functions.
[2021-Sept-02 19:51:51] [ info] [Backend] - Member functions succesfully loaded.
[2021-Sept-02 19:51:51] [debug] [Backend] - dll_version
[2021-Sept-02 19:51:51] [ info] [Backend] - Segger dll version 6.88.a loaded.
[2021-Sept-02 19:51:51] [debug] [ nRF0x0] - enum_emu_snr
[2021-Sept-02 19:51:51] [debug] [nRF910x0] - enum_emu_snr
[2021-Sept-02 19:51:51] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:51:51] [debug] [Backend] - enum_emu_snr
[2021-Sept-02 19:51:51] [debug] [Backend] - ---just_enum_emu_snr
[2021-Sept-02 19:51:51] [debug] [Backend] - ---just_get_num_emus
[2021-Sept-02 19:51:51] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:51:51] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Sept-02 19:51:51] [debug] [nRF910x0] - connect_to_emu_with_snr
[2021-Sept-02 19:51:51] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:51:51] [debug] [Backend] - connect_to_emu_with_snr
[2021-Sept-02 19:51:51] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:51:51] [debug] [Backend] - ---just_enum_emu_snr
[2021-Sept-02 19:51:51] [debug] [Backend] - ---just_get_num_emus
[2021-Sept-02 19:51:51] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Sept-02 19:51:51] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Sept-02 19:51:51] [ info] [Backend] - Segger logging enabled.
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ]    ***** Error: 
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] Cannot connect to J-Link.
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] - 71.584ms returns "Cannot connect to J-Link."  
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Sept-02 19:51:51] [ info] [Backend] - JLinkARM.dll Open returned error 'Cannot connect to J-Link.'
[2021-Sept-02 19:51:51] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] - 0.003ms returns 0x00  
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Sept-02 19:51:51] [debug] [ nRF0x0] - close_dll
[2021-Sept-02 19:51:51] [debug] [nRF910x0] - close
[2021-Sept-02 19:51:51] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] - 0.003ms returns 0x00  
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Sept-02 19:51:51] [debug] [Backend] - close
[2021-Sept-02 19:51:51] [debug] [Backend] - disconnect_from_emu
[2021-Sept-02 19:51:51] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] - 0.004ms returns 0x00  
[2021-Sept-02 19:51:51] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Sept-02 19:51:51] [debug] [Backend] - Segger Backend closed.
[2021-Sept-02 19:51:51] [debug] [nRF910x0] - nRF family DLL closed


# Preceding last command with `sudo`:
[2021-Sept-02 19:53:48] [ info] --------------------------------------------------------------------------------
[2021-Sept-02 19:53:48] [ info] nrfjprog --program /home/cpguest/embedded/z1-sandbox-2021-08-26/kionix-driver-demo/build/zephyr/merged.hex --sectorerase -f NRF91 --snr 59104091 --log 
[2021-Sept-02 19:53:48] [ info] nrfjprog version 10.12.2 
[2021-Sept-02 19:53:48] [ info] --------------------------------------------------------------------------------
[2021-Sept-02 19:53:48] [debug] [ nRF0x0] - open_dll
[2021-Sept-02 19:53:48] [ info] [ nRF0x0] - Load library at /opt/nrfjprog/libjlinkarm_nrf91_nrfjprogdll.so.
[2021-Sept-02 19:53:48] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2021-Sept-02 19:53:48] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2021-Sept-02 19:53:48] [ info] [Backend] - Logger callback at 0x55b2a6497150 registered in Segger backend logger.
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0x55b2a6497150 registered in JLink logger.
[2021-Sept-02 19:53:48] [debug] [nRF910x0] - open
[2021-Sept-02 19:53:48] [debug] [Backend] - open_dll
[2021-Sept-02 19:53:48] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Sept-02 19:53:48] [ info] [Backend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.6.88.1.
[2021-Sept-02 19:53:48] [ info] [Backend] - Library loaded, loading member functions.
[2021-Sept-02 19:53:48] [ info] [Backend] - Member functions succesfully loaded.
[2021-Sept-02 19:53:48] [debug] [Backend] - dll_version
[2021-Sept-02 19:53:48] [ info] [Backend] - Segger dll version 6.88.a loaded.
[2021-Sept-02 19:53:48] [debug] [ nRF0x0] - enum_emu_snr
[2021-Sept-02 19:53:48] [debug] [nRF910x0] - enum_emu_snr
[2021-Sept-02 19:53:48] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:53:48] [debug] [Backend] - enum_emu_snr
[2021-Sept-02 19:53:48] [debug] [Backend] - ---just_enum_emu_snr
[2021-Sept-02 19:53:48] [debug] [Backend] - ---just_get_num_emus
[2021-Sept-02 19:53:48] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:53:48] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Sept-02 19:53:48] [debug] [nRF910x0] - connect_to_emu_with_snr
[2021-Sept-02 19:53:48] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:53:48] [debug] [Backend] - connect_to_emu_with_snr
[2021-Sept-02 19:53:48] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:53:48] [debug] [Backend] - ---just_enum_emu_snr
[2021-Sept-02 19:53:48] [debug] [Backend] - ---just_get_num_emus
[2021-Sept-02 19:53:48] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Sept-02 19:53:48] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Sept-02 19:53:48] [ info] [Backend] - Segger logging enabled.
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ]    ***** Error: 
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] Cannot connect to J-Link.
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] - 83.261ms returns "Cannot connect to J-Link."  
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Sept-02 19:53:48] [ info] [Backend] - JLinkARM.dll Open returned error 'Cannot connect to J-Link.'
[2021-Sept-02 19:53:48] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] - 0.016ms returns 0x00  
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Sept-02 19:53:48] [debug] [ nRF0x0] - close_dll
[2021-Sept-02 19:53:48] [debug] [nRF910x0] - close
[2021-Sept-02 19:53:48] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] - 0.016ms returns 0x00  
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Sept-02 19:53:48] [debug] [Backend] - close
[2021-Sept-02 19:53:48] [debug] [Backend] - disconnect_from_emu
[2021-Sept-02 19:53:48] [debug] [Backend] - is_connected_to_emu
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] - 0.015ms returns 0x00  
[2021-Sept-02 19:53:48] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Sept-02 19:53:48] [debug] [Backend] - Segger Backend closed.
[2021-Sept-02 19:53:48] [debug] [nRF910x0] - nRF family DLL closed

Parents
  • Hi Ted

    Can you double check that the DK is connected to the linux vm machine by using the command "lsusb"?

    Could you also post the contents of the following?

    ls -l /opt/SEGGER/JLink

    Regards,
    Sigurd Hellesvik

  • Hello Sigurd,

    By "DK is connected" to what device do you refer?  I had not mentioned that my target board is sparkfun_thing_plus_nrf9160.  I also happen to have a Nordic nRF9160 DK board, but the Sparkfun Thing Plus is much simpler and much closer to the hardware path I am taking in my current project.

    When I attach a Segger JLink programmer + debugger, here is what a USB listing in my virtual machine Ubuntu host reports:

    guest@ubuntu-vm-0p2:~/embedded/ncs/v1.6.1/nrf/samples/nrf9160/at_client$ lsusb
    Bus 001 Device 004: ID 1366:0101 SEGGER J-Link PLUS
    Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
    Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

    The contents of /opt/SEGGER are:

    guest@ubuntu-vm-0p2:/opt/SEGGER$ ls JLink
    Devices        JFlashSPICLExe       JLinkGDBServerExe       JLinkRemoteServerCLExe  JLinkSTM32           JTAGLoadExe                libQtCore.so        libQtGui.so.4.8.7
    Doc            JFlashSPIExe         JLinkGUIServerExe       JLinkRemoteServerExe    JLinkSTM32Exe        libjlinkarm.so             libQtCore.so.4      Samples
    ETC            JLinkConfigExe       JLinkLicenseManager     JLinkRTTClient          JLinkSWOViewer       libjlinkarm.so.6           libQtCore.so.4.8    ThirdParty
    GDBServer      JLinkDevices.xml     JLinkLicenseManagerExe  JLinkRTTClientExe       JLinkSWOViewerCLExe  libjlinkarm.so.6.88.1      libQtCore.so.4.8.7  x86
    JFlashExe      JLinkExe             JLinkRegistration       JLinkRTTLogger          JLinkSWOViewerExe    libjlinkarm_x86.so         libQtGui.so
    JFlashLiteExe  JLinkGDBServer       JLinkRegistrationExe    JLinkRTTLoggerExe       JMemExe              libjlinkarm_x86.so.6       libQtGui.so.4
    JFlashSPI_CL   JLinkGDBServerCLExe  JLinkRemoteServer       JLinkRTTViewerExe       JRunExe              libjlinkarm_x86.so.6.88.1  libQtGui.so.4.8
    
    guest@ubuntu-vm-0p2:/opt/SEGGER$

    One thing I will point out, my Ubuntu 20.04 virtual machine is running within Windows 10.  I cannot find a working driver for Windows 10 for the Sparkfun's CP2102 USB to serial chip.  So on this particular host arrangement, I won't be able to program the Sparkfun board.  However, the virtual machine is a full Ubuntu install, as complete and functional as a physical Ubuntu host where I have all the same Nordic build tools and SDK installed.  I carefully noted each link and set of install instructions to obtain the same toolchain on both hosts.  Work IT policies keep me from working more freely with Linux at work, but that aside my goal is to use `west`, `cmake` and Bash command line as my build, flash and debug environment.

    These command line tools have so far allowed me to compile, flash and interact with Nordic sample apps on a couple of nRF9160 based development boards.  So far however I've pretty much programmed all my samples and simple tests via MCUBootloader.  Project needs now compel me to move to a physical programmer and debugger, and away from MCUBootloader.

    Will I be able to use `nrfjprog` independent of Segger's Integrated Development Environment?  That is not my first choice for a development environment.  I am working to stay at Linux' command line for simplicity and toolchain reproducibility motivations.

    Thank you!

    - Ted

Reply
  • Hello Sigurd,

    By "DK is connected" to what device do you refer?  I had not mentioned that my target board is sparkfun_thing_plus_nrf9160.  I also happen to have a Nordic nRF9160 DK board, but the Sparkfun Thing Plus is much simpler and much closer to the hardware path I am taking in my current project.

    When I attach a Segger JLink programmer + debugger, here is what a USB listing in my virtual machine Ubuntu host reports:

    guest@ubuntu-vm-0p2:~/embedded/ncs/v1.6.1/nrf/samples/nrf9160/at_client$ lsusb
    Bus 001 Device 004: ID 1366:0101 SEGGER J-Link PLUS
    Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
    Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

    The contents of /opt/SEGGER are:

    guest@ubuntu-vm-0p2:/opt/SEGGER$ ls JLink
    Devices        JFlashSPICLExe       JLinkGDBServerExe       JLinkRemoteServerCLExe  JLinkSTM32           JTAGLoadExe                libQtCore.so        libQtGui.so.4.8.7
    Doc            JFlashSPIExe         JLinkGUIServerExe       JLinkRemoteServerExe    JLinkSTM32Exe        libjlinkarm.so             libQtCore.so.4      Samples
    ETC            JLinkConfigExe       JLinkLicenseManager     JLinkRTTClient          JLinkSWOViewer       libjlinkarm.so.6           libQtCore.so.4.8    ThirdParty
    GDBServer      JLinkDevices.xml     JLinkLicenseManagerExe  JLinkRTTClientExe       JLinkSWOViewerCLExe  libjlinkarm.so.6.88.1      libQtCore.so.4.8.7  x86
    JFlashExe      JLinkExe             JLinkRegistration       JLinkRTTLogger          JLinkSWOViewerExe    libjlinkarm_x86.so         libQtGui.so
    JFlashLiteExe  JLinkGDBServer       JLinkRegistrationExe    JLinkRTTLoggerExe       JMemExe              libjlinkarm_x86.so.6       libQtGui.so.4
    JFlashSPI_CL   JLinkGDBServerCLExe  JLinkRemoteServer       JLinkRTTViewerExe       JRunExe              libjlinkarm_x86.so.6.88.1  libQtGui.so.4.8
    
    guest@ubuntu-vm-0p2:/opt/SEGGER$

    One thing I will point out, my Ubuntu 20.04 virtual machine is running within Windows 10.  I cannot find a working driver for Windows 10 for the Sparkfun's CP2102 USB to serial chip.  So on this particular host arrangement, I won't be able to program the Sparkfun board.  However, the virtual machine is a full Ubuntu install, as complete and functional as a physical Ubuntu host where I have all the same Nordic build tools and SDK installed.  I carefully noted each link and set of install instructions to obtain the same toolchain on both hosts.  Work IT policies keep me from working more freely with Linux at work, but that aside my goal is to use `west`, `cmake` and Bash command line as my build, flash and debug environment.

    These command line tools have so far allowed me to compile, flash and interact with Nordic sample apps on a couple of nRF9160 based development boards.  So far however I've pretty much programmed all my samples and simple tests via MCUBootloader.  Project needs now compel me to move to a physical programmer and debugger, and away from MCUBootloader.

    Will I be able to use `nrfjprog` independent of Segger's Integrated Development Environment?  That is not my first choice for a development environment.  I am working to stay at Linux' command line for simplicity and toolchain reproducibility motivations.

    Thank you!

    - Ted

Children
  • Hi Ted

    tedhavelka said:
    By "DK is connected" to what device do you refer?  I had not mentioned that my target board is sparkfun_thing_plus_nrf9160.

    Im sorry, I mistyped here. 

    "lsusb" list SEGGER J-Link PLUS, which is a segger device connected to the virtual machine. This is likely the Sparkfun Thing Plus.

    In the sparkfun tutorial on the Sparkfun Thing Plus, "newtmgr" is used to communicate with the bootloader.
    Have you tried to program the device following that tutorial?

    The nRF9160DK have a debugger chip attached. When you use "nrfjprog" to program the nRF9160, this debugger will handle the programming. For devices without a physical debugger, such as the Sparkfun Thing Plus, a firmware bootloader can be used to program the nRF9160. To program the device using a bootloader, another tool than "nrfjprog" has to be used. In this case: "newtmgr"

     

    tedhavelka said:
    Will I be able to use `nrfjprog` independent of Segger's Integrated Development Environment?  That is not my first choice for a development environment.  I am working to stay at Linux' command line for simplicity and toolchain reproducibility motivations.

     Yes, you can use nrfjprog and west from the command line. To use west, see this tutorial or this documentation. To use nrfjprog, see here. Be aware, if you use the commands "nrjprog -e " or "nrfjprog --program NAME --chipearse", you will remove the mcuboot bootloader. It is possible to reinstall the bootloader, but you have to use an external debugger for this. 
    I recommend to use the "newmgr" command line tool, as specified in the previously linked Sparkfun Thing Plus tutorial.

    Did this solve your problem?

    Regards,
    Sigurd Hellesvik

  • Hello Sigurd,

    I'm afraid so far this answer does not solve my problem.  The `lsusb` listing above is from my Windows 10 host running Ubuntu 20.04 VM, with a physical Segger J-Link probe attached.  By connecting and disconnecting Segger J-Link probe from the Windows plus VM set up, I observe USB device with ID "1366:0101" appear and disappear.  That detection on the USB bus appears to be functioning correctly.

    During these J-Link config attempts I do not have any development board connected.  You are correct though that I am developing on a Sparkfun Thing Plus.

    Thus far I have been using MCUBootloader, enabling that serial boot feature in my project's ( and some sample nRF-SDK apps ) prj.conf file.  I've then been programming using `newtmgr` with appropriate arguments.  So I am familiar with that path to running firmware on certain nRF9160 boards.  This has allowed me to flash and run several examples and a small project of my own underway, without Segger J-Link probe.

    But I'm only able to do this on a different Ubuntu host, one without a VM or Windows.  Linux detects the Sparkfun development board's CP2102 USB-to-serial port.  I cannot find a working driver which Windows will allow me to install for the CP2102 on the Sparkfun board.  That's my only link to program with MCUBootloader enabled.

    My two issues are:  one, my development path requires me to move away from MCUBootloader.  Two, I need to configure Segger J-Link probe and establish a debugging link between my running firmware and `gdb` on the guest OS, the VM.  I've done something similar on non-nRF9160 projects, using openocd and an STLINK-V3 programmer.

    The Sparkfun Thing Plus nRF9160 has a ten-pin header that's pin for pin aligned with the Segger J-Link probe.  My understanding is that I should be able to flash with this Segger probe, via the J-Link header.  But encounter that "JLinkARM.dll not found" type of error when trying this.

    Does this clarify the steps I have attempted, and the development tasks I am working to configure properly?

    - Ted

  • Hi

    First, regarding the CP2102 driver, see Silicon Labs site for the CP2102, I found a driver installation file there. If the CP2102 driver does not work for you, you could have a look at either Silicon Labs Commuinty or the SparkFun Forum.

    Are you able to program the board directly from  Windows 10 (not using the Ubuntu WM), for example using the Programmer tool from nRF Connect for Desktop?

    From the Ubuntu WM, could you post the results of the follwing, with the "-l" argument? 

    ls -l /opt/SEGGER

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    The long listing of /opt/SEGGER in my Ubuntu VM is:

    guest@ubuntu-vm-0p2:/opt/SEGGER$ ls -l /opt/SEGGER
    total 4
    lrwxrwxrwx 1 root root   23 Nov 18  2020 JLink -> /opt/SEGGER/JLink_V688a
    drwxr-xr-x 9 root root 4096 Sep  2 19:47 JLink_V688a


    Regarding nRF Connect for Desktop I will need to install this utility. I have one such utility set which I've used for firmware programming and OTA tests of an nRF52832 based board. I'll review that software to see whether it is able to program 9160 based boards as well. I mostly recently installed an nRF Connect for Desktop in May of this year.

    Eventually though, I want my build tools to be something that is able to be reasonably automated, hence my goal to stick with the command line whenever possible.

    - Ted
Related