<TKruse>
Hi, I am trying to debug a linux user application and I was wondering whether I could do it via JTAG+openOCD? The target is the ARM core on a DE10nano board. The problem I'm facing is that I don't know how to load just the user application and tell the gdbserver/openocd to start it. Is this even possible ?
<karlp>
TKruse: gdbserver [command line to run program?] I'm not sure I follow.
<karlp>
doing it via jtag is sure, feasible, but you're debugging linux + your app + everything else at that point, which just sounds wildly unproductive
<TKruse>
Thanks for the reply. I agree that this is unproductive since debugging user apps is simply achieved by the gdbserver which is available on the target. I'm just curious whether it is feasable at all. To be honest I was hoping to get a "no" as the answer :D Is there any mechanism integrated into openocd or does this need lots of workarounds ?
<karlp>
I mean, openocd doesn't care,
<karlp>
gdb will be fun though, as you're trying to debug a user app, but inside the kernel, and the memory addresses and protections between kernel and user are going to be absurd.
<karlp>
what's wrong with gdbserver?
<TKruse>
There is nothing wrong with gdbserver. With your answer I drop the idea of using jtag for debugging user apps and go with the gdbserver. For the background of my question: A collegue of mine prefers jtag for debugging since he is used to it but for applications without operating system and I need to convince him of using the gdbserver now.
<Haohmaru>
jtag itself is nothing here.. it's just an electrical interface thing more or less
<Haohmaru>
(someone else could rephrase that better)
<Haohmaru>
if you have a whole OS, then you potentially have "gdb" available in it.. thus run your program thru that gdb
<Haohmaru>
no need for hardware debuggers and JTAGs and whatnot
<karlp>
you still often run gdbserver on the target, and gdb remote on the host, so you don't have to have all the debug stuff on the target