On-chip debugging VS-Code Ubuntu 20.04

Firmware/software/electronics/mechanics
Post Reply
WendaZ
Beginner
Posts: 14
Joined: Sun Jul 14, 2019 10:35 pm

On-chip debugging VS-Code Ubuntu 20.04

Post 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!
Attachments
Selection_072.png
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: On-chip debugging VS-Code Ubuntu 20.04

Post 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.
WendaZ
Beginner
Posts: 14
Joined: Sun Jul 14, 2019 10:35 pm

Re: On-chip debugging VS-Code Ubuntu 20.04

Post by WendaZ »

Hi jonasdn,

Thanks for the reply. The attachment is the screen shot of the arm-none-eabi-gdb and launch.json file.
Attachments
Selection_077.png
Selection_076.png
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: On-chip debugging VS-Code Ubuntu 20.04

Post 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"
Post Reply