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•6d ago
I use it by way of VSCODE well GDB, The tool in vscode is cortex-debug
melta101
melta101•6d ago
no setup of a launch.json?
ZacckOsiemo
ZacckOsiemo•6d ago
I wonder what do you mean by remote device on openocd
ZacckOsiemo
ZacckOsiemo•6d ago
I have one let me share
ZacckOsiemo
ZacckOsiemo•6d ago
GitHub
uCDSP/.vscode/launch.json at main · Gaiaocho/uCDSP
Contribute to Gaiaocho/uCDSP development by creating an account on GitHub.
melta101
melta101•6d ago
we can ignore that it basically mean it is in my area
ZacckOsiemo
ZacckOsiemo•6d ago
like off the host computer
melta101
melta101•6d ago
like, not in my home network
melta101
melta101•6d ago
quite literally remote..
ZacckOsiemo
ZacckOsiemo•6d 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•6d ago
So you want to code on your computer and deploy on a device in a remote lab
ZacckOsiemo
ZacckOsiemo•6d ago
and possibly debug as well
melta101
melta101•6d ago
it's in my office
melta101
melta101•6d ago
while i am at home
ZacckOsiemo
ZacckOsiemo•6d ago
Awesome and what's the setup in your office?
ZacckOsiemo
ZacckOsiemo•6d ago
I mean there is 2 hosts yes?
ZacckOsiemo
ZacckOsiemo•6d ago
Home and office?
melta101
melta101•6d ago
VPX style server no, only 1 host
melta101
melta101•6d ago
i run openocd on the devboard
melta101
melta101•6d ago
it exposes a port to debug
melta101
melta101•6d ago
i portforward it to my home network
ZacckOsiemo
ZacckOsiemo•6d ago
Oh openocd on the devboard, you have an application processor or an MPU?
melta101
melta101•6d ago
application processor
melta101
melta101•6d ago
imx8
ZacckOsiemo
ZacckOsiemo•6d ago
Ah this should just be straight remote dev
melta101
melta101•6d ago
and zynq
melta101
melta101•6d ago
yep no prob as of that part
ZacckOsiemo
ZacckOsiemo•6d ago
Oh nice I think I remember you described the SDR
ZacckOsiemo
ZacckOsiemo•6d ago
Ok what part is problematic
melta101
melta101•6d ago
but wanted stable setup for my debug process
ZacckOsiemo
ZacckOsiemo•6d ago
Do you want to run vscode on ssh?
melta101
melta101•6d ago
do you mean code server?
ZacckOsiemo
ZacckOsiemo•6d ago
Yeah is that what it's called?
melta101
melta101•6d 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•6d 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•6d 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•6d ago
So basically you need to come up with a launch.json
melta101
melta101•6d ago
my debug adapter is dmem
ZacckOsiemo
ZacckOsiemo•6d ago
Ok where is yours breaking, I bet you have one and it's not doing what you want
melta101
melta101•6d ago
oh yes give me few mins and i shall share
ZacckOsiemo
ZacckOsiemo•6d 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•6d ago
Yes I do.
melta101
melta101•6d 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•6d ago
However mine is a simple .gdbinit file not integrated into any code editor.
ZacckOsiemo
ZacckOsiemo•6d ago
Well now if we all work together we can shoehorn this into vscode
melta101
melta101•6d ago
i use enhanced GDB within terminal too
undefined.elf
undefined.elf•6d ago
I can after returning home
ZacckOsiemo
ZacckOsiemo•6d ago
@melta101 ok can you share your current one? As well as what is not working.
ZacckOsiemo
ZacckOsiemo•6d ago
You can share just a gist, doesnt have to be the whole project
melta101
melta101•6d ago
this is may take some time.. i am not in front my laptop currently give me about an hour or so
ZacckOsiemo
ZacckOsiemo•6d ago
Any chance you got the launch.json?
ZacckOsiemo
ZacckOsiemo•6d ago
Or did it work?
melta101
melta101•6d ago
Hey Zaack Sorry for the delay Just checked it and now, it is working...
melta101
melta101•6d ago
btw i forgot to share mine
ZacckOsiemo
ZacckOsiemo•6d ago
Awesome and since it works, I'll see about organizing a place where we can share all these.
ZacckOsiemo
ZacckOsiemo•6d ago
When I have a space maybe you can write us a small description for it?
melta101
melta101•6d ago
i didn't get you
ZacckOsiemo
ZacckOsiemo•6d ago
I'll explain in a bit
ZacckOsiemo
ZacckOsiemo•6d ago
that's fine, take your time. Gives all the others a chance to catch up with the conversation
undefined.elf
undefined.elf•6d ago
I did 🔥🔥 now a days I am trying gdb cli other than cortex debug I’m enjoying it with pain
Want results from more Discord servers?
Add your server