* * *

Author Topic: Free Pascal console programs on Android are easy  (Read 11673 times)

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Free Pascal console programs on Android are easy
« on: March 15, 2014, 07:21:59 pm »
http://turbocontrol.com/gnuroot.htm is a new (unpublished) web page.  Feedback appreciated!
Regards,
Paul Breneman
www.ControlPascal.com

Leledumbo

  • Hero Member
  • *****
  • Posts: 7575
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Free Pascal console programs on Android are easy
« Reply #1 on: March 16, 2014, 08:04:05 am »
OK, that's cute :D

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #2 on: March 16, 2014, 02:21:30 pm »
Yes, there are now lots of inexpensive Android tablets so the next "phase" will be seeing how many interesting things people come up with.  I really want to load Debian on them and completely get rid of Android, but right now this isn't very easy (Ubuntu is probably a little easier).  LinuxOnAndroid.org is also interesting.  All of those options require rooting the device which I want to avoid as long as possible.  So GNURoot (which doesn't require rooting) is an interesting first step to try.

GNURoot may not allow x11 to work, and I'm also concerned that communication (USB-serial, bluetooth, wifi) won't work.  But I'm still testing.  If any communication works then I guess I could try "Free Vision".   :)  My main (first) goal in this is to be able to run a single console program (for machine control) on an inexpensive tablet.  Maybe even with embedded Firebird (I have an Android tablet with an Intel CPU if that is needed).  A GUI is not required.
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #3 on: March 16, 2014, 05:40:56 pm »
The Free Vision testapp example seems to work for the keyboard, but the mouse doesn't (yet) work.  Maybe non-root Android apps will be a good reason to keep improving Free Vision?   :)

Since wget does work in the GNURoot terminal it seems communication should work.

So things still look interesting for doing machine control!   :)
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #4 on: March 24, 2014, 04:53:20 pm »
Well, maybe I can wait on doing more with Free Vision and use fpGUI instead!  :)

GNURoot has been updated!  See this text: "WheezyX rootfs type added - it has Xterms working. After launching it, use a vncviewer on your Android device or you PC to connect to it."  Now I hope to get Control Terminal working (first for WiFi and Bluetooth, then with USB OTG for Ethernet and Serial)!

http://turbocontrol.com/gnuroot.htm
Regards,
Paul Breneman
www.ControlPascal.com

Arucard1983

  • New member
  • *
  • Posts: 11
Re: Free Pascal console programs on Android are easy
« Reply #5 on: April 05, 2014, 07:47:10 pm »
I tested GnuRoot on my Android Tablet and I can run Lazarus IDE, build PeaZip and run it without issues. Later I will post a guide after updating my patches work on PeaZip port to ARM.

To run X11 apps on GnuRoot you can install the Pelya's XSDL X11 Server from Google Play and run it. You can adjust the screen resolution and the default font size.
The x11 app should be running before launch GnuRoot, otherwise the pipe link will fail.  ::)
 
Then run GnuRoot and install the LXFE or XFCE Desktop Environment from the distro repositories.
So far I tested the Debian Wheezy and the XFCE4 DE.
Once installed (it take a while to install, even it needs to:
apt-get install xfce4 build-essentials
And install about 300 packages)
just run on terminal console:
DISPLAY=127.0.0.1:0.0 startxfce4

Switch to X11 app and done! After 20 to 30 seconds the Debian XFCE4 Desktop Environment is up and you can use (almost) any Linux application.

To install the Lazarus IDE from scratch, just pick the ARM build of FPC from sourceforge, the FPC souce code and the Lazarus source code.
Install FPC, unpack FPC source to /usr/share/fpc, and Lazarus source to /home.
Install the GTK source toolkits (I don't remembre all details  %))
# apt-get install gtk* (errm..) :(

Jump to Lazarus folder root and compile:
# make clean bigite
If someone fails, like "not found library gtk2", search the debian packages to find a particular library. (It was about 15!)
Once built sucefully, just install it:
#make install

And then:
# startlazarus

Lazarus IDE running on Android !  :D :)

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #6 on: May 10, 2014, 02:06:42 am »
http://turbocontrol.com/gnuroot.htm

I just updated the above web page with a Control Terminal console program that uses Synapse to get the header of a web page.  Nice to see what can be done with a 2 MB zip and Free Pascal and Synapse.  Thanks for the great tools!
Regards,
Paul Breneman
www.ControlPascal.com

bee

  • Sr. Member
  • ****
  • Posts: 272
Re: Free Pascal console programs on Android are easy
« Reply #7 on: May 10, 2014, 03:39:15 pm »
Any hope to have graph unit working on Android console? That would be great for making little retro games. :D
-Bee-

A long time pascal lover.

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #8 on: May 12, 2014, 09:05:03 pm »
I just added a new file with the Free Vision testapp but the keyboard Alt-X and the mouse still don't work.  Any suggestions?
http://turbocontrol.com/gnuroot.htm
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #9 on: May 14, 2014, 09:33:02 pm »
Sorry Bee that I didn't reply to your message before, but I think graphics will require X11 which I'm trying to avoid right now.  Seeing how far I can get with Free Vision seems better and more fun!   :)

I just added new --051414.zip files (3 of them) which are working much better:  http://turbocontrol.com/gnuroot.htm
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #10 on: May 20, 2014, 11:44:42 pm »
I keep trying to go further every week!   :)

I just added 3 zips (4.9 MB to 5.6 MB) that use Free Pascal 2.6.4 and also can compile the textmode IDE.  This should make it easier to work with Free Vision.  The new zips are available on this page:
http://ctrlterm.com/ports.htm

I hope to update this page soon:
http://turbocontrol.com/gnuroot.htm
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #11 on: May 21, 2014, 05:34:26 am »
The FPC 2.6.4 zips work for i386 Win32 and i386 Linux, but the ARM Linux fails to compile one (of three) programs.  The same program worked with FPC 2.6.2 but with 2.6.4 whenever I put SynaSer or BlckSock (Synapse units) in the uses it fails:

./fpcunits/cprt0.o: In function '_haltproc_eabi':
(.text+0x88): undefined reference to '_fini'
./fpcunits/cprt0.o: In function '_haltproc_eabi':
(.text+0x90): undefined reference to '_init'
--- Error: Error while linking

Seems that those two Synapse units may be exposing a FPC 2.6.4 bug?

Two Free Vision apps (in the same zip) work OK with FPC 2.6.4.

*********************

There are 2-6 MB zips on this page:
  http://ctrlterm.com/ports.htm

The ARM -051414.zip works but the -052014.zip doesn't.  I can't test on my Raspberry Pi at the moment, so I'm testing on a Nexus 7 tablet.
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #12 on: May 26, 2014, 11:52:33 pm »
Here is something from a year ago but I don't think it is related to my current problem: http://bugs.freepascal.org/view.php?id=24518

I just went back to FPC 2.6.2 so everything works (even though kept 2.6.4 IDE source code).  On Android the IDE seems to work and Alt-F10 gets the menu opened up (which is nice).  Alt-X doesn't work (but F5 does).

Now I hope to finish porting CtrlTerm to Free Vision.  Then it will be easier to see what all (serial, Ethernet) works.  :)
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #13 on: September 18, 2014, 04:18:34 pm »
For the past four months I've been busy with comedi and PicoScope (see http://www.ctrlpascal.com/ if interested).

With GNUroot I hope to work on two things soon:
1) Try Wheezy-x86 on my Android x86 tablet
2) Try to get the mouse to work as that would be very nice for Free Vision apps

Any suggestions would be appreciated very much!
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Full Member
  • ***
  • Posts: 240
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #14 on: January 02, 2015, 12:22:13 pm »
Wintel might have found a way to compete with Android!   :)

On 23 Dec. 2014 I purchased a new 7" tablet with Windows 8.1 for $60 (USA).  Details are here:  http://turbocontrol.com/gnuroot.htm

The touchscreen works with Free Pascal (& fpGUI/Lazarus) programs so this is easy!  Enjoy!  I've already got places to use it!  :)
« Last Edit: January 02, 2015, 12:30:33 pm by Paul Breneman »
Regards,
Paul Breneman
www.ControlPascal.com

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus