Raspberry PI and Beaglebone Black.

For other topics related to the FreeBASIC project or its community.
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby D.J.Peters » Jul 15, 2013 0:03

FreeBASIC on Raspberry PI with ARM6.

1920 × 1080
Image

FreeBASIC on Beaglebone Black with ARM7.

1280 × 720
Image
Last edited by D.J.Peters on Sep 25, 2017 20:35, edited 3 times in total.
BasicCoder2
Posts: 3394
Joined: Jan 01, 2009 7:03

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby BasicCoder2 » Jul 15, 2013 0:35

Ok.

For someone who couldn't follow the technical stuff in this thread can I conclude that if I buy the Raspberry and install a version of Linux I will be able to run my FreeBasic programs?
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby D.J.Peters » Jul 15, 2013 1:36

Hello BasicCoder2
the official version of FreeBASIC is for X86 CPU's (DOS,WIN,Linux,FreeBSD,XBOX...)

I'm working currently on an emitter for ARM CPU's currently ARM6 and ARM7.

You can see on the pictures the result of -gen gcc
it works on Raspberry PI (raspbian debian linux)
and BeagleBone Black (wheezy debian linux)

A version for Angstrom it's under construction but it has bug's atm.

I will inform you all if it stable and we can publish it.

Of course if you buy a PI or BBB i can give you a betha version of fbc and the runtime libs for testing purpose.
(In general if you will use FreeBASIC on Linux you have to install some more libs also.)

Joshy
Last edited by D.J.Peters on Jul 16, 2013 8:32, edited 1 time in total.
ike
Posts: 383
Joined: Jan 17, 2011 18:59

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby ike » Jul 16, 2013 4:54

Joshi that is great!

Just a question:

Is it possible to use Raspberry Pi's (or Beagle) GPIO pins to allow interface with and control of LEDs, switches, analog signals, sensors and other devices???

Ike
TJF
Posts: 3474
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby TJF » Jul 16, 2013 7:39

ike wrote:Is it possible to use Raspberry Pi's (or Beagle) GPIO pins to allow interface with and control of LEDs, switches, analog signals, sensors and other devices???

Speaking about BBB (but should be similar to RaspPi, since both are running under LINUX): You can control GPIO pins by a simple bash script (command line skript). And yes, you also can send the bash commands and receive the returns from a FB programm.

Theoretically (I didn't try it jet) you can write a driver in FB and control the GPIO memory directly, if you need high-speed control.
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby D.J.Peters » Jul 16, 2013 8:26

hello ike some infos for you.

1.) All kinds of general purpose I/O's are defined as device tree under Linux.
2.) All devices under Linux are implemented as simple files. (This are one of the primary differencies between Windos and UNIX/Linux)
3.) All programing langues that can write/read files can be used to control the GPIO's.

Of course you can use all free GPIO's with FreeBASIC too.

Joshy

BBB: http://www.armhf.com/index.php/using-be ... ack-gpios/
PI: http://learn.adafruit.com/adafruits-ras ... p/overview
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby D.J.Peters » Jul 16, 2013 15:02

I got the fbgfx opengl driver compiled today.

I compiled and run many fb examples sucessfull.

all fbGfx examples
OpenGL, GLU, GLFW, NeHe lessons, ...
SDL (gfx, events, audio, net, ...)
Allegro
FreeType
Gtk (only "gdk/gtkgl.bi" has wrong include paths and missing #endif !!)
Threads
...

With debian for ARM CPU's you can install over 100,000 packages
looks like this are the most supported linux distro for ARM devices.

Joshy
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby D.J.Peters » Jul 16, 2013 17:16

Createing dynamic *.so libs for ARM works too now. (fbc -dll ...)

Joshy
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: I got my brand new toys. (ARM Linux new target for fbc)

Postby D.J.Peters » Jul 16, 2013 23:05

Here are FreeBASIC for the PI ARM6 and BBB ARM7
viewtopic.php?f=5&t=21433

Joshy
Last edited by D.J.Peters on Jan 30, 2014 16:30, edited 2 times in total.
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: FreeBASIC ARM6/7 for the Raspberry PI and Beaglebone Bla

Postby D.J.Peters » Jul 17, 2013 3:01

Beaglebone Black ubuntu precise 12.04
1280 × 720
Image

Joshy
Last edited by D.J.Peters on Sep 25, 2017 20:36, edited 4 times in total.
v1ctor
Site Admin
Posts: 3799
Joined: May 27, 2005 8:08
Location: SP / Bra[s]il
Contact:

Re: FreeBASIC ARM6/7 for the Raspberry PI and Beaglebone Bla

Postby v1ctor » Jul 17, 2013 12:26

That´s great to see FB running on ARM. With even gfxlib working fine!

Congratulations Joshy, TJF and everybody else involved!

I guess we could now add the ARM port to FB's source tree, but that depends on dkl or counting_pine that are maintaining the project.
TJF
Posts: 3474
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: FreeBASIC ARM6/7 for the Raspberry PI and Beaglebone Bla

Postby TJF » Jul 17, 2013 15:20

v1ctor wrote:Congratulations Joshy, TJF and everybody else involved!

Yes, thanks!

But congratulations also to dkl, who made the C emitter working well now. That was the basis for our success.
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: FreeBASIC ARM6/7 for the Raspberry PI and Beaglebone Bla

Postby dkl » Jul 17, 2013 15:54

Hey D.J.Peters, could you please post your source code modifications too? I'm very interested in the changes to the makefile, -arch options, ARM linking process and pre-#defines.

For cross-compiling from x86 Linux to ARM Linux, I think we can use "fbc -target arm-linux-gnueabi[hf]" and a /usr/local/lib/freebasic/arm-linux-gnueabi[hf]/libfb.a directory, matching the arm-linux-gnueabi[hf]-gcc cross-compiler toolchains.

But what about cross-compiling from Win32 to ARM Linux, is it enough to use -arch arm and lib/arm-linux/libfb.a, or does it need to be more specific, like -arch arm6 and lib/arm6-linux/libfb.a.

What about soft-float/hard-float anyways, should we have more -arch options to distinguish that, or use a separate command line option like -x hardfloat?
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: FreeBASIC ARM6/7 for the Raspberry PI and Beaglebone Bla

Postby D.J.Peters » Jul 17, 2013 16:02

v1ctor wrote:I guess we could now add the ARM port to FB's source tree ..

dkl wrote:Hey D.J.Peters, could you please post your source code modifications too?...

Currently it's only a binary download for testing purpose.
I found and changed most part's but not all where -gen gcc emitts x86 assembler code.
I change the missing parts by hand before I build fbc on the ARM target.

The makefile file is a modify version too.
I added -D DISABLE_PORTIO -D DISABLE_FBDEV ...
and added some #ifdef DISABLE_XXX in the C source codes too.

It is still too early for an official ARM FreeBASIC version.

Joshy
D.J.Peters
Posts: 7780
Joined: May 28, 2005 3:28

Re: FreeBASIC ARM6/7 for the Raspberry PI and Beaglebone Bla

Postby D.J.Peters » Jul 17, 2013 16:28

For those who can not wait.

download: removed

get it from here viewtopic.php?f=5&t=21433 instead.

Joshy
Last edited by D.J.Peters on Jan 30, 2014 16:32, edited 3 times in total.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests