PlatformIO Community

Unable to debug adafruit_itsybitsy_nrf52840

Hello,

I’m trying to run and debug code on an adafruit_itsybitsy_nrf52840.
I have this connected to the host OSX (catalina) machine only via usb - no jlink
hardware is connected. I’m trying to realize the promise in docs that no
external debugging ice or etc is required.

Is a jlink box requred for this board?

I can upload and run a sample program but debugging fails thus:

Connecting to J-Link…
Connecting to J-Link failed. Connected correctly?
GDBServer will be closed…
Shutting down…
undefinedCould not connect to J-Link.
Please check power, connection and settings.

PlatformIO Unified Debugger -> http://bit.ly/pio-debug
PlatformIO: debug_tool = jlink
PlatformIO: Initializing remote target…
.pioinit:16: Error in sourced command file:
:2331: Connection refused.

Thanks for any pointers or help.

Regards,
j

Seems like the docs are wrong. Indeed https://docs.platformio.org/en/latest/boards/nordicnrf52/adafruit_itsybitsy_nrf52840.html#debugging does say that is has a JLink on-board due to

But the schematics and pinout diagrams clearly show that the SWD signals (SWCLK + SWDIO) are simply exposed on copper pads which you can solder wires to and connect to an actualy debugger. No JLink on-board.

Since the board does support STlink debugging (docs) I’d recommend you get a cheap STLinkV2 clone and connect it up to the target board (VCC_TARGET, GND, SWCLK, SWDIO) to get debugging working.

Now there’s a response that makes sense, has all the details and is
every good thing.

Thanks much, will proceed as suggested.

j