Running FreeBASIC on virtual or real Raspberry Pi.

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

Running FreeBASIC on virtual or real Raspberry Pi.

Postby D.J.Peters » Aug 26, 2014 2:49

(Sorry about my bad english)
If you like to port your fine game/demo or library to ARM or learning ARM assembler
or you will try fbc for ARM without a ARM computer you can use a Raspberry Pi image for QEMU.

How to run Raspberry Pi on your Windows* box.
(* of course you can use the PI and kernel image from the zip file with your linux qemu also)

note:
user: pi
password: raspberry

1) get qemu with the RPI image. qemu.zip

2) extract the archive

3) click on qemu/qemu/run.bat

4) you can setup your virtual or real PI

In my case I changed:

keyboard layout (german)
locale (de_DE@Euro)
timezone (Europe/Berlin)
set a new password for user: pi (the default is: raspberry)
boot in to graphical environment NO

select finish

Do you like to reboot YES

5) login user: pi
enter your new password
Image
after you logged in you are in your HOME folder

6) Now it's time to update your PI (your host OS in this case your windows need's a working internet connection)

Code: Select all

>sudo apt-get update
>sudo apt-get dist-upgrade

7) start the X server (graphical desktop)

Code: Select all

>startx

Image
If you logout from the desktop manager you will return to the text prompt.
to shutdown linux type

Code: Select all

>sudo halt
!!! Never close the QEMU window while linux is running !!!

Try to install your first app for example geany your prefered IDE for FreeBASIC.
(geany a smal IDE good for FreeBASIC, C/C++ and many more)

Code: Select all

>sudo apt-get install geany
...
Setup FreeBASIC on your virtual or real PI.
Download, extract and install: fbc_linux_armv6_rpi_0204_2016-03-27.zip in your HOME 'pi' folder.

Code: Select all

>wget http://users.freebasic-portal.de/stw/builds/linux-armv6-rpi/fbc_linux_armv6_rpi_0204_2016-03-27.zip
>unzip fbc_linux_armv6_rpi_0204_2016-03-27.zip
>cd fbc_linux_armv6_rpi
>chmod -x ./install.sh
>sudo sh ./install.sh -i
FreeBASIC compiler successfully installed in /usr
>cd ..
>fbc -version

You have a working FreeBASIC for ARM now. :-)
Time to run geany for our first test. (you will find it in the app menu)

Code: Select all

>startx

Image
You can see compiling graphics code will fail we have to install some missing libs.
Type in the terminal window

Code: Select all

>sudo apt-get install libX11-dev
>sudo apt-get install libXext-dev
>sudo apt-get install libXpm-dev
>sudo apt-get install libXrandr-dev
>sudo apt-get install libncurses5-dev
Image

That's all, have fun with FreeBASIC on ARM.

Joshy
Image
Last edited by D.J.Peters on Sep 25, 2017 20:17, edited 5 times in total.
St_W
Posts: 1467
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Running FreeBASIC on virtual or real Raspberry Pi.

Postby St_W » Aug 26, 2014 15:51

I did that for testing automated RasperryPi builds on my Jenkins "server". Unfortunately Rapian inside qemu ran veeeerrry slow at that computer. I both tried several ready-to-use packages (like the one you suggest) and installing directly from the official raspian image.

I tried cross-compiling on Debian too, but there isn't really a good and complete toolchain available. I haven't tried other linux distros yet, but e.g. ubuntu may provide a better toolchain.

However, interest in (git-)builds for other platforms than windows seems to be very small anyway. Nevertheless, thank you for your instructions - I'll probably try again one day and on that day it will be nice to have some documentation.
MrSwiss
Posts: 3127
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Running FreeBASIC on virtual or real Raspberry Pi.

Postby MrSwiss » Aug 26, 2014 21:06

@joshy,
tested your installation-instructions on Win8.1 pro 64.
Had a small connection problem by downloading the libXext-dev, the first time.
Therafter everything went according to plan, rrrm ... your instructions ;-).
It works as per your description, very good effort ... had almost never such a
complete documentation (which didn't miss anything), CONGRATULATION!!!

Thanks a lot for sharing!

@St_W,
it is a bit slow, but isn't that true for every emulator?

regards MrSwiss

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest