<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">If I were you I would try to start as
low-level as possible.<br>
<br>
To do so, please check if your gdb is configured with textui
enabled ( try starting it with arm-none-eabi-gdb --tui )<br>
<br>
if only commandline shows up then download gdb and recompile it:<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre dir="ltr" class="mw-geshi mw-content-ltr"><div class="bash source-bash"><pre class="de1"><span class="kw3">cd</span> <span class="kw2">gdb</span>
.<span class="sy0">/</span>configure <span class="re5">--target</span>=arm-none-eabi <span class="re5">--prefix</span>=<span class="sy0">/</span>usr<span class="sy0">/</span><span class="kw3">local</span> <span class="re5">--program-prefix</span>=arm-none-eabi- <span class="re5">--disable-werror --enable-tui</span></pre></div></pre>
<br>
This Text UI is very nice for finding out if the problem is
related to gdb or to the integration of gdb into the ide.<br>
<br>
Here's how I call gdb:<br>
<br>
arm-none-eabi-gdb hello.elf --tui --eval-command="target extended
:3333" --eval-command="monitor reset halt" --eval-command="set mem
inaccessible-by-default off" --eval-command="load" <br>
<br>
<br>
This loads the binary, you should end up with the debugger showing
you your source code.<br>
<br>
Now try stepping through the code, if all is fine then great,
problem is in the integration of gdb.<br>
<br>
Stept I use:<br>
break main<br>
cont<br>
<br>
step<br>
<br>
When stepping does not work you can go deeper: <br>
<br>
add <br>
<br>
--eval-command="layout asm" --eval-command="layout regs" <br>
<br>
to the commandline and start over, now you can single step through
the assembler code with<br>
<br>
stepi<br>
<br>
This should help you to track down your problems (I hope)<br>
<br>
Michael<br>
<br>
Am 28.05.14 12:36, schrieb Koenraad Lelong:<br>
</div>
<blockquote cite="mid:5385BC49.40606@de-brouwerij.be" type="cite">op
21-05-14 20:17, Martin Schreiber schreef:
<br>
<br>
<blockquote type="cite">
<br>
In MSEide the procedure is as follows - I assume same as in
Lazarus:
<br>
In 'Start gdb server command run target' write the command or
script which
<br>
starts the OpenOCD gdb proxy server (I don't know the command).
<br>
Set 'Wait before connect' to the GDB server startup time + some
reserve.
<br>
'Target connection' = remote localhost:3333
<br>
<br>
Activate 'gdb download' then MSEide will use the gdb "load"
command for
<br>
program download.
<br>
<br>
I suggest to make first a minimal C-program with the gcc
toolchain of your
<br>
target. If that works the FPC adventure can start. ;-)
<br>
<br>
Martin
<br>
<br>
</blockquote>
Hi,
<br>
<br>
I tried to debug my arm-board with MSEide.
<br>
I manually started openocd (I need to be root). I configured
MSEide debugger : Target connection : extended-remote
localhost:3333.
<br>
I configured debug-target to the elf-file of my project. Is there
a macro to add an extention to the "make-output-file" ?
<br>
I compiled the project and manually flashed it, and I left it in
reset halt.
<br>
I then can attach to the target, I see gdb connecting to openocd.
I get the proper source in the source window. I can start the
project, but since there seems still a problem with the
compile-fase (the resulting binary does not work properly) I tried
to reset the board. There gdb drops the connection to the target.
<br>
<br>
When I set a breakpoint, the target halts, but MSEide does not
indicate in the source where it stops. I can step, but again
MSEide does not follow in the source.
<br>
<br>
I can "continue" the target and stop it. But when I stop it, no
indication where in the source it stopped.
<br>
<br>
So progress, but not there yet. Or maybe I'm doing things wrong ?
<br>
<br>
I still need to find why the binary is not good. When I compile
the project via cli, it's working. From within MSEide, it does not
work, although the command-line is the same as my manual
command-line. I will add -va again and compare the outputs.
<br>
<br>
Koenraad.
<br>
<br>
--
<br>
_______________________________________________
<br>
Lazarus mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a>
<br>
</blockquote>
<br>
</body>
</html>