What IDE setup do you use for remote debugging with GDB/KGDB and OpenOCD?

Hello @MCU, MPU & Firmware ! If you use GDB or KGDB, what is your IDE setup while debugging remote device with a openocd running on it?
62 Replies
ZacckOsiemo
ZacckOsiemo•2mo ago
I use it by way of VSCODE well GDB, The tool in vscode is cortex-debug
melta101
melta101•2mo ago
no setup of a launch.json?
ZacckOsiemo
ZacckOsiemo•2mo ago
I wonder what do you mean by remote device on openocd
ZacckOsiemo
ZacckOsiemo•2mo ago
I have one let me share
ZacckOsiemo
ZacckOsiemo•2mo ago
GitHub
uCDSP/.vscode/launch.json at main · Gaiaocho/uCDSP
Contribute to Gaiaocho/uCDSP development by creating an account on GitHub.
melta101
melta101•2mo ago
we can ignore that it basically mean it is in my area
ZacckOsiemo
ZacckOsiemo•2mo ago
like off the host computer
melta101
melta101•2mo ago
like, not in my home network
melta101
melta101•2mo ago
quite literally remote..
ZacckOsiemo
ZacckOsiemo•2mo ago
Oh wow do you mind describing what you want to achieve, we have some efforts along those lines perhaps we can collab
ZacckOsiemo
ZacckOsiemo•2mo ago
So you want to code on your computer and deploy on a device in a remote lab
ZacckOsiemo
ZacckOsiemo•2mo ago
and possibly debug as well
melta101
melta101•2mo ago
it's in my office
melta101
melta101•2mo ago
while i am at home
ZacckOsiemo
ZacckOsiemo•2mo ago
Awesome and what's the setup in your office?
ZacckOsiemo
ZacckOsiemo•2mo ago
I mean there is 2 hosts yes?
ZacckOsiemo
ZacckOsiemo•2mo ago
Home and office?
melta101
melta101•2mo ago
VPX style server no, only 1 host
melta101
melta101•2mo ago
i run openocd on the devboard
melta101
melta101•2mo ago
it exposes a port to debug
melta101
melta101•2mo ago
i portforward it to my home network
ZacckOsiemo
ZacckOsiemo•2mo ago
Oh openocd on the devboard, you have an application processor or an MPU?
melta101
melta101•2mo ago
application processor
melta101
melta101•2mo ago
imx8
ZacckOsiemo
ZacckOsiemo•2mo ago
Ah this should just be straight remote dev
melta101
melta101•2mo ago
and zynq
melta101
melta101•2mo ago
yep no prob as of that part
ZacckOsiemo
ZacckOsiemo•2mo ago
Oh nice I think I remember you described the SDR
ZacckOsiemo
ZacckOsiemo•2mo ago
Ok what part is problematic
melta101
melta101•2mo ago
but wanted stable setup for my debug process
ZacckOsiemo
ZacckOsiemo•2mo ago
Do you want to run vscode on ssh?
melta101
melta101•2mo ago
do you mean code server?
ZacckOsiemo
ZacckOsiemo•2mo ago
Yeah is that what it's called?
melta101
melta101•2mo ago
i think so run vscode server on the processor so we can remote ssh into it to access vscode style IDE on it
ZacckOsiemo
ZacckOsiemo•2mo ago
Ok this is a bit exciting and I am jumping all over the place, how about you first tell us what you are trying to achieve and what parts are hard. I know some people here are keen to help as am I
melta101
melta101•2mo ago
oh yea lol i feel the same The main part is i normally use GDB as standalone. I wanted to integrate GDB to vscode as i it somewhat new to me. Plus is should somewhat flexible(like plug and play) i should just add the json file and it should work as it is on another computer
ZacckOsiemo
ZacckOsiemo•2mo ago
So basically you need to come up with a launch.json
melta101
melta101•2mo ago
my debug adapter is dmem
ZacckOsiemo
ZacckOsiemo•2mo ago
Ok where is yours breaking, I bet you have one and it's not doing what you want
melta101
melta101•2mo ago
oh yes give me few mins and i shall share
ZacckOsiemo
ZacckOsiemo•2mo ago
@32bitSaviour bud are you using GDB at work? Can you help us here? @undefined.elf you want to debug this for us?
32bitSaviour
32bitSaviour•2mo ago
Yes I do.
melta101
melta101•2mo ago
Debugger Setup with GDB + OpenOCD in Visual Studio Code
Because this editor is awesome and I want to use it for everything.
32bitSaviour
32bitSaviour•2mo ago
However mine is a simple .gdbinit file not integrated into any code editor.
ZacckOsiemo
ZacckOsiemo•2mo ago
Well now if we all work together we can shoehorn this into vscode
melta101
melta101•2mo ago
i use enhanced GDB within terminal too
undefined.elf
undefined.elf•2mo ago
I can after returning home
ZacckOsiemo
ZacckOsiemo•2mo ago
@melta101 ok can you share your current one? As well as what is not working.
ZacckOsiemo
ZacckOsiemo•2mo ago
You can share just a gist, doesnt have to be the whole project
melta101
melta101•2mo ago
this is may take some time.. i am not in front my laptop currently give me about an hour or so
ZacckOsiemo
ZacckOsiemo•2mo ago
Any chance you got the launch.json?
ZacckOsiemo
ZacckOsiemo•2mo ago
Or did it work?
melta101
melta101•2mo ago
Hey Zaack Sorry for the delay Just checked it and now, it is working...
melta101
melta101•2mo ago
btw i forgot to share mine
melta101
melta101•2mo ago
ZacckOsiemo
ZacckOsiemo•2mo ago
Awesome and since it works, I'll see about organizing a place where we can share all these.
ZacckOsiemo
ZacckOsiemo•2mo ago
When I have a space maybe you can write us a small description for it?
melta101
melta101•2mo ago
i didn't get you
ZacckOsiemo
ZacckOsiemo•2mo ago
I'll explain in a bit
ZacckOsiemo
ZacckOsiemo•2mo ago
that's fine, take your time. Gives all the others a chance to catch up with the conversation
undefined.elf
undefined.elf•2mo ago
I did 🔥🔥 now a days I am trying gdb cli other than cortex debug I’m enjoying it with pain

Did you find this page helpful?