Raspberry PI and Beaglebone Black.

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
mistofeles
Posts: 6
Joined: Sep 26, 2012 21:14

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

Post by mistofeles »

INSTALLATION OF FreeBasic to Raspberry Pi (Minibian)

wget http://www.alice-dsl.net/d.j.peters/fba ... ian.tar.gz .
apt-get install gcc, g++, libncurses-dev
fbc-0.91.0-pi-debian/install.sh -i
echo 'print "HELLO. So far so good !"' >test.bas
fbc test.bas
./test
( Now there should stand 'HELLO, So far so good'. If so, everything is OK)

( I had written a rather long version about installation. I hope this shorter is more usefull)
Last edited by mistofeles on Feb 01, 2015 22:46, edited 2 times in total.
triton
Posts: 10
Joined: Apr 15, 2010 0:09

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

Post by triton »

Hi
Not being familiar with linux I am struggling to get freebasic working on the raspberry pi.
I downloaded "fbc-pi-debian.tar.gz" (raspbian) from this thread dated July 18th 20:13.
I see this was also posted by D J Linux on 15th July on the raspberry pi forum
Following the following instructions posted by D J Peters on July 16th...

PI: Raspbian
download: fbc-pi-debian.tar.gz
cd fbc-pi-debian & sudo ./install.sh -i
fbc -arch arm6 -gen gcc xxx.bas

that seemed to go well? that is I didnt get any horrible messages...

Well I also installed Geany IDE which magically appeared in the programming 'start' list.
Geany ran but I thought I needed to configure its compile and run parameters because I was unable to run a simple program from within Geany.
Every thing I tried failed, so I wrote a simple program and saved as try1.bas and then tried to compile from the command line using LXTerminal...
fbc try1.bas
which prompts the response...
as: unrecognized option '--32'
if I type...
fbc
I get the expected list of options and input files
If I type fbc -version I get...
FreeBASIC Compiler - Version 0.91.0 (07-18-2013) for linux
Copyright...etc...

So, any help would certainly be appreciated as then I could do something useful with my Pi which has been sitting on the shelf after some failed initial attempts with Dexos and bare metal.
Thanks
Dave
D.J.Peters
Posts: 8629
Joined: May 28, 2005 3:28
Contact:

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

Post by D.J.Peters »

hello triton please use the right forum section and download "Forum/Linux/FreeBasic 0.91.0 for ARM"
http://www.freebasic.net/forum/viewtopi ... =5&t=21433

Joshy
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Raspberry PI and Beaglebone Black.

Post by dkl »

fbc passes the --32 option to "as" (the GNU assembler) in order to assemble 32bit code instead of 64bit. You can pass the -v option to fbc to see the exact command lines it uses when invoking helper programs such as "as".
triton
Posts: 10
Joined: Apr 15, 2010 0:09

Re: Raspberry PI and Beaglebone Black.

Post by triton »

Hi again
Thanks for your quick reply.
Still having problems
downloaded

download: fbarm/fbc-0.91.0-pi-raspbian.tar.gz (most used on the PI)

I am using raspbian image (2014-01-07-wheezy-raspbian)
This in itself is confusing because the choices are...

ARM6 FreeBASIC tested on Raspberry Pi (RPI)
download: fbarm/fbc-0.91.0-pi-raspbian.tar.gz (most used on the PI)
download: fbarm/fbc-0.91.0-pi-arch.tar.gz (archlinux ARM)
download: fbarm/fbc-0.91.0-pi-debian.tar.gz (wheezy 7.0)

should I load raspbian or wheezy??? since I have the "wheezy raspbian" image!!
went with the raspbian..then..

Followed instructions...

cd $HOME
tar xfj fbc-0.91.0-xxx-yyy.tar.gz
cd fbc-0.91.0-xxx-yyy ?????
sudo ./install.sh -I

however step 3 above with question marks is because the only file resembling that was

fbc-0.91.0-pi-debian... not raspbian ????
since the x's and y's were representing pi and raspbian respectively I was puzzled but pressed on anyway...

the sudo install went ok so I tried to compile a simple basic file and got
ld: cannot find -lx11
ld: cannot find -lxext
ld: cannot find -lxpm
ld: cannot find -lxrandr
ld: cannot find -lxrender
ld: cannot find -lncurses

I'm obviously doing something REALLY silly but I am hoping you will be able to sort me out
thanks
dave
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Raspberry PI and Beaglebone Black.

Post by TJF »

triton wrote:... so I tried to compile a simple basic file and got
ld: cannot find -lx11
ld: cannot find -lxext
ld: cannot find -lxpm
ld: cannot find -lxrandr
ld: cannot find -lxrender
ld: cannot find -lncurses
Looks good. Just install the -dev versions of these libraries.
triton
Posts: 10
Joined: Apr 15, 2010 0:09

Re: Raspberry PI and Beaglebone Black.

Post by triton »

Hi again
SUCCESS!!
Found this..
Re: FBC compile errors

Unread postby D.J.Peters » Aug 16, 2013 10:56

hello guyc
I installed libx11-dev libncurses5-dev libxrandr-dev libxrender-dev libxpm-dev libxext-dev on my Raspberry PI and Beaglebone Black and fbc works fine here.

Which Linux distro do you use on the PI ?

Joshy
and this....
But you need the *-dev versions of the libraries (as D.J.Peters mentioned in his above post).

sudo apt-get install libx11-dev libX11-dev libXext-dev libXpm-dev libXrandr-dev libXrender-dev
And now Geany runs my program beautifully

Thanks to joshy, TJF and dkl
I haven't done so much command line bashing in years - and never in Linux
I don't know whether its Windows makes you lazy or Linux hasn't grown up. It seems to be an awful lot of squinting and pecking (and re-pecking) to get a job done when Windows just needs a click - but then Linux is a public work in progress I suppose and needs all the engine room stuff.
Anyway, we live and learn and thanks again
Dave
D.J.Peters
Posts: 8629
Joined: May 28, 2005 3:28
Contact:

Re: [offtopic] I got my brand new toys.

Post by D.J.Peters »

brybry wrote:My dream is to one day program Cortex-M3 microcontrollers with FreeBASIC.
I ordered a tiny and very cheap ~6€ dev board with STM32 F103 ARM Cortex M3 controller for my homemade CNC machine project.

Which controller do you use ?

Joshy
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Re: Raspberry PI and Beaglebone Black.

Post by brybry »

D.J.Peters wrote:
brybry wrote:My dream is to one day program Cortex-M3 microcontrollers with FreeBASIC.
I ordered a tiny and very cheap ~6€ dev board with STM32 F103 ARM Cortex M3 controller for my homemade CNC machine project.

Which controller do you use ?

Joshy
My board has a STM32F103VCT6 mcu. I use it to talk with an ELM327 clone, to record sensors in my car's engine as I drive. It calculates fuel usage and records everything to a microSD card every second. Also drives a 3.5" LCD module.

I would love to build a small CNC mill.
D.J.Peters
Posts: 8629
Joined: May 28, 2005 3:28
Contact:

Re: Raspberry PI and Beaglebone Black.

Post by D.J.Peters »

brybry wrote:I would love to build a small CNC mill.
open source stand-alone CNC controller STM32F103

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

Re: Raspberry PI and Beaglebone Black.

Post by D.J.Peters »

I good my first ST controller working without CooCox, Keil, Eclipse, TrueStudio, stm32-ide, emIDE or other embedded systems lovers :-)
About 5 hours to get a simple LED blinking the linker script for the STM32F103C8T6 was the primary problem but I got it now.

brybry what is your STM32 ARM toolchain/IDE ?

Joshy
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Re: Raspberry PI and Beaglebone Black.

Post by brybry »

I use Leaf Labs' Maple IDE. Leaf Labs makes/made a board very similar to Arduino, but it uses a STM32 chip instead of AVR.

The link to the download is here.

Even if your chip isn't exactly the same as the one they used, I'm sure you'll be able to get it working. You may have to manually upload the binary to the board though.
ike
Posts: 387
Joined: Jan 17, 2011 18:59

Re: Raspberry PI and Beaglebone Black.

Post by ike »

Two open hardware pioneers have combined forces to bring the famously easy-to-use experience of Arduino to a high-performance ARM-based Linux computer and prototyping platform derived from the open hardware designs of BeagleBoard.org and Arduino Leonardo.

http://beagleboard.org/blog/2013-10-03- ... h-arduino/

http://arduino.cc/en/Main/ArduinoBoardTre

The Sitara-processor-based Linux Arduino can run high-performance desktop applications, processing-intensive algorithms or high-speed communications.

...For many projects that previously required an external computer, the Arduino TRE will provide all the necessary tools on one small board at an affordable...

..expected to be available in spring 2014..

The integration of the AVR Arduino enables the Arduino TRE to use the existing shield ecosystem so that innovators can expand the Arduino TRE to develop a wide range of high-performance applications such as 3D printers, gateways for building automation and lighting automation, telemetry hubs that collect data from nearby sensors wirelessly, and other connected applications that require host control plus real-time operations.


The Sitara-processor-based Linux
Is it ARM processor??
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Raspberry PI and Beaglebone Black.

Post by TJF »

Sitara is the name of a Texas Instruments processor family with ARM logic.

This project is for Arduino people, who want an all in one system - executing their existing software.

You don`t need it if your`re starting from scratch. BeagleBoneBlack has all these features (CPU, memory, interfaces, ...). And it has some more pins on the headers (but all in 3.3V logic = less enegy consumption). For the real-time tasks you don`t need the complete Arduino hardware. You can use the PRU subsystem. It's available in FreeBASIC now.

As of now, developing IO tasks is more easy on Arduino. But this will change soon.
ike
Posts: 387
Joined: Jan 17, 2011 18:59

Re: Raspberry PI and Beaglebone Black.

Post by ike »

BeagleBoneBlack has all these features (CPU, memory, interfaces, ...)

As of now, developing IO tasks is more easy on Arduino. But this will change soon.
Hmm, I just spend 500 on buying couple of arduinos, LCDs, sensors, books

HAHAHA

Maybe I should delete my FreeBasic, and come back in a few months :

FreeBasic version 3.04, and 9 hundred millions of registered users, more users than FaceBook
Post Reply