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

J-Link Debugger with SEGGER Embedded Studio on Mac

Continuing my mission to have SES set up to be the complete development environment on a Mac I am struggling to get the Jlink Debugger to behave with SES.

It appears I cannot use the J-Link RTT Viewer since I have a Mac and this looks like it is Windows only. So I have fallen back to using the SEGGER J-Link Debugger V2.14 which is for Windows, Mac and Linux.

In terms of the Target Device, I see the nRF52832_xxAA and can set the Target Interface (JTAG: 1 MHz) with a USB host. So far so good.

SES imports the RTT Files folder so I added the relevant headers at the top of Main.

The problem is that every time I try to Download & Reset, Attach to Running Program or Attach and Halt Program I get a Connection Failed message in the J-Link Debugger Console. Also I notice the SES becomes unstable and often freezes and I have to restart it (I have reported the logs to SEGGER).

Is there something I am missing or is this a known bug?

Thanks

  • Hey, while there isn't an RTT Viewer on Mac, it is very easy to use RTT just following the answer in this post: devzone.nordicsemi.com/.../. You just connect to the device using JLink.exe and then open JLinkRTTClient and can view all RTT logging in that terminal.

    You need to be using SWD, not JTAG. 1 mhz should be fine but up to 5 mhz should work. I'm guessing this is the problem. nRF52 devices implement an SWD interface. The connection is failing probably because of this.

  • Hi Michael, thanks for responding. The J-Link Commander is part of the J-Link software package for Mac. I have downloaded and installed that but I cannot get passed the JLinkLicenseManager. It asks for a license number to be entered or asks to be connected to an emulator that holds a license. When I click on the latter I get this message:

    The connected emulator (S/N 682301457) has the following built-in license(s): none

    And I cannot proceed any further with any of the utilities in the software package. This is the nRF52 DK to be clear.

    Thanks

  • In the meantime I went back to J-Link Debugger and changed USB to SWD. I also played around with some of the speeds. If I open up J-Link Debugger and then commence a debug - SES freezes. If I commence a debug and then open up J-Link Debugger and try to attach it I get a message "cannot connect" in the J-Link console. So no luck changing these settings.

  • That's weird because I am just using a normal dev kit on mac and its working fine. I just downloaded the most recent J-Link Software and Documentation pack here (v5.12c): www.segger.com/j-link-software.html, installed and navigated to the SEGGER folder. Here I double clicked 'JLinkExe' and set up the connection to the dev kit following the prompts (I don't get any problems with license). After it is connected I double click 'JLinkRTTClient' and my RTT info is there.

    If I open the license manager (which i've never needed to do) and see which licenses are built in on my device I get the same 'The connected emulator (S/N 682338160) has the following built-in license(s): none' message, but everything still works properly for me as it should.

  • And that sounds like Embedded Studio is not playing well being ran together with J-Link Debugger, my guess is they aren't intended to be used together, but it sounds like a bug. I'll ask SEGGER about it.

    I think really we need to be debugging in Embedded Studio and not using the J-Link debugger at all. Hopefully we can figure out the problems you are having to make this possible. But definitely stick with SWD instead of JTAG as thats needed.

    you might also get better answers, quicker than I can provide here: forum.segger.com/index.php. Johannes from SEGGER seems to be answering questions right away there and he's the guy I ask.

Related