Particle debugger fails to load

This is probably another configuration error

If I reboot my computer, when I first try to load a debug session, it looks like it starts to load, but it stops at this point:

Open On-Chip Debugger 0.10.0+dev-00920-g6ea43726 (2019-09-09-19:42)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: FW Version = 1.10
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : nrf52.cpu: external reset detected
Info : Listening on port 50000 for gdb connections

After this, nothing happens. The debug pause/stop/step/restart buttons don’t show at the top of VSCode, nothing shows on the debug VSCode boxes on the left.

If I click the debug button again, then I get:

Open On-Chip Debugger 0.10.0+dev-00920-g6ea43726 (2019-09-09-19:42)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Error: couldn't bind tcl to socket on port 6666: Address already in use

I just got the Particle debugger yesterday, and haven’t used it before.

Is this a configuration problem somewhere?

I’m running Ubuntu 20.0.4 if that matters.

On Ubuntu you will need to install several packages to use the full capabilities of Workbench (including the debugger):

sudo apt-get install gcc-multilib libarchive-zip-perl libncurses-dev

Specifically libncurses-dev is required for using the debugger.

I have installed those dependencies, and I still get the same problem.

The output window looks like it is starting to work, the “continue/pause/step/stop/restart” buttons pop up at the top of VScode very briefly, and then disappear.

You could be encountering the same error discussed in this thread:

Make sure you are using the appropriate debugger configuration and kill the openocd process using port 6666.

Thank you for that link, but it doesn’t solve the problem. The same thing happens after I kill openOCD - the output looks like it’s going to start debugging, vscode very briefly shows the “continue/pause/step/stop/restart” buttons, and then those buttons disappear.

I am using the Boron configuration for debugging.

Open On-Chip Debugger 0.10.0+dev-00920-g6ea43726 (2019-09-09-19:42)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: FW Version = 1.10
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : nrf52.cpu: external reset detected
Info : Listening on port 50000 for gdb connections

Ok, so I’ve just made an interesting discovery.

When using the arm-none-eabi-gdb included with gcc-arm 9.2.1 I get:

~/.particle/toolchains/gcc-arm/9.2.1/bin# ./arm-none-eabi-gdb
./arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

However with gcc-arm 5.3.1 it works fine:

~/.particle/toolchains/gcc-arm/5.3.1/bin# ./arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160210-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) quit

Installing libncurses5 fixes the problem:

sudo apt install libncurses5

@rickkas7, I think this should be added to the Linux Tips section on this page:


In case anyone is interested, I discovered the issue by spinning up an Ubuntu docker image, installing neopo, and then directly running the GDB binaries. I’ve updated the install script to include the libncurses package for all supported distributions.

Friendly reminder that neopo is an unofficial tool, and I, the creator and sole maintainer am the only individual who can offer immediate support for it. (Just making the usual disclaimer before @m_m does.)

That works, thank you!

1 Like