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

  • Exactly - that's the question I asked at the start of my original reply below "does J-Link Like Cortex M have the CDC control and data endpoints", it doesn't (I just realised I have one and ran IORegistryExplorer on it) so the CDC driver doesn't see it.

    As for the libusb dependency removal, from running a few tools on libjlinkarm I think they just rewrote it to use IOKit directly, which is what libusb does indirectly. Doesn't help however as still a device which has been exclusively obtained can't be used by anything else either via libusb or IOKit.

    Only practical limitation here is you can't debug AND take serial output from one of the Segger modules with built-in CDC, which is vaguely annoying.

  • I have used other jtag on OSX with CDC. Never have any issue with CDC. Only problem is with Segger, so arguably it is Segger bug. I have developed USB HID product in the past and I can say that Apple is very strict on USB descriptor. I remembered making a little mistake in one of the descriptor. OSX refuse to accept it although it is listed. But under Windows everything worked fine.

  • Not every jtag also has a serial channel on it which presents as a CDC device, so those all work fine.

    Anyway in this case after some back and forth between Apple and Segger, Apple does open the device exclusively but only grabs the two CDC interfaces and leaves the proprietary one available, and I wrote the code myself, it's usable. Where the segger driver is having issues, I currently believe, is attempting to get basic information, like the serial number, off the device by using the control pipe, which requires the device to be opened, which it can't do (which is what libusb does too). Apple's IOKit however provides almost all the information you could want cached after device attachment via another mechanism so there's no real need to do this.

    I've given Segger all the information I have and they are looking into it, so they tell me.

    Apple probably shouldn't open the device exclusively as it does, because it stops even the most basic control function from working, but in this case I think segger can do what they want another way.

    If they even tell me they fixed it I'll report back.

  • I contacted Segger some months ago telling them what I'd found and how they might be able to get the information they needed without opening the device.

    They wrote back today and told me it's fixed since version 4.88, I just grabbed version 4.90 and it IS fixed, you no-longer need to disable the CDC drivers to use JLink on OS X.

    So you can program the soggier AND you can read the UART

Related