Page 1 of 1

On-chip debugging VS-Code Ubuntu 20.04

Posted: Wed Dec 08, 2021 3:49 am
by WendaZ
Hello,

I am trying to set up the on-chip debugging in VS-code on Ubuntu 20.04 following the document (https://www.bitcraze.io/documentation/r ... debugging/)

The debugging environment was working perfectly on my Ubuntu 16.04 laptop. However, in my Ubuntu 20.04 laptop, I got a "Failed to launch OpenOCD GDB Server. Timeout" error. A screen shot was attached.
I have installed the "gdb-multiarch" as listed in the document

Searching this problem online, it seems to be something related to the new version of Cortex-Debug extension in VS-code. However, I didn't make it work after trying some tricks.

Any ideas how to solve this problem on Ubuntu 20.04?

Thanks!

Re: On-chip debugging VS-Code Ubuntu 20.04

Posted: Mon Dec 13, 2021 5:48 am
by jonasdn
Hello WendaZ!

As a first step could you verify for me that you have the arm-none-eabi-gdb binary on your system?

It should probably be in /usr/bin/arm-none-eabi-gdb ...

Could you also paste the contents of your launch.json here? Thank you.

Re: On-chip debugging VS-Code Ubuntu 20.04

Posted: Tue Dec 14, 2021 1:52 am
by WendaZ
Hi jonasdn,

Thanks for the reply. The attachment is the screen shot of the arm-none-eabi-gdb and launch.json file.

Re: On-chip debugging VS-Code Ubuntu 20.04

Posted: Tue Dec 14, 2021 8:31 am
by jonasdn
How does your settings.json look like?

Perhaps you need to add:

Code: Select all

"cortex-debug.gdbPath": "gdb-multiarch"
Or "/usr/local/bin/arm-none-eabi-gdb"