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

nrfjprog wants JLinkARM.dll on linux

First, obviously error message is not correct, dll's are not used on linux. Message should give correct file name instead of prewritten one.

I have installed latest JLink 5.02g. And tried both 32 and 64 bit versions. I tried to see with strace what goes wrong, but it seems to me that nrfjprog reads successfully libjlinkarm_nrf51_nrfjprogdll.so but still decides to fail.

Here is tail of the strace output;

open("/opt/JLink_Linux_V502g_i386/libjlinkarm_nrf51_nrfjprogdll.so", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\20\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=55408, ...}) = 0 mmap(NULL, 2151920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f090bc92000 mprotect(0x7f090bc9f000, 2093056, PROT_NONE) = 0 mmap(0x7f090be9e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0x7f090be9e000 close(3) = 0 mprotect(0x7f090be9e000, 4096, PROT_READ) = 0 open("/opt/SEGGER/JLink/libnrfjprogdll.so.7", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\20\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=22640, ...}) = 0 mmap(NULL, 2118248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f090ba8c000 mprotect(0x7f090ba91000, 2093056, PROT_NONE) = 0 mmap(0x7f090bc90000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7f090bc90000 close(3) = 0 mprotect(0x7f090bc90000, 4096, PROT_READ) = 0 munmap(0x7f090bc92000, 2151920) = 0 munmap(0x7f090bea0000, 2118248) = 0 write(2, "ERROR: JLinkARM.dll load failed."..., 71ERROR: JLinkARM.dll load failed. Try again. If it keeps failing, please) = 71 write(2, "\n", 1 ) = 1 write(2, "ERROR: reinstall latest JLinkARM"..., 57ERROR: reinstall latest JLinkARM.dll from Segger webpage.) = 57 write(2, "\n", 1 ) = 1 exit_group(32) = ?

Parents
  • The problem here was that the nrfjprog files were placed in the /opt/SEGGER/JLink/ folder. This does not work with the current release and thus caused the executable to crash. Will probably be fixed in a future release. Solution for now is to not place the nrfjprog files in the /opt/SEGGER/JLink folder.

    Hi Juha, have you looked at this recent blog post regarding the current limitations of the Linux version of nRF5x-Tools? nRF5x-Tools and nRF5x-Pynrfjprog Includes Linux and Python 3 Support

    Have you placed your nrfjprog files inside the SEGGER folder as well? Where are your nrfjprog - .so files located, and where is the nrfjprog executable located?

  • Hi Juha, The reason for the hardcoded link to the SEGGER shared library is that the implementation currently has been done in a "windows" way. This will be fixed in future releases allowing the SEGGER shared library to be located in for example /usr/lib, but the executable will for example still also look in /opt/SEGGER/JLink, sorry if this causes issue for you right now.

    This has only been tested on Ubuntu: If you download the .tar from our website, and extract it into a folder, for example: ~/Documents/nrfjprog_linux/ If the segger software is installed in /opt/SEGGER/JLink/ by using their .deb installer (which will place it there); Then you should be able to run from within the nrfjprog_linux folder: ./nrfjprog -r And it should work fine.

Reply
  • Hi Juha, The reason for the hardcoded link to the SEGGER shared library is that the implementation currently has been done in a "windows" way. This will be fixed in future releases allowing the SEGGER shared library to be located in for example /usr/lib, but the executable will for example still also look in /opt/SEGGER/JLink, sorry if this causes issue for you right now.

    This has only been tested on Ubuntu: If you download the .tar from our website, and extract it into a folder, for example: ~/Documents/nrfjprog_linux/ If the segger software is installed in /opt/SEGGER/JLink/ by using their .deb installer (which will place it there); Then you should be able to run from within the nrfjprog_linux folder: ./nrfjprog -r And it should work fine.

Children
No Data
Related