My OS is Linux Mint 21.2, using Docker Desktop. I'm working with VS Code remote containers. My container has JLink installed with dependencies with notes from this thread UDEVADM JLink Container Solution.
Using root user and a basic container to get things up before dialing down, I can't seem to access my USB JLink.
root@ae1709e223cc:/# JLinkExe
SEGGER J-Link Commander V7.92m (Compiled Oct 26 2023 16:20:35)
DLL version V7.92m, compiled Oct 26 2023 16:20:12
Connecting to J-Link via USB...FAILED: Cannot connect to J-Link.
root@ae1709e223cc:/#
Display More
This does work under my OS installed JLink outside of the container.
I'm not sure what to try next. Is there a log somewhere?
Has anyone had this issue?
Maybe a permissions recommendation? The container is marked as privledged in VSCode ("privileged": true in devcon json).
Support info:
1. In my linux desktop I have a /dev/bus/usb/021 which is currently my JLink (no persistent name, but that's OK for now). In my Container I have no matching folder. I assume there may be differences in my Linux Mint (Ubuntu based) Desktop and Ubuntu 22.4 Container... But I think this is a big clue. I don't seem to have USB in the container... Looking for a solution because Segger's own container guide doesn't mention this at all.
2. I noticed other JLink Utils will not start. I suspect this is because most of the pop up a GUI? These do work in my OS version.
root@ae1709e223cc:/# JLinkGDBServerExe
JLinkGDBServerExe: error while loading shared libraries: libXrandr.so.2: cannot open shared object file: No such file or directory
root@ae1709e223cc:/#
3. Somehow and from somewhere, a .reg file was created on my linux container's root folder. No idea what this is!
-rw-r--r-- 1 root root 725 Oct 29 22:22 SEGGER_REG_HKEY_CURRENT_USER.xml
<Registry>
<Software>
<SEGGER LogFileJLink="" LogFileJLink_SEGGERRegType="SYS_REG_TYPE_SZ">
<J-Link StartMinimized="0x00000001" StartMinimized_SEGGERRegType="SYS_REG_TYPE_DWORD" StayOnTop="0x00000001" StayOnTop_SEGGERRegType="SYS_REG_TYPE_DWORD" LogIsHalted="0x00000001" LogIsHalted_SEGGERRegType="SYS_REG_TYPE_DWORD" LogInternal="0x00000001" LogInternal_SEGGERRegType="SYS_REG_TYPE_DWORD" OverrideConfigFile="0x00000000" OverrideConfigFile_SEGGERRegType="SYS_REG_TYPE_DWORD" OverrideLogFile="0x00000000" OverrideLogFile_SEGGERRegType="SYS_REG_TYPE_DWORD" ConfigFile="" ConfigFile_SEGGERRegType="SYS_REG_TYPE_SZ" LogFile="" LogFile_SEGGERRegType="SYS_REG_TYPE_SZ"/>
</SEGGER>
</Software>
</Registry>
Display More