Sign in Join

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

Mailing lists / fpc-pascal / 2012-09

FPC + fpGUI + Raspberry Pi = fantastic

26 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with my Pi. I downloaded the FPC+fpGUI ARM archive (only a 3.5MB download), packaged by Paul Breneman.

http://www.turbocontrol.com/easyfpgui.htm

[Awesome work there, Paul. You can get much easier than than. Just unpack and you are ready to work.]

It works fantastically well. I could compile all the fpGUI demos without me having to do anything extra in fpGUI. How cool is that! :-)

All I had to do to get my projects to link successfully, was to install a few missing packages, which were not included with the Debian 6 distro for the Pi.

sudo apt-get update
sudo apt-get install libX11-dev libXft-dev

I'll have to speak to somebody to see if they could include it as standard - after all, the Pi is meant for developers to play with. If anybody has contacts, please let me know.

I even compiled and ran the more complex fpGUI apps like the GUI Forms Designer, DocView (help viewer), and Maximus (a sample fpGUI IDE). Even FPTest (my Free Pascal Unit Testing project works).

We (our company) have some big plans for the Raspberry Pi, with a potentially huge deployment. The first tests with this device is very promising.

Kudos must also go to the FPC team, for supporting ARM so well!

Maybe with the Raspberry Pi and Free Pascal, we can get Object Pascal back on the map, and in the hands of young developers. After all, Pascal was initially designed as a teaching language - easy to learn, read and write.

Regards,
- Graeme -

Marcos Douglas
to Graeme Geldenhuys
Graeme Geldenhuys wrote 39 lines
Hi, I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with my Pi. I downloaded the FPC+fpGUI ARM archive (only a 3.5MB download), packaged by Paul Breneman. http://www.turbocontrol.com/easyfpgui.htm [Awesome work there, Paul. You can get much easier than than. Just unpack and you are ready to work.] It works fantastically well. I could compile all the fpGUI demos without me having to do anything extra in fpGUI. How cool is that! :-) All I had to do to get my projects to link successfully, was to install a few missing packages, which were not included with the Debian 6 distro for the Pi. sudo apt-get update sudo apt-get install libX11-dev libXft-dev I'll have to speak to somebody to see if they could include it as standard - after all, the Pi is meant for developers to play with. If anybody has contacts, please let me know. I even compiled and ran the more complex fpGUI apps like the GUI Forms Designer, DocView (help viewer), and Maximus (a sample fpGUI IDE). Even FPTest (my Free Pascal Unit Testing project works). We (our company) have some big plans for the Raspberry Pi, with a potentially huge deployment. The first tests with this device is very promising. Kudos must also go to the FPC team, for supporting ARM so well! Maybe with the Raspberry Pi and Free Pascal, we can get Object Pascal back on the map, and in the hands of young developers. After all, Pascal was initially designed as a teaching language - easy to learn, read and write.

Awesome!

Marcos Douglas

Mark Morgan Lloyd
to Graeme Geldenhuys: I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with…
Graeme Geldenhuys wrote 5 lines
Hi, I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with my Pi. I downloaded the FPC+fpGUI ARM archive (only a 3.5MB download), packaged by Paul Breneman.

Nice one.

Show quoted text 10 lines
All I had to do to get my projects to link successfully, was to install a few missing packages, which were not included with the Debian 6 distro for the Pi. sudo apt-get update sudo apt-get install libX11-dev libXft-dev I'll have to speak to somebody to see if they could include it as standard - after all, the Pi is meant for developers to play with. If anybody has contacts, please let me know.

I think I've had to install those on any Debian system I've used for development, so for any change you'd be up against the entire Debian philosophy. Good luck.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Johann Glaser
to Graeme Geldenhuys: I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with…

Hi!

Graeme Geldenhuys wrote 39 lines
Hi, I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with my Pi. I downloaded the FPC+fpGUI ARM archive (only a 3.5MB download), packaged by Paul Breneman. http://www.turbocontrol.com/easyfpgui.htm [Awesome work there, Paul. You can get much easier than than. Just unpack and you are ready to work.] It works fantastically well. I could compile all the fpGUI demos without me having to do anything extra in fpGUI. How cool is that! :-) All I had to do to get my projects to link successfully, was to install a few missing packages, which were not included with the Debian 6 distro for the Pi. sudo apt-get update sudo apt-get install libX11-dev libXft-dev I'll have to speak to somebody to see if they could include it as standard - after all, the Pi is meant for developers to play with. If anybody has contacts, please let me know. I even compiled and ran the more complex fpGUI apps like the GUI Forms Designer, DocView (help viewer), and Maximus (a sample fpGUI IDE). Even FPTest (my Free Pascal Unit Testing project works). We (our company) have some big plans for the Raspberry Pi, with a potentially huge deployment. The first tests with this device is very promising. Kudos must also go to the FPC team, for supporting ARM so well! Maybe with the Raspberry Pi and Free Pascal, we can get Object Pascal back on the map, and in the hands of young developers. After all, Pascal was initially designed as a teaching language - easy to learn, read and write.

Congrulations!

I also played with it, but only did a small "Hello World!" program. :-) http://johann-glaser.blogspot.co.at/2012/06/raspberry-pi.html

Bye
Hansi

Graeme Geldenhuys
to Mark Morgan Lloyd: Nice one. I think I've had to install those on any Debian system I've used for…
Mark Morgan Lloyd wrote
I think I've had to install those on any Debian system I've used for development, so for any change you'd be up against the entire Debian philosophy. Good luck.

I don't think one needs to approach the Debian guys directly. I think one should only need to speak to the people that put together the "pre packaged" Debian 6 for Pi OS image. That OS image comes pre-configured with a 'pi' user, and the desktop already contains icons for Python development, and some sample Python games.

I bought the OS image on a 4GB SD card, but there is about 2GB free on that SD card. So ample space for the libX11-dev and libXft-dev packages, and the 5MB needed for the FPC+fpGUI archive.

Regards,
- Graeme -

Graeme Geldenhuys
to Johann Glaser: Hi! Congrulations! I also played with it, but only did a small "Hello World!" program. :-)
Johann Glaser wrote
I also played with it, but only did a small "Hello World!" program. :-)

:-)

Thanks for the hint on your blog about making screenshots. I was just about to Google on how to do that from inside 'Debian 6 for Pi'. The normal 'xwd' or 'import' applications where not available (the latter one pulls in too much dependencies). I'll try 'scrot' now.

Regards,
- Graeme -

Den Jean
to Graeme Geldenhuys
Graeme Geldenhuys wrote
normal 'xwd' or 'import' applications where not available (the latter

I do not have a Rasberry, but I noticed that libqt4pas-dev is available in the packages (just like on the N900). Thx to Matthias Klumpp.

Would you be so kind to try one of the qt4 binding demo programs just to verify that it works ? Screenshots are welcome.

Btw fpGui is ofcourse fantastic :-)

Package List:
http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages brief listing: grep -P '^Package:' Packages | cut -d' ' -f2

Kind regards,

Den Jean

Johann Glaser
to Graeme Geldenhuys: :-) Thanks for the hint on your blog about making screenshots. I was just about to Google…

Hi!

Graeme Geldenhuys wrote 12 lines
On 13/09/12 17:35, Johann Glaser wrote: > > I also played with it, but only did a small "Hello World!" program. :-) :-) > http://johann-glaser.blogspot.co.at/2012/06/raspberry-pi.html Thanks for the hint on your blog about making screenshots. I was just about to Google on how to do that from inside 'Debian 6 for Pi'. The normal 'xwd' or 'import' applications where not available (the latter one pulls in too much dependencies). I'll try 'scrot' now.

Haha, yes, I was searching for that a while. :-)

Bye
Hansi

Paul Breneman
to Graeme Geldenhuys: I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with…
Graeme Geldenhuys wrote 24 lines
Hi, I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with my Pi. I downloaded the FPC+fpGUI ARM archive (only a 3.5MB download), packaged by Paul Breneman. http://www.turbocontrol.com/easyfpgui.htm [Awesome work there, Paul. You can get much easier than than. Just unpack and you are ready to work.] It works fantastically well. I could compile all the fpGUI demos without me having to do anything extra in fpGUI. How cool is that! :-) All I had to do to get my projects to link successfully, was to install a few missing packages, which were not included with the Debian 6 distro for the Pi. sudo apt-get update sudo apt-get install libX11-dev libXft-dev I'll have to speak to somebody to see if they could include it as standard - after all, the Pi is meant for developers to play with. If anybody has contacts, please let me know.

Hi Graeme, I got my RPi a couple of days ago so we are on the same page! :) Thanks for all your great work with fpGUI!

I used this *very* easy method to load Debian on my RPi: http://www.berryterminal.com/doku.php/berryboot

I even compiled and ran the more complex fpGUI apps like the GUI Forms Designer, DocView (help viewer), and Maximus (a sample fpGUI IDE). Even FPTest (my Free Pascal Unit Testing project works).

DbgTerm doesn't compile so I hope to update SynaSer for that ASAP.

Show quoted text 10 lines
We (our company) have some big plans for the Raspberry Pi, with a potentially huge deployment. The first tests with this device is very promising. Kudos must also go to the FPC team, for supporting ARM so well! Maybe with the Raspberry Pi and Free Pascal, we can get Object Pascal back on the map, and in the hands of young developers. After all, Pascal was initially designed as a teaching language - easy to learn, read and write.

I have the separate pieces on the educational project page and hope to write a tutorial soon so a 12-year-old could spend less than $100 (US) and program an embedded RPi to monitor house temperatures and send emails and text messages (daily or more often if temps out of range).

I also think we should take advantage of the RPi educational opportunities. If someday we can get a phone with native Linux that too will hopefully be easy to program like the RPi.

www.TurboControl.com/monitor.htm

Marco van de Voort
to Graeme Geldenhuys: I don't think one needs to approach the Debian guys directly. I think one should only…

In our previous episode, Graeme Geldenhuys said:

Show quoted text 7 lines
> I think I've had to install those on any Debian system I've used for > development, so for any change you'd be up against the entire Debian > philosophy. Good luck. I don't think one needs to approach the Debian guys directly. I think one should only need to speak to the people that put together the "pre packaged" Debian 6 for Pi OS image.

Is that the old squeeze or Raspbian?

Marco van de Voort
to Graeme Geldenhuys

In our previous episode, Graeme Geldenhuys said:

> Is that the old squeeze or Raspbian? I have the "wheezy" one, which I believe is Raspbian?

As far as I got it (I'm sure Peter G. can explain it better):

Wheezy is a debian designation. Afaik Debian only supports two ARM targets, armv5 (EABI, no hardware float) and armv7 (eabi-hf, vfp3-D16).

The pi is armv6 (eabi, vfp2), isn't fully compatible to the formal v7 -hf debian target, and thus would have to live with lowest common denomitor armv5, despite having (vfp2) hardware float support

So there is a custom build for v6/vfp(2?) with the name of raspbian. So Raspian is based on Wheezy source level, but compiled for armv6.

But the images from the PI website with "Wheezy" in their name are v5, and thus not hf. A month or so back, the PI foundation changed their default distro from "wheezy" (eabi,v5) to raspbian.

Graeme Geldenhuys
to Marco van de Voort
Marco van de Voort wrote
But the images from the PI website with "Wheezy" in their name are v5, and thus not hf. A month or so back, the PI foundation changed their default distro from "wheezy" (eabi,v5) to raspbian.

Thanks for the info. I'll take a look of the foundation website. Mounting my SD card in my normal PC, it seem my Pi OS images is dated 2012-06-17 (based on /etc/rpi-issue file). Also many of the /etc/ files are dated 17 June 2012.

Regards,
- Graeme -

Mark Morgan Lloyd
to Graeme Geldenhuys: I received my Raspberry Pi today, and had a bit of a play. I'm using the Debian 6 OS with…
Graeme Geldenhuys wrote
I even compiled and ran the more complex fpGUI apps like the GUI Forms Designer, DocView (help viewer), and Maximus (a sample fpGUI IDE). Even FPTest (my Free Pascal Unit Testing project works).

I don't believe you've mentioned Maximus here before, does it pull in the form designer etc.? I wonder whether it would run on Solaris 8 which doesn't have some of the libraries required for Lazarus?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Graeme Geldenhuys
to Marco van de Voort: In our previous episode, Graeme Geldenhuys said: As far as I got it (I'm sure Peter G.…
Marco van de Voort wrote
thus not hf. A month or so back, the PI foundation changed their default distro from "wheezy" (eabi,v5) to raspbian.

So far the Raspbian image is pretty rubbish, compared to the pre-configure one I bought on my SD card. I guess the "raspbian" it too much "bleeding egde" (read super unstable). The Raspbian one has errors in raspi-config, so I can set my Dvorak keyboard layout. Eventually figuring out where the keys are in Qwerty, I managed to start X. The desktop that loads has NO icons, no menu items, and the menu items that do exist don't work. I couldn't even manage to run a lxterminal. I can't even exit the OpenBox session that is running - I had to Ctrl+Alt+F1 and then Ctrl+C to kill the X server. The mouse pointer is also really slugish in the X session, and freezes for a split second every 2-3 seconds. It's like something is polling the system every 2-3 seconds, and freezing the UI while it does.

So for now, I'll restore back to my original Debian 6 "wheezy" (thank goodness I took a backup) where things worked much smoother. It might not be the most optimised OS for the Raspberry Pi, but it works much better.

I'll report my problems, so hopefully in the next Raspbian release things will work better.

Regards,
- Graeme -

Marco van de Voort
to Graeme Geldenhuys

In our previous episode, Graeme Geldenhuys said:

Show quoted text 12 lines
So far the Raspbian image is pretty rubbish, compared to the pre-configure one I bought on my SD card. I guess the "raspbian" it too much "bleeding egde" (read super unstable). The Raspbian one has errors in raspi-config, so I can set my Dvorak keyboard layout. Eventually figuring out where the keys are in Qwerty, I managed to start X. The desktop that loads has NO icons, no menu items, and the menu items that do exist don't work. I couldn't even manage to run a lxterminal. I can't even exit the OpenBox session that is running - I had to Ctrl+Alt+F1 and then Ctrl+C to kill the X server. The mouse pointer is also really slugish in the X session, and freezes for a split second every 2-3 seconds. It's like something is polling the system every 2-3 seconds, and freezing the UI while it does.

Strange. For the the Raspbian image was a spitting image of the wheezy install (both the process as the result). Same icons, nearly the same place, midori still to slow to do something practical ( :-))

I don't notice performance impacts, one of the reasons to get the PI was to get something with arm fpu. I already have armv5's enough.

Did you get the foundation recommended image, or did you get some daily build or so?

Graeme Geldenhuys
to Mark Morgan Lloyd: I don't believe you've mentioned Maximus here before, does it pull in the form designer…
Mark Morgan Lloyd wrote
I don't believe you've mentioned Maximus here before, does it pull in the form designer etc.?

Maximus is very basic at the moment. A project manager, syntax highlighting in editor, macro support in the settings dialogs, Find and Procedure List (filtered searching of current unit), build groups etc.

No debugging, code completion, code templates or code navigation yet. I still need to figure out how to integrate fcl-passrc parser to enable such features. At the moment the goal of Maximus is more an "advanced demo", than a full feature IDE. I like the idea of fpGUI being independent of any IDE.

I wonder whether it would run on Solaris 8 which doesn't have some of the libraries required for Lazarus?

I've tested in OpenSolaris 2009 release, but I don't have Solaris 8 to try. I can say that I have run fpGUI executables under Linux SUSE 9.0 (almost 10 year old distro) too, without any issues. fpGUI only needs the most basic X11 and Xft libraries - nothing else. This makes it work on just about any system that can run X11.

Regards,
- Graeme -

Mark Morgan Lloyd
to Graeme Geldenhuys
Graeme Geldenhuys wrote 10 lines
On 14/09/12 09:10, Mark Morgan Lloyd wrote: > > I don't believe you've mentioned Maximus here before, does it pull in > the form designer etc.? I've tested in OpenSolaris 2009 release, but I don't have Solaris 8 to try. I can say that I have run fpGUI executables under Linux SUSE 9.0 (almost 10 year old distro) too, without any issues. fpGUI only needs the most basic X11 and Xft libraries - nothing else. This makes it work on just about any system that can run X11.

I've just taken a look, and while libXft is available for Solaris 10 (see http://wiki.lazarus.freepascal.org/Lazarus_on_Solaris) it's not available for Solaris 8 (SunOS 5.8). It was just an idle query... it might turn out to be possible to build it by taking sources of about the right age from e.g. Slackware 8.1, but right now I've got too much else on my plate to get into this.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Graeme Geldenhuys
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
It was just an idle query... it might turn out to be possible to build it by taking sources of about the right age from e.g. Slackware 8.1, but right now I've got too much else on my plate to get into this.

The alternative is to revert fpGUI to using the old non-Xft processed fonts in X11 - thus giving very ugly looking fonts. That was the original font support in fpGUI, but I quickly introduced Xft support to have better looking text in my applications. :)

Graeme.

Graeme Geldenhuys
to Mark Morgan Lloyd: I've just taken a look, and while libXft is available for Solaris 10 (see…
Mark Morgan Lloyd wrote
It was just an idle query... it might turn out to be possible to build it by taking sources of about the right age from e.g. Slackware 8.1, but right now I've got too much else on my plate to get into this.

Thinking about it, there is a 100% Pascal implementation of Xft. I read about it in the Lazarus Forums, and I think it is used in LCL-CustomDrawn widgetset. I don't know how complete that implementation is compared to the Xft library though. So if you really wanted to, you could use that instead of linking to the Xft library.

Regards,
- Graeme -

Mark Morgan Lloyd
to Graeme Geldenhuys: The alternative is to revert fpGUI to using the old non-Xft processed fonts in X11 - thus…
Graeme Geldenhuys wrote 9 lines
On 14/09/12 14:22, Mark Morgan Lloyd wrote: > It was just an idle query... it might turn out to be possible to build > it by taking sources of about the right age from e.g. Slackware 8.1, but > right now I've got too much else on my plate to get into this. The alternative is to revert fpGUI to using the old non-Xft processed fonts in X11 - thus giving very ugly looking fonts. That was the original font support in fpGUI, but I quickly introduced Xft support to have better looking text in my applications. :)

Is there an easy way to do that? Even if not pretty I think it might be useful from the POV of broadening the range of platforms that FPC can do GUI work on.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Mark Morgan Lloyd
to Graeme Geldenhuys: Thinking about it, there is a 100% Pascal implementation of Xft. I read about it in the…
Graeme Geldenhuys wrote 10 lines
On 14/09/12 14:22, Mark Morgan Lloyd wrote: > It was just an idle query... it might turn out to be possible to build > it by taking sources of about the right age from e.g. Slackware 8.1, but > right now I've got too much else on my plate to get into this. Thinking about it, there is a 100% Pascal implementation of Xft. I read about it in the Lazarus Forums, and I think it is used in LCL-CustomDrawn widgetset. I don't know how complete that implementation is compared to the Xft library though. So if you really wanted to, you could use that instead of linking to the Xft library.

Interesting, and again something that could be useful as a way of broadening FPC's platform support.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Florian Klämpfl
to Paul Breneman
Paul Breneman wrote 8 lines
Three minimal FPC and fpGUI distros were just updated on this page: http://www.turbocontrol.com/easyfpgui.htm The serial debug terminal (uses SynaSer part of Synapse) now compiles and the RPi works with my Gearmo USB to serial adapters (that use FTDI chipsets). Should be fun to see what embedded projects the RPi can be used in... :)

Is there any unit/lazarus component yet which allows easily to program the Raspi I/O?

Graeme Geldenhuys
to Paul Breneman: Three minimal FPC and fpGUI distros were just updated on this page:…
Paul Breneman wrote
Three minimal FPC and fpGUI distros were just updated on this page: http://www.turbocontrol.com/easyfpgui.htm

Awesome, thanks Paul. I can see I'll have to order another RPi, or more SD cards. :-) The Raspxbmc distro works really well as a media centre, so is hogged in the lounge at the moment.

Should be fun to see what embedded projects the RPi can be used in... :)

Definitely! One of my next RPi projects is to see if I can build a 3D printer based on the RPi board.

Regards,
- Graeme -