FreeBasic 0.90.1 for ARM 6 / 7 devices.

Linux specific questions.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by D.J.Peters »

@St_W A year ago I notice the Nvidia Tegra K1 is a really nice number cruncher
but they never released the OpenCL driver in the past. (only CUDA)
(Looks like it's the only device from NVIDIA without OpenCL)

Something new in this limitation ?

Joshy
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by St_W »

I neither used CUDA nor OpenCL on the Tegra K1, but it seems the limitation (in terms of missing drivers) is still there.

The Tegra K1 is really powerful (too much for the applications I typically work with); usually I work with less powerful devices and use only their graphics capabilites (OpenGL ES). So unfortunately I fear I can't help.
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by AWPStar »

Hi!

Trying to create thread on BBB(Angstrom) by using ThreadCREATE but it doesn't work.
I mean application doesn't work if i use ThreadCREATE.
Even if i skip with function with

Code: Select all

Dim n As Long
If n Then
    Dim As Any PTR t = ThreadCREATE(@threadproc, 0)
End If
Is there any other ways to work with it?
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by St_W »

AWPStar wrote:Trying to create thread on BBB(Angstrom) by using ThreadCREATE but it doesn't work.
I mean application doesn't work if i use ThreadCREATE.
So you get a compiler error? Please post the error message.
In case you get a runtime error (quite unlikely if the code isn't executed, as you claim), try to get an error message by compiling with "-exx".

Which FreeBasic version do you use? (use: fbc --version)
The downloads in the first post of this thread are outdated btw. Unfortunately Joshy does not put a note there and many newbies still download from there.
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by AWPStar »

@St_W
So you get a compiler error? Please post the error message.
No errors. It compiles perfectly.
executable file works under Ubuntu x86/64. But it does not with Angstrom.

Simple code

Code: Select all

Sub threadproc( ByVal param As Any PTR )
    ? "passed"
End Sub

? "start"

Dim n As Long
If n Then
    Dim t(1) As Any PTR
    t(0) = ThreadCREATE(@threadproc, 0)
    t(1) = ThreadCREATE(@threadproc, 0)
End If

? "end"
Youtube


Version for Angstom
FreeBASIC Compiler - Version 0.91.0 (07-27-2013) for linux
Copyright (C) 2004-2013 The FreeBASIC development team.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by St_W »

AWPStar wrote:executable file works under Ubuntu x86/64. But it does not with Angstrom.
Angstrom - *phew* - unfortunately I've no idea about Angstrom Linux.

Strange that the program does nothing - not even print "start". An it does work when you do not use ThreadCreate? (e.g. a simple hello world program)

I guess Angstrom isn't binary compatible with Debian, is it? In the lucky case it is, you could try a build from here: http://users.freebasic-portal.de/stw/builds/ - however, in the probably much more likely case it isn't, you're probably stuck at that old version except you build fbc yourself (or someone else does).

btw why Angstrom?
https://beagleboard.org/latest-images latest images list only Debian-based systems - Angstrom is only under "older builds".
Is it this one: http://wp.angstrom-distribution.org/ ? I've used yocto already, but that's all I know.
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by AWPStar »

St_W wrote:
AWPStar wrote:An it does work when you do not use ThreadCreate? (e.g. a simple hello world program)
That(ThreadCreate) is the only bug* that i've found.
I guess Angstrom isn't binary compatible with Debian, is it?
It is not. i have tried debian version, but it doesn't work.

i can use only angstrom version because of technical requirements. I had BBB with Debian, but i could not use it.(
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by St_W »

AWPStar wrote:i can use only angstrom version because of technical requirements. I had BBB with Debian, but i could not use it.(
I have no BBB (or any other device running Angstrom) so it's rather hard for me to help you. Maybe D.J.Peters (or dkl) can help you further.
Maybe I find time to set up a cross-compiler toolchain for angstrom, although that probably won't help to fix your problem.

You could try some debugging meanwhile. Build a debug build of your program (-g ; i also suggest to use -exx) and see whether you can find something out. If the program does not even reach the first FB command you could build a debug version of rtlib 0.90.1 (replace previous one) and continue debugging at a deeper level.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by D.J.Peters »

The old FreeBASIC version for angstrom you tryed was only a dirty hack with many limitations.
Angstrom needs some modifications to get the FreeBASIC runtime libs compiled.

Before I got the FB gfxlib working I changed something of the angstrom disro.
I replaced the desktop manager of angstrom with Xfce desktop also.
If I remember me right there are no FB OOP on angstrom and no libpthread too.

With other words Angstom isn't the right environment for a full working version of FreeBASIC.

Looks like C is the right language on Angstrom.

I personaly don't like Angstrom I used ArchLinux with FreeBASIC on the BBB in the past.
https://archlinuxarm.org/platforms/armv ... bone-black

FreeBASIC for armv7 are the right version for ArchLinux.
http://users.freebasic-portal.de/stw/bu ... hf-debian/

Joshy
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by AWPStar »

Thank you!
Too bad, I was hoping not to have to use C
maratus
Posts: 3
Joined: May 28, 2019 20:05

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by maratus »

Good evening.

I try to get some graphics at Raspberry with FreeBasic.
Unfortunately even such simple program
Screen 12
Line (10,10)-(100,100),4,BF
Sleep

does not show anything at display.

How did you solve this issue?

I use fbc-0.91.0-pi-raspbian.tar.

P.S. As to Color and Locate, it works normal.

Regards,
Marat
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by MrSwiss »

Hi maratus, welcome to the forum.
maratus wrote:How did you solve this issue?
While I can't answer that*, I'd suggest that you are updating FBC to current version
1.06.0, as a first step (your currently used version, can only be called: "very dated").

* I don't have the HW, you are referring to and therefore, can't check it out.
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Post by speedfixer »

That program works fine on my rPI 3B+ and my zero W.

Version 1.06.0 (11-22-2018), built for linux-arm (32bit)


david
Post Reply