FreeBasic 0.90.1 for ARM 6 / 7 devices.
-
- Posts: 8615
- Joined: May 28, 2005 3:28
- Contact:
FreeBasic 0.90.1 for ARM 6 / 7 devices.
note: I tested many things but not all.
Of course I compiled fbc many times with fbc
I compiled wxFBE and some of my own stuff (C64, fbRaytracer, 3D software renderer ...)
some user projects e.g. JASC_soccer ...
Report any problems with this version please.
source code (primary for the dev team)
download: fbc-0.91.0-src-minimal.tar.gz
(all source code changes marked with !!!ARM!!!)
ARM7 FreeBASIC tested on Beaglebone Black (BBB)
download: fbc-0.91.0-bbb-ubuntu.tar.gz (precise 12.04)
download: fbc-0.91.0-bbb-debian.tar.gz (wheezy 7.0)
download: fbc-0.91.0-bbb-arch.tar.gz (archlinux ARM)
download: fbc-0.91.0-bbb-angstrom.tar.gz (shipped with the device)
ARM6 FreeBASIC tested on Raspberry Pi (RPI)
download: fbc-0.91.0-pi-raspbian.tar.gz (most used on the PI)
download: fbc-0.91.0-pi-arch.tar.gz (archlinux ARM)
download: fbc-0.91.0-pi-debian.tar.gz (wheezy 7.0)
install it like:
cd $HOME
tar xfj fbc-0.91.0-xxx-yyy.tar.gz
cd fbc-0.91.0-xxx-yyy
sudo ./install.sh -i
In the case your favorite distro has no sudo or the user is disallowed from sudo use the 'su' command instead.
su -c "./install.sh -i"
I self use the '/usr' prefix ./install.sh -i /usr
many distros for small devices don't have a /usr/local folder at all
or /usr/local/bin isn't in the PATH and you have to add /usr/local/lib/freebasic/linux to the linker path also.
For short prefix /usr is safe on all distros I tested in the past.
usage is simple no extra option needed:
fbc yourprog.bas
Of course fbc -o max yourprog.bas is a usefull optimation option.
note: only fbc on angstrom has no oop at the moment !
Sorry but it's a build without the 'supc++' library (no classes nor new / delete ...)
It would be a good idea if some of you could create linux packages for FreeBASIC.
I have no time and the knowledge of the package manager primary apt-get, opkg and pacman.
Joshy
Some test screens for new FreeBASIC ARM visitors :-)
FreeBASIC on the PI with ARM6.
Raspbian
Archlinux
FreeBASIC on Beaglebone Black with ARM7.
Debian wheezy 7.0
Angstrom Linux:
Ubuntu precise 12.04
Of course I compiled fbc many times with fbc
I compiled wxFBE and some of my own stuff (C64, fbRaytracer, 3D software renderer ...)
some user projects e.g. JASC_soccer ...
Report any problems with this version please.
source code (primary for the dev team)
download: fbc-0.91.0-src-minimal.tar.gz
(all source code changes marked with !!!ARM!!!)
ARM7 FreeBASIC tested on Beaglebone Black (BBB)
download: fbc-0.91.0-bbb-ubuntu.tar.gz (precise 12.04)
download: fbc-0.91.0-bbb-debian.tar.gz (wheezy 7.0)
download: fbc-0.91.0-bbb-arch.tar.gz (archlinux ARM)
download: fbc-0.91.0-bbb-angstrom.tar.gz (shipped with the device)
ARM6 FreeBASIC tested on Raspberry Pi (RPI)
download: fbc-0.91.0-pi-raspbian.tar.gz (most used on the PI)
download: fbc-0.91.0-pi-arch.tar.gz (archlinux ARM)
download: fbc-0.91.0-pi-debian.tar.gz (wheezy 7.0)
install it like:
cd $HOME
tar xfj fbc-0.91.0-xxx-yyy.tar.gz
cd fbc-0.91.0-xxx-yyy
sudo ./install.sh -i
In the case your favorite distro has no sudo or the user is disallowed from sudo use the 'su' command instead.
su -c "./install.sh -i"
I self use the '/usr' prefix ./install.sh -i /usr
many distros for small devices don't have a /usr/local folder at all
or /usr/local/bin isn't in the PATH and you have to add /usr/local/lib/freebasic/linux to the linker path also.
For short prefix /usr is safe on all distros I tested in the past.
usage is simple no extra option needed:
fbc yourprog.bas
Of course fbc -o max yourprog.bas is a usefull optimation option.
note: only fbc on angstrom has no oop at the moment !
Sorry but it's a build without the 'supc++' library (no classes nor new / delete ...)
It would be a good idea if some of you could create linux packages for FreeBASIC.
I have no time and the knowledge of the package manager primary apt-get, opkg and pacman.
Joshy
Some test screens for new FreeBASIC ARM visitors :-)
FreeBASIC on the PI with ARM6.
Raspbian
Archlinux
FreeBASIC on Beaglebone Black with ARM7.
Debian wheezy 7.0
Angstrom Linux:
Ubuntu precise 12.04
Last edited by D.J.Peters on Sep 25, 2017 20:04, edited 6 times in total.
-
- Posts: 8615
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Tip: using GNU ARM assembler with FreeBASIC
Special ARM GNU as directives
file: "function.s"
file: "test.bas"#> fbc test.bas -Wa function.s
Happy debugging :-)
Joshy
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
Happy debugging :-)
Joshy
Last edited by D.J.Peters on Aug 21, 2014 18:23, edited 2 times in total.
-
- Posts: 6
- Joined: Aug 08, 2013 19:44
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Thanks a lot for this. being able to program my raspberry pi with BASIC really rocks
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
I can nothing but agree. This is fantastic. Will this mean that I'll soon be able to compile for MIPS as well? If so, then I guess all my other compilers might as well retire. It would, however, be a nice addition with some examples on how to use the kernel gate with direct inline assembler to access standard functions (such as getuid, sockets etc) without needing to link with libc. :)
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
There's no reason to think that FB won't work on 32 bit MIPS or any other 32 bit platform (I haven't tried the 64 bit branch). Why don't you try it?
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Amazing Joshy.
Thank you for your effort in this conversion.
On Raspbian, the installer worked perfectly.
Then, to compile with fbc, ld needed its dependencies (ld: cannot find -lncurses):
sudo apt-get install libncurses-dev
(apt swaps to libncurses5-dev, but works)
Thank you for your effort in this conversion.
On Raspbian, the installer worked perfectly.
Then, to compile with fbc, ld needed its dependencies (ld: cannot find -lncurses):
sudo apt-get install libncurses-dev
(apt swaps to libncurses5-dev, but works)
-
- Posts: 8615
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Hello onewarmslime, peck and tinram thank you for testing.
Looks as if the ARM version pretty stable and should be an official part of FreeBasic.
Joshy
Looks as if the ARM version pretty stable and should be an official part of FreeBasic.
Joshy
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Support for generating GCC this way will give FB a new boost as well as beat the crap out of competitive compilers as well as it could support other platforms as well. Mindblowing, putting it mildly.
A great help for many people would probably be a live iso with everything needed already since many people lack a native ARM device to run this from. At least a native device with everything needed. Just a thought to boost popularity.
A great help for many people would probably be a live iso with everything needed already since many people lack a native ARM device to run this from. At least a native device with everything needed. Just a thought to boost popularity.
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
hi, is there any future fbc for arm5 (like olinuxino or chumby)? or will it be for arm6/7 only? thanks
-
- Posts: 6
- Joined: Sep 26, 2012 21:14
FB 0.91
Problem
root@raspi:/home/pasi/FB# fbc -o max eka.bas
Segmentation fault (core dumped)
Built it from fbc-0.91.0-bbb-arch.tar.gz
Raspberry Pi B, 256MB RAM
Arch Linux
Ideas ?
root@raspi:/home/pasi/FB# fbc -o max eka.bas
Segmentation fault (core dumped)
Built it from fbc-0.91.0-bbb-arch.tar.gz
Raspberry Pi B, 256MB RAM
Arch Linux
Ideas ?
-
- Posts: 8615
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Hello mistofelees,
i'm not at home so i can't test anything on the PI.
But i compiled many things on Arch Linux successful in the past.
By the way fbc compiled fbc self on Arch Linux successful too.
Joshy
i'm not at home so i can't test anything on the PI.
But i compiled many things on Arch Linux successful in the past.
By the way fbc compiled fbc self on Arch Linux successful too.
Joshy
Last edited by D.J.Peters on Sep 25, 2017 20:10, edited 1 time in total.
-
- Posts: 165
- Joined: Oct 16, 2009 14:44
- Location: Jodhpur, Rajputana, Empire of Aryavart
- Contact:
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Very nice :). I just tested it on Raspbian running over Qemu. I'll try to port FreeBASIC to powerpc 32 bit, again QEMU would help :D
-
- Posts: 8615
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Hello leodescal, do you mean LinuxPPC or embedded PPC system and is it Big- or Litle- Endian ?
In case of embedded system does it support double and single floating point in hardware also ?
Joshy
In case of embedded system does it support double and single floating point in hardware also ?
Joshy
-
- Posts: 165
- Joined: Oct 16, 2009 14:44
- Location: Jodhpur, Rajputana, Empire of Aryavart
- Contact:
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
Hi, I am using mac99 as target machine to emulate on QEMU, I think it is Big Endian. I meant LinuxPPC, GNU/Linux Debian for PowerPC to be specific. I currently have working virtual machine for it currently.D.J.Peters wrote:Hello leodescal, do you mean LinuxPPC or embedded PPC system and is it Big- or Litle- Endian ?
In case of embedded system does it support double and single floating point in hardware also ?
Joshy
There is FreeBSD version for ppc too but I never got success to get it run on QEMU. But I do plan to get a Powerbook G4 in near future, then probably I might get PPC FreeBSD run over it.
Re: FreeBasic 0.91.0 for ARM 6 / 7 devices.
I installed it on a first gen Mac Mini, and that works. Keep in mind that it is also a matter of drivers, and before you buy, make sure that the components in your Mac are supported.leodescal wrote: There is FreeBSD version for ppc too but I never got success to get it run on QEMU. But I do plan to get a Powerbook G4 in near future, then probably I might get PPC FreeBSD run over it.