[SOLVED] Some permission problem with using J-Trace vs J-Link : cannot access DLL when JTrace ..

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

  • Some permission problem with using J-Trace vs J-Link : cannot access DLL when JTrace ..

    Bizarre issue : JLink soft doens't allow me to access J-Trace as normal user, but allows to access J-Link.

    Source Code

    1. Sep 24 09:26:06 esaev kernel: usb 2-1: Product: J-Trace PRO V2 Cortex
    2. Sep 24 09:26:06 esaev kernel: usb 2-1: Manufacturer: SEGGER
    3. Sep 24 09:26:06 esaev kernel: usb 2-1: SerialNumber: 004294967295
    4. Sep 24 09:27:52 esaev kernel: usb 2-1: USB disconnect, device number 4
    5. Sep 24 09:28:02 esaev kernel: usb 2-1: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
    6. Sep 24 09:28:03 esaev kernel: usb 2-1: New USB device found, idVendor=1366, idProduct=1020, bcdDevice= 1.00
    7. Sep 24 09:28:03 esaev kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    8. JLinkExe
    9. SEGGER J-Link Commander V6.82d (Compiled Aug 13 2020 18:17:57)
    10. DLL version V6.82d, compiled Aug 13 2020 18:17:45
    11. Connecting to J-Link via USB...FAILED: Cannot connect to J-Link.
    12. J-Link connection not established yet but required for command.
    13. Connecting to J-Link via USB...FAILED: Failed to open DLL
    14. sudo JLinkExe
    15. SEGGER J-Link Commander V6.82d (Compiled Aug 13 2020 18:17:57)
    16. DLL version V6.82d, compiled Aug 13 2020 18:17:45
    17. Connecting to J-Link via USB...O.K.
    18. ..
    19. Sep 24 09:34:17 esaev kernel: usb 1-1: Product: J-Link
    20. Sep 24 09:34:17 esaev kernel: usb 1-1: Manufacturer: SEGGER
    21. Sep 24 09:34:17 esaev kernel: usb 1-1: SerialNumber: 000260118138
    22. JLinkExe
    23. SEGGER J-Link Commander V6.82d (Compiled Aug 13 2020 18:17:57)
    24. DLL version V6.82d, compiled Aug 13 2020 18:17:45
    25. Connecting to J-Link via USB...O.K.
    26. Firmware: J-Link V10 compiled Jul 17 2020 16:23:38
    Display All
    So why ? . Means , rest of my Apps like IDE's cannot access J-Trace. Why would "DLL" be accessible for J-Link , but not J-Trace .. ?
    Presumably , it's same DLL / shared object file, so is there something in USB connect : do I need special udev rules, 99-link.rules ? Shouldn't this be already handled by the Segger's J-Link installer ?
  • [SOLVED] Some permission problem with using J-Trace vs J-Link : cannot access DLL when JTrace ..

    ANSWER :

    Segger needs to add this line to their 99-link.rules in the installation package:

    ATTR{idProduct}=="1020", ATTR{idVendor}=="1366", MODE="666"'

    This then solves it.
  • Hello,

    May I ask what Linux distribution you use?
    Do you use the DEB installer or the RPM one?
    Or are you using the tgz file?

    I checked the current rules file we deliver with the package and it looks alright.
    PID 0x1020 is part of it.
    The last change for this file was done on 26th Sept. 2019, so more than a year ago.
    Since then we ship it.

    Attached the latest version of the rules file.


    BR
    Alex
    Files
    • 99-jlink.zip

      (2.74 kB, downloaded 38 times, last: )
  • Thank you I will check this updated file.

    Im on Linux Fedora, and so using RPM. I used RPM for at least N years. (note: this is the test bed for corporate RH, so I really think it's a good distro to support)

    I do try to update Segger packages about say every 6 months or more often if something looks broken, directly downloading from your site. On this Linux image, i see from package log install JLink_Linux_V682 | 2020-07-25 11:18 | Upgrade .
    So that probably , should have your update mentioned.

    What I'm not sure now on, and I cannot check this, is the other 3rd party app tools like TI's CCS which, carries or installs their own version of Segger J-Link. It may (and at least on one version, I remember seeing it) override the rules file with whatever version of JLink they have fixed for this specific IDE version, and it may be could be older, may be..
    At least earlier this year about June I've installed CCS 10, and, it pulled an internal update of Segger J-Link (Actually that was a broken 7z archive which I reported to them, but they wrote they get it directly from you .).

    That is probably another issue : a tool like CCS shouldn't use some dodgy archives which are not packaged in the host's packaging system. It should pull RPM, and then see if an update of already installed package is done.
    May be Segger needs to suggest that to 3rd party pushers.
  • Hello,

    What 3rd party installers like CCS do and don't do is their business and we do not intend to mess with that.
    I do not really see that SEGGER "needs to suggest" things here.
    Note that we do not ship any 7z archives to TI for CCS installations. Their are either zip or tar.gz

    We will consider this thread as closed for now.


    BR
    Alex