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

j-link issue if used with Nordic EK j-link OB

I wish to inform Nordic about this issue with jlink OB used on EK boards when used in OS X environment.

J-link OB returns " Can not connect to J-Link via USB." and a CDC disabling is due to establish a connection.

But, if I use j-link Lite Cortex M there are no problems, the connection is ready without disabling CDC.

All firmwares are updated.

Not fatal but annoying .

-c

  • Tried with 3 EK boards, 2 EK version V1.0, one version V2.2 and a Jlink LITE Cortex-M Rev. 8.1

    Connect EK to USB, then launch, in terminal, jlinkexe command. It results in a message from J-Link Commander :

    SEGGER J-Link Commander V4.80h ('?' for help)
    Compiled Feb 28 2014 21:56:56
    Can not connect to J-Link via USB.
    

    To connect properly CDC disable is needed (use Seggere CDCDisable.term)

    Launch it.

    Then reconnect EK board.

    Run jlinkexe command.

    Now connection is ok, found swd-dp, found Cortex-M0.

    Enable CDC to return in previous situation.

    Connect EK, ...no device found.

    Connect J-LINK LITE, all OK.

    SEGGER J-Link Commander V4.80h ('?' for help)
    Compiled Feb 28 2014 21:56:56
    DLL version V4.80h, compiled Feb 28 2014 21:56:51
    Firmware: J-Link Lite-Cortex-M V8 compiled Aug 29 2012 15:24:23
    Hardware: V8.00
    S/N: ************* 
    Feature(s): GDB 
    VTarget = 0.000V
    

    Same problem on all EK boards (version 1 and version 2).

    OS X version 10.9

    All Segger firmware are updated.

    -c

  • Take a look at the thread here on the Segger site, scroll to the bottom where Alex from Segger explains as I did that the CDC driver on OSX takes exclusive access to the device (it does, you can confirm that with dtrace). At that point libusb can't connect to the JLink and JLink uses libusb.

    On other operating systems the CDC driver does not take exclusive access to the device allowing that driver to run the CDC channels and the virtual serial point, but libusb to connect to the custom Segger endpoints.

    The only thing Segger could really do about this is make the device appear as a composite device with CDC + Segger as if they were attached to an intermediate hub instead of one interface based on CDC, then OSX would run the CDC bit and leave the Segger endpoint alone but that's vastly complicated for an embedded USB device, adding a channel to CDC works for other OSes.

    So you have to disable the driver (for which I wrote cdccontrol in the package I published a few weeks ago or use a script).

  • Thank you RK, I 've read it previously.

    My doubts are starting from release Jlink version 4.74 (the last one in .dmg format). In README.txt Segger wrote :

    Requirements
    ============
    libusb is no longer required.
    
    

    So, I am inclined to think that starting from this version, libusb no longer used by Segger in OS X Jlink.

    I've not installed any libusb on my mac.

    But the main question here is why Jlink Lite cortexM-9 works fine without disabling CDC and Jlink OB on Nordic EK boards doesn't.

    Any idea about ?

    -c

  • The J-Link Lite does not have a CDC interface and hence you don't need to do the module unload tweak that the Segger thread RK links to talks about.

    I guess the removal of the libusb dependency may be because Segger have chosen to statically link with the library, instead of depending on it being on the system.

  • Thank you Ole, that's solved the issue with OB version.

Related