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

Getting "no debugger connected to PC" error on my mac with nrf51dk

Hey all,

I'm working with the nRF51822 (nRF51dk) on a mac running high sierra, and I've been following this tutorial to try to get started. But when I try to make flash code onto the board, I keep getting ERROR: There is no debugger connected to the PC.. I can see the board show up on my desktop as MBED when I plug it in, so I know my computer's recognizing the device as something. It just seems like it's seeing it as the wrong thing.

I used this same board a couple of years back, with an earlier version of macOS, and I was able to get everything working then, but I also used mbed.org and their cloud compiling stuff to generate hex files that I could just drop into the board, so this approach is a bit different. I'm connecting over a standard usb (usb C converting to A).

Could it be that I formatted my board for a different type of flashing when I was using mbed? I remember doing something like that. Anyway, I haven't been able to connect at all, and I'm a bit stuck. Any advice would be appreciated. Oh, and I've downloaded and installed the latest jlink software and documentation pack, so that's not the issue.

EDIT: I followed Gaute Gamnes' advice here and got the devkit to display as jlink when plugged in. Yay! However, now I'm getting a different error when I try to flash code on. ERROR: Cannot connect to any nRF device. Please make sure a device is connected to the debugger and supplied.

  • I would take a look at one of these two blogposts. The first one is specialized for nrf51 and mac osx, while the second one is more general development with eclipse and gcc. If you were using an nrf52 dk, I would have suggested you download the latest SDK (14.2) & installed segger embedded studio. This is a great solution for nrf52 programming on MacOS, Linux and/or Windows.

  • Hey, Bjorn. Thanks for the response. I checked out the blog posts, but they weren't much help; the problem is that I can't connect to the board, so I couldn't execute any of the troubleshooting steps that they give. When I try to connect over JLink, I get WARNING: RESET (pin 15) high, but should be low. Please check target hardware. This is weird, because I've put looked at p0.15, and it was low during my connection attempts. However, the product spec says that reset is active-low, so maybe this is the problem after all? That it's constantly resetting? Furthermore, once I trigger the reset pin, p0.15 stays high, and does not go low again until I power the board down completely. At this point, I'm suspicious of a hardware issue - maybe the reset is shorted somewhere.

  • Hey Maipei, you can still see the jlink folder in the Finder window, right? Talked to an expert here @ Nordic and asked for some tips: Do you have the latest version of the command line tools installed (i.e. 9.7.1, here's the download link)? If that doesn't help, could you try using a different usb cable? Some cables can only be used for charging and not communicating (see this case for an example). Hopefully that helps!

Related