FreeBASIC and the Raspberry Pi ?
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
FreeBASIC and the Raspberry Pi ?
Just acquired a Raspberry Pi. Has anyone been able to install FreeBASIC on it?
At the moment it is still in the box until I have time to set it up.
I will be new to Linux so I am not sure how long it will take to learn.
Accessing the i/o pins is required for my intended project.
At the moment it is still in the box until I have time to set it up.
I will be new to Linux so I am not sure how long it will take to learn.
Accessing the i/o pins is required for my intended project.
Re: FreeBASIC and the Raspberry Pi ?
I used to be able to go too page 5 in the Linux forum, where TJF had a thread - Debian Package fbc-1.01-Debian7_amf. That thread has now been cleaned out, so I am not sure what the latest procedure is for installing fbc on a Raspberry Pi is.
I did do an Internet search, and found a thread called "Running FreeBasic on Raspberry Pi - we saw a chicken". This might be a way to proceed, not sure though, you might have to read the whole blog.
It is to bad that TJF cleared out, he had a very useful way of installing fbc on the Raspberry Pi. I guess he is another former forum member that bailed out.
I did do an Internet search, and found a thread called "Running FreeBasic on Raspberry Pi - we saw a chicken". This might be a way to proceed, not sure though, you might have to read the whole blog.
It is to bad that TJF cleared out, he had a very useful way of installing fbc on the Raspberry Pi. I guess he is another former forum member that bailed out.
Re: FreeBASIC and the Raspberry Pi ?
@BasicCoder2
you can download FB for the pi from http://users.freebasic-portal.de/stw/builds/ either the armv6-rpi or armv7a-hf-debian will work.
have not played with accessing the i/o pins, you will probably need to use the Wiring Pi lib http://wiringpi.com, if you search this forum for wiring pi you will get some hits.
if you are new to linux then you may not know that you will need to install a number of libraries to successfully compile programs with FB
if you are using Raspbian then I suggest the following
first update from the terminal
then add the following libs
you may also need other libraries depending on your program, but this will get you started.
almost forgot, I suggest the geany IDE https://www.geany.org it works with FB out of the box, though you may want to add compiler flags to your liking.
geany may already be installed, if not you can install geany using apt-get
you can download FB for the pi from http://users.freebasic-portal.de/stw/builds/ either the armv6-rpi or armv7a-hf-debian will work.
have not played with accessing the i/o pins, you will probably need to use the Wiring Pi lib http://wiringpi.com, if you search this forum for wiring pi you will get some hits.
if you are new to linux then you may not know that you will need to install a number of libraries to successfully compile programs with FB
if you are using Raspbian then I suggest the following
first update from the terminal
Code: Select all
sudo apt-get update
sudo apt-get upgrade
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
almost forgot, I suggest the geany IDE https://www.geany.org it works with FB out of the box, though you may want to add compiler flags to your liking.
geany may already be installed, if not you can install geany using apt-get
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
@srvaldez,
Thanks for the input.
Found some forum posts,
viewtopic.php?f=17&t=24181&hilit=wiring+pi
This is the kit I purchased.
https://www.jaycar.com.au/raspberry-pi- ... t/p/XC9010
Haven't unpacked my toy yet. Also have to get cable to connect it to a display.
Thanks for the input.
Found some forum posts,
viewtopic.php?f=17&t=24181&hilit=wiring+pi
This is the kit I purchased.
https://www.jaycar.com.au/raspberry-pi- ... t/p/XC9010
Haven't unpacked my toy yet. Also have to get cable to connect it to a display.
Re: FreeBASIC and the Raspberry Pi ?
hello BasicCoder2
here are some links related to wiring pi
viewtopic.php?f=2&t=23336&hilit=wiringpi
viewtopic.php?f=3&t=22987&start=15&hilit=wiringpi
viewtopic.php?f=5&t=22965&start=15&hilit=wiringpi
here are some links related to wiring pi
viewtopic.php?f=2&t=23336&hilit=wiringpi
viewtopic.php?f=3&t=22987&start=15&hilit=wiringpi
viewtopic.php?f=5&t=22965&start=15&hilit=wiringpi
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBASIC and the Raspberry Pi ?
Running FreeBASIC on virtual or real Raspberry Pi.
NOTE: replace the old download:
>wget http://users.freebasic-portal.de/stw/bu ... -03-27.zip[/s]
with:
>wget http://users.freebasic-portal.de/stw/bu ... -03-08.zip[/b]
(in case of RB PI 1A,1B and 2)
or
>wget http://users.freebasic-portal.de/stw/bu ... -03-08.zip[/b]
(in case of RB PI 3)
Joshy
NOTE: replace the old download:
>wget http://users.freebasic-portal.de/stw/bu ... -03-27.zip[/s]
with:
>wget http://users.freebasic-portal.de/stw/bu ... -03-08.zip[/b]
(in case of RB PI 1A,1B and 2)
or
>wget http://users.freebasic-portal.de/stw/bu ... -03-08.zip[/b]
(in case of RB PI 3)
Joshy
Re: FreeBASIC and the Raspberry Pi ?
Hi all and thank you,
the above instructions also worked on my raspberry.
I compiled without problems the last project I'm working on.
And also it runs pretty fast :)
the above instructions also worked on my raspberry.
I compiled without problems the last project I'm working on.
And also it runs pretty fast :)
Re: FreeBASIC and the Raspberry Pi ?
I wouldn't be so quick to say that. His last post is Feb 13, 2018.dasyar wrote:It is to bad that TJF cleared out, he had a very useful way of installing fbc on the Raspberry Pi. I guess he is another former forum member that bailed out.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
Thank you all for your responses which I can refer to when I start trying to get it all going.
Still have to buy a monitor and HDMI cable.
.
Still have to buy a monitor and HDMI cable.
.
-
- Posts: 1186
- Joined: May 08, 2006 21:58
- Location: Crewe, England
Re: FreeBASIC and the Raspberry Pi ?
You may find it easier / cheaper to buy a second-hand TV with an HDMI socket. You also get a spare TV set. If in the UK, rush to your local Maplin store for the cable - they are having a closing-down saleBasicCoder2 wrote:Thank you all for your responses which I can refer to when I start trying to get it all going.
Still have to buy a monitor and HDMI cable.
.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
Have just hooked the Raspberry Pi to our second tv set and it appears to be working fine.jevans4949 wrote:You may find it easier / cheaper to buy a second-hand TV with an HDMI socket. [
Now I am officially a Linux user :)
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBASIC and the Raspberry Pi ?
For our new ARM Linux user :-)
Tip: using GNU ARM assembler with FreeBASIC
Special ARM GNU as directives
file: "function.s"
file: "test.bas"#> fbc test.bas -Wa function.s
Joshy
Tip: using GNU ARM assembler with FreeBASIC
Special ARM GNU as directives
file: "function.s"
Code: Select all
.arm @ 32 bit mode
.global fb_add @ make 'fb_add' visible for FreeBASIC
.type fb_add, %function @ it's a function
.text @ begin of the code segment
.align 2 @ word boundary
fb_add: @ function fb_add(r0, r1) as integer
add r0, r0, r1 @ r0 = r0 + r1
bx lr @ return from function with result in r0
.end @ end of assembler listing
Code: Select all
declare function fb_add cdecl alias "fb_add" (byval r0 as integer,byval r1 as integer) as integer
print " 3 + 7 = " & fb_add(3,7)
sleep
Joshy
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
@Joshy,
Thanks for the information.
The Raspbery Pi 3B seems to have a 64 bit processor?
I am not sure why QEMU, which a google says is an emulator, is required to run FreeBASIC on the Raspberry PI which I understand runs the Linux OS?
Thanks for the information.
The Raspbery Pi 3B seems to have a 64 bit processor?
I am not sure why QEMU, which a google says is an emulator, is required to run FreeBASIC on the Raspberry PI which I understand runs the Linux OS?
Last edited by BasicCoder2 on Mar 21, 2018 10:56, edited 1 time in total.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBASIC and the Raspberry Pi ?
You have a ARCH64 ARM device but Raspbian is an 32-bit Linux same the armv7 version of FreeBASIC is 32-bit also
Do you have installed FreeBASIC on your running Raspbian OS know ?
Joshy
Do you have installed FreeBASIC on your running Raspbian OS know ?
Joshy
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBASIC and the Raspberry Pi ?
It seems I may have been following the wrong post.
No I haven't installed FreeBASIC yet as I was confused with the other post.
Will tackle it again tomorrow.
No I haven't installed FreeBASIC yet as I was confused with the other post.
Will tackle it again tomorrow.
Last edited by BasicCoder2 on Mar 22, 2018 12:15, edited 1 time in total.