<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">First step would be to visit<br>
<br>
<a class="moz-txt-link-freetext" href="http://wiki.freepascal.org/TARGET_Embedded">http://wiki.freepascal.org/TARGET_Embedded</a><br>
<br>
This page helps to set up basic things like cross toolchain for
arm and to compile trunk of fpc.<br>
<br>
Once you have worked through this you are ready to go.<br>
<br>
ppcrossarm -i should give you a list of available controllers,
when you use trunk you should see:<br>
<br>
LPC1343FBD48 and LPC1343FHN33 in the list of supported
controllers.<br>
<br>
When you have followed the steps of the instructions you have also
checked out latest FPC from trunk, you should now make yourself
familiar with the file ./rtl/embedded/arm/lpc13xx.pp, this file
holds all the register information. <br>
<br>
If you want I can send you a newer version of this file, it also
includes translations of most of the #defines of the original
header files, but for learning first steps the checked in version
is perhaps easier, it is not that big.<br>
<br>
Now you are ready to compile your first hello.pas, this is the
commandline that I usually use:<br>
<br>
ppcrossarm -MObjFPC -Ch1024 -Cs1024 -Tembedded -Parm -vi -Cparmv7m
-WpLPC1343FBD48 -XParm-none-eabi- hello.pas<br>
<br>
When you use objects you need to initialize the heap, change -Ch
(Heapsize) and -Cs (Stacksize) to your needs. -vi give you info
about code and data size.<br>
<br>
arm-none-eabi- is the prefix of your binutils binaries for cross
compiling, if they are not in you path you can also put the full
path in the commandline, but remember to only use the prefix.
something like /usr/local/bin/arm-none-eabi- will work,
C:\tools\bin\arm-none-aebi- should also work <br>
<br>
For debugging you need gdb compiled as a cross debugger, I built
my own gdb to support text UI, so --tui brings you into a basic
GUI inside of gdb, without this you end up in plain gdb
commandline. <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>
After this you are ready to debug.<br>
<br>
I have written an integration into lazarus looooong time ago, not
sure if it still compiles after the huge changes thst Martin did
in the last months, once you have everything up and running so far
we can work on the integration into lazarus.<br>
<br>
Michael<br>
<br>
<br>
<br>
Am 17.05.14 01:33, schrieb Justin Smyth:<br>
</div>
<blockquote cite="mid:20140516233907.CD3A1101@freepascal.dfmk.hu"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div>
<div style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Hi
everyone,<br>
<br>
I have recently got open ocd v8 to talk to my nxp lpc 1343 via
a stlinkv2 , should fpc ( 2.6.4 or higher support this type of
CPU and does anyone have any ideas how to hook up gdb to
openocd ? I am thinking of using Lazarus to step through some
code if possible)<br>
<br>
Justin </div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></pre>
</blockquote>
<br>
</body>
</html>