Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-02

Lazarus and Arm Embedded.( see FPC Bug report 23844)

14 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Justin Smyth

I?ve been working on a patch for FPC to add support for the NXP LPC 1343 ( smaller cousin to the NXP LPC 1768 ) , i?ve successfully added in all the correct units , can get FPC to recompile with my changes but i am wondering how i would recompile lazarus so i could debug any application i create. ( ie write the smalll nongui app in lazarus , compile it , Update the board using flashmagic ( or the command prompt utility ) and debug via gdb using a UNLINK2 usb debugging kit. )..

Does Lazarus currently support this , i know i can write my own application save the file and compile using a command like this

fpc -Parm -Tembedded -Wplpc1343 -Cparmv7m myprogram.pp Can we extend lazarus so we can create embedded arm applications ? ( if it allready does this i would love to know what type of project to select when selecting NEW.. & how to set the subarch setting for the ARM Family.)I only ask as i want to be able to write my own app in lazarus and debug it there too.. i am not sure how i would debug otherwiseKind RegardsJustin -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130215/e6f93cc3/attachment.html>

Reply by email

Michael Schnell
to Justin Smyth
Justin Smyth wrote
Can we extend lazarus so we can create embedded arm applications ?

In the German Lazarus forum we are currently working on an instruction Wiki page (and supposedly on providing some necessary modifications of the Lazarus source code regarding the gdb embedding) to allow for cross compiling and remote debugging for embedded (i.e. headless) ARM devices accessible via TCP/IP..

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130214/2cf7aa83/attachment.html>

Reply by email

Michael Ring
to Justin Smyth: I?ve been working on a patch for FPC to add support for the NXP LPC 1343 ( smaller cousin…

Hi Justin,

as Michael already wrote we are currently integrating openocd into lazarus, the integration is already working but needs some testing. I would love to see that somebody else besides me gives the implementation a try.

If Unlink2 is supported by openocd you should be fine, same is true if unlink2 brings it's own gdbserver.

What OS are you working on, MacOS, Windows or linux?

Michael

Justin Smyth wrote 28 lines
I've been working on a patch for FPC to add support for the NXP LPC 1343 ( smaller cousin to the NXP LPC 1768 ) , i've successfully added in all the correct units , can get FPC to recompile with my changes but i am wondering how i would recompile lazarus so i could debug any application i create. ( ie write the smalll nongui app in lazarus , compile it , Update the board using flashmagic ( or the command prompt utility ) and debug via gdb using a UNLINK2 usb debugging kit. ).. Does Lazarus currently support this , i know i can write my own application save the file and compile using a command like this fpc-Parm -Tembedded -Wplpc1343 -Cparmv7m myprogram.pp Can we extend lazarus so we can create embedded arm applications ? ( if it allready does this i would love to know what type of project to select when selecting NEW.. & how to set the subarch setting for the ARM Family.) I only ask as i want to be able to write my own app in lazarus and debug it there too.. i am not sure how i would debug otherwise Kind Regards Justin -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130214/d5f8730a/attachment.html>

Reply by email

Michael Schnell
to Justin Smyth: I?ve been working on a patch for FPC to add support for the NXP LPC 1343 ( smaller cousin…
Justin Smyth wrote
Can we extend lazarus so we can create embedded arm applications ?

Besides the problem of allowing for cross compiling and remote debugging (which I feel is just is an issue of documentation and some bug fixes or enhancements), the more serious problem is that there is no local GUI independent Lazarus "Widget Type" (aka "interface") that allows for an event queue (and thus things like TTimer and "Object Pascal like" main thread notification (e.g. with "Synchronize" and "QueuAsyncCall"). This can only be fixed by those knowledgeable on Lazarus Widget Type creation.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130214/163b3d17/attachment-0001.html>

Reply by email

Mattias Gaertner
to Justin Smyth: I?ve been working on a patch for FPC to add support for the NXP LPC 1343 ( smaller cousin…
Show quoted text 6 lines
I?ve been working on a patch for FPC to add support for the NXP LPC 1343 ( smaller cousin to the NXP LPC 1768 ) , i?ve successfully added in all the correct units , can get FPC to recompile with my changes but i am wondering how i would recompile lazarus so i could debug any application i create. ( ie write the smalll nongui app in lazarus , compile it , Update the board using flashmagic ( or the command prompt utility ) and debug via gdb using a UNLINK2 usb debugging kit. ).. Does Lazarus currently support this , i know i can write my own application save the file and compile using a command like this fpc -Parm -Tembedded -Wplpc1343 -Cparmv7m myprogram.pp Can we extend lazarus so we can create embedded arm applications ? ( if it allready does this i would love to know what type of project to select when selecting NEW.. & how to set the subarch setting for the ARM Family.)I only ask as i want to be able to write my own app in lazarus and debug it there too.. i am not sure how i would debug otherwiseKind RegardsJustin

AFAIK the IDE code tools work for the embedded/arm platform. That means you can work under Linux/Windows/..., set the project's target OS to embedded and target CPU to arm and all code tools work with the RTL of this target. If not, then please create a bug report. You have to add the -Wplpc1343 -Cparmv7min to the project's custom options.
Maybe others can give some hints about debugging.

Mattias

Reply by email

Koenraad Lelong
to Michael Ring: as Michael already wrote we are currently integrating openocd into lazarus, the…
Michael Ring wrote 14 lines
Hi Justin, as Michael already wrote we are currently integrating openocd into lazarus, the integration is already working but needs some testing. I would love to see that somebody else besides me gives the implementation a try. If Unlink2 is supported by openocd you should be fine, same is true if unlink2 brings it's own gdbserver. What OS are you working on, MacOS, Windows or linux? Michael

Hi Micheal,

I would like to test this. Could you give a link to the wiki-page ?

P.S. can you make executables with your compiler ? How did you make your compiler ? I always get an error about not being able to link (see my post of jan 30, 18:26 in the fpc-pascal list).
FWIW, I made a virtual machine : x386 with fpc 2.7.1, arm-none-eabi- toolchain, available on susestudio.com.
Is there a way to make big files available, without being forced to have an account on the service (like dropbox or susestudio) ?

Thanks,

Koenraad Lelong.

Reply by email

Michael Schnell
to Koenraad Lelong
Koenraad Lelong wrote
I would like to test this. Could you give a link to the wiki-page ?

We did not start it yet. Supposedly first a German version will be done. Ill translate it to English when it's ready.

P.S. can you make executables with your compiler ?

Andy already built a workable arm (v5 le) cross-compiler as a x86 executable. I am currently working on compiling same as an x86-64 executable (on Linux).

-Michael

Reply by email

Koenraad Lelong
to Michael Schnell
Michael Schnell wrote 7 lines
On 02/14/2013 04:46 PM, Koenraad Lelong wrote: > > I would like to test this. Could you give a link to the wiki-page ? We did not start it yet. Supposedly first a German version will be done. Ill translate it to English when it's ready. >

Hi,

I don't mind the German version. I have no problems reading German. Writing is a bit more difficult for me ;-).

Show quoted text 5 lines
> P.S. can you make executables with your compiler ? Andy already built a workable arm (v5 le) cross-compiler as a x86 executable. I am currently working on compiling same as an x86-64 executable (on Linux).

What I mean with an executable is the result of a crosscompiled source, a binary you run on your embedded-arm-processor.

Regards,

Koenraad Lelong

Reply by email

Michael Ring
to Koenraad Lelong: I would like to test this. Could you give a link to the wiki-page ? P.S. can you make…

Koenraad, I have played with the crosscompiler under linux and I (hopefully) found a hack to workarround your problem, please see me answer to your original mail from a few minutes ago in fpc-pascal.

I am now compiling a small howto on how to build & use lazarus with openocd support, this could, once it is done perhaps be added to the (very instructive) wiki article on
http://wiki.freepascal.org/TARGET_Embedded

Michael

Koenraad Lelong wrote 39 lines
On 14-02-13 14:51, Michael Ring wrote: > Hi Justin, > > as Michael already wrote we are currently integrating openocd into > lazarus, the integration is already working but needs some testing. I > would love to see that somebody else besides me gives the implementation > a try. > > If Unlink2 is supported by openocd you should be fine, same is true if > unlink2 brings it's own gdbserver. > > What OS are you working on, MacOS, Windows or linux? > > Michael > Hi Micheal, I would like to test this. Could you give a link to the wiki-page ? P.S. can you make executables with your compiler ? How did you make your compiler ? I always get an error about not being able to link (see my post of jan 30, 18:26 in the fpc-pascal list). FWIW, I made a virtual machine : x386 with fpc 2.7.1, arm-none-eabi- toolchain, available on susestudio.com. Is there a way to make big files available, without being forced to have an account on the service (like dropbox or susestudio) ? Thanks, Koenraad Lelong. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Justin Smyth
to Michael Ring

Thanks All ,

I'm happy to test the openocd modification to lazarus , I'm running both x64 Lazarus and x86 lazarus on my copy of win8 Pro x64 & a copy of both on a win7 x64 pc.

i should have my ulink2 kit soon , ordered recently , so once i have it i would be able to help test the changes needed for lazarus for openocd .

Kind Regards

Justin

Earlier message 60 lines
-----Original Message----- From: Michael Ring Sent: Friday, February 15, 2013 6:15 AM To: Subject: Re: [Lazarus] Lazarus and Arm Embedded.( see FPC Bug report 23844) Koenraad, I have played with the crosscompiler under linux and I (hopefully) found a hack to workarround your problem, please see me answer to your original mail from a few minutes ago in fpc-pascal. I am now compiling a small howto on how to build & use lazarus with openocd support, this could, once it is done perhaps be added to the (very instructive) wiki article on http://wiki.freepascal.org/TARGET_Embedded Michael Am 14.02.13 16:46, schrieb Koenraad Lelong: > On 14-02-13 14:51, Michael Ring wrote: >> Hi Justin, >> >> as Michael already wrote we are currently integrating openocd into >> lazarus, the integration is already working but needs some testing. I >> would love to see that somebody else besides me gives the implementation >> a try. >> >> If Unlink2 is supported by openocd you should be fine, same is true if >> unlink2 brings it's own gdbserver. >> >> What OS are you working on, MacOS, Windows or linux? >> >> Michael >> > > Hi Micheal, > > I would like to test this. Could you give a link to the wiki-page ? > > P.S. can you make executables with your compiler ? How did you make your > compiler ? I always get an error about not being able to link (see my post > of jan 30, 18:26 in the fpc-pascal list). > FWIW, I made a virtual machine : x386 with fpc 2.7.1, arm-none-eabi- > toolchain, available on susestudio.com. > Is there a way to make big files available, without being forced to have > an account on the service (like dropbox or susestudio) ? > > Thanks, > > Koenraad Lelong. > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > --

Reply by email

Michael Ring
to Justin Smyth

Great, and also a big thaks for providing the unit for the NXP LPC 1343, I just saw it materializing in svn ;-)

Please contact me when you ulink2 kit has arrived...

Michael

Justin Smyth wrote 89 lines
Thanks All , I'm happy to test the openocd modification to lazarus , I'm running both x64 Lazarus and x86 lazarus on my copy of win8 Pro x64 & a copy of both on a win7 x64 pc. i should have my ulink2 kit soon , ordered recently , so once i have it i would be able to help test the changes needed for lazarus for openocd . Kind Regards Justin -----Original Message----- From: Michael Ring Sent: Friday, February 15, 2013 6:15 AM To: Subject: Re: [Lazarus] Lazarus and Arm Embedded.( see FPC Bug report 23844) Koenraad, I have played with the crosscompiler under linux and I (hopefully) found a hack to workarround your problem, please see me answer to your original mail from a few minutes ago in fpc-pascal. I am now compiling a small howto on how to build & use lazarus with openocd support, this could, once it is done perhaps be added to the (very instructive) wiki article on http://wiki.freepascal.org/TARGET_Embedded Michael Am 14.02.13 16:46, schrieb Koenraad Lelong: > On 14-02-13 14:51, Michael Ring wrote: >> Hi Justin, >> >> as Michael already wrote we are currently integrating openocd into >> lazarus, the integration is already working but needs some testing. I >> would love to see that somebody else besides me gives the >> implementation >> a try. >> >> If Unlink2 is supported by openocd you should be fine, same is true if >> unlink2 brings it's own gdbserver. >> >> What OS are you working on, MacOS, Windows or linux? >> >> Michael >> > > Hi Micheal, > > I would like to test this. Could you give a link to the wiki-page ? > > P.S. can you make executables with your compiler ? How did you make > your compiler ? I always get an error about not being able to link > (see my post of jan 30, 18:26 in the fpc-pascal list). > FWIW, I made a virtual machine : x386 with fpc 2.7.1, arm-none-eabi- > toolchain, available on susestudio.com. > Is there a way to make big files available, without being forced to > have an account on the service (like dropbox or susestudio) ? > > Thanks, > > Koenraad Lelong. > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130214/900bce13/attachment.html>

Reply by email

Justin Smyth
to Michael Ring

Dont worry i will let you know ,

i want to be able to write some code and debug it right away in lazarus.

You?ll prob laugh at what my end point is ? controlling my pc at home , its got 3.8Tb in Raid 5 , with a noctua D14 fan on it and i?m going to measure the heat from the drives in the array and use the board to calculate the speed of the fan that i?ve got in front of the array (and also take note of the time of the day , as fan noise @ night here is a no no.) ... my rig might be old but it still got heaps of grunt ? Intel Q6600 @ 3Ghz , 5 * 1Tb Black in Raid5 , 1 * Sata 3 2Tb HDD , blue ray burner etc tec

Earlier message 77 lines
From: Michael Ring Sent: Friday, February 15, 2013 8:42 AM To: Lazarus mailing list Subject: Re: [Lazarus] Lazarus and Arm Embedded.( see FPC Bug report 23844) Great, and also a big thaks for providing the unit for the NXP LPC 1343, I just saw it materializing in svn ;-) Please contact me when you ulink2 kit has arrived... Michael Am 14.02.13 22:30, schrieb Justin Smyth: Thanks All , I'm happy to test the openocd modification to lazarus , I'm running both x64 Lazarus and x86 lazarus on my copy of win8 Pro x64 & a copy of both on a win7 x64 pc. i should have my ulink2 kit soon , ordered recently , so once i have it i would be able to help test the changes needed for lazarus for openocd . Kind Regards Justin -----Original Message----- From: Michael Ring Sent: Friday, February 15, 2013 6:15 AM To: Subject: Re: [Lazarus] Lazarus and Arm Embedded.( see FPC Bug report 23844) Koenraad, I have played with the crosscompiler under linux and I (hopefully) found a hack to workarround your problem, please see me answer to your original mail from a few minutes ago in fpc-pascal. I am now compiling a small howto on how to build & use lazarus with openocd support, this could, once it is done perhaps be added to the (very instructive) wiki article on http://wiki.freepascal.org/TARGET_Embedded Michael Am 14.02.13 16:46, schrieb Koenraad Lelong: On 14-02-13 14:51, Michael Ring wrote: Hi Justin, as Michael already wrote we are currently integrating openocd into lazarus, the integration is already working but needs some testing. I would love to see that somebody else besides me gives the implementation a try. If Unlink2 is supported by openocd you should be fine, same is true if unlink2 brings it's own gdbserver. What OS are you working on, MacOS, Windows or linux? Michael Hi Micheal, I would like to test this. Could you give a link to the wiki-page ? P.S. can you make executables with your compiler ? How did you make your compiler ? I always get an error about not being able to link (see my post of jan 30, 18:26 in the fpc-pascal list). FWIW, I made a virtual machine : x386 with fpc 2.7.1, arm-none-eabi- toolchain, available on susestudio.com. Is there a way to make big files available, without being forced to have an account on the service (like dropbox or susestudio) ? Thanks, Koenraad Lelong. --

Reply by email

Michael Schnell
to Koenraad Lelong: I don't mind the German version. I have no problems reading German. Writing is a bit more…
Koenraad Lelong wrote
I don't mind the German version. I have no problems reading German. Writing is a bit more difficult for me ;-).

So please see here:
http://www.lazarusforum.de/viewtopic.php?f=4&t=6645&start=60 and
http://www.lazarusforum.de/viewtopic.php?f=9&t=6664&start=45 and maybe
http://www.lazarusforum.de/viewtopic.php?f=10&t=6654

What I mean with an executable is the result of a crosscompiled source, a binary you run on your embedded-arm-processor.

Yep. That does work for Andy (on a 32 Bit Linux). (I don't know if he already tried to use Lazarus to call the compiler on that behalf or if he only did in on the command line. But Lazarus should not be a great problem.) I am still trying to make it work on a 64 Bit Debian.

-Michael

Reply by email

Justin Smyth
to Michael Schnell

when you have something regarding embedded arm ( Target embedded ) in german let me know , i dont need to speak or under stand german , i just use google translator which works great for me.

Earlier message 29 lines
-----Original Message----- From: Michael Schnell Sent: Friday, February 15, 2013 8:15 PM To: Lazarus mailing list Subject: Re: [Lazarus] Lazarus and Arm Embedded.( see FPC Bug report 23844) On 02/14/2013 08:05 PM, Koenraad Lelong wrote: > > I don't mind the German version. I have no problems reading German. > Writing is a bit more difficult for me ;-). So please see here: http://www.lazarusforum.de/viewtopic.php?f=4&t=6645&start=60 and http://www.lazarusforum.de/viewtopic.php?f=9&t=6664&start=45 and maybe http://www.lazarusforum.de/viewtopic.php?f=10&t=6654 > > What I mean with an executable is the result of a crosscompiled source, a > binary you run on your embedded-arm-processor. Yep. That does work for Andy (on a 32 Bit Linux). (I don't know if he already tried to use Lazarus to call the compiler on that behalf or if he only did in on the command line. But Lazarus should not be a great problem.) I am still trying to make it work on a 64 Bit Debian. -Michael --

Reply by email