FreeBasic 0.90.1 for ARM 6 / 7 devices.

Linux specific questions.
srvaldez
Posts: 1358
Joined: Sep 25, 2005 21:54

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby srvaldez » Aug 15, 2014 10:41

hello D.J.Peters,
when extracting the archive fbc-0.91.0-pi-raspbian.tar.gz I get a folder named fbc-0.91.0-pi-debian, are the debian and raspbian the same?
D.J.Peters
Posts: 7172
Joined: May 28, 2005 3:28
Location: Germany

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby D.J.Peters » Aug 16, 2014 11:02

srvaldez wrote:... are the debian and raspbian the same?
http://www.raspbian.org/ wrote:Raspbian is a free operating system based on Debian ...
I can't remember was it a typo while a made this archive, does it works ?

Joshy
srvaldez
Posts: 1358
Joined: Sep 25, 2005 21:54

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby srvaldez » Aug 16, 2014 15:39

yes it works, thank you.
I suspected it was just a typo.
stephanbrunker
Posts: 57
Joined: Nov 02, 2013 14:57

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby stephanbrunker » Nov 04, 2015 11:42

Thank you, programming for Raspberry is much easier for me in Freebasic. I just have one problem: format() doesn't work correctly, it doesn't check the locale settings, saying for germany it has to be Montag, Dienstag ... and "," instead of "." for the numbers, but I stubbornly get english output. Any chance to fix it? Of course, I can fix it inside my code, but it'd be nice if i haven't.
D.J.Peters
Posts: 7172
Joined: May 28, 2005 3:28
Location: Germany

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby D.J.Peters » Nov 04, 2015 14:26

@stephanbrunker Do you talk about the first PI ARM .0.91 port from me ?
If so please try curent version 1.0.4 it's from 01.11.2015 uploaded "Dienstag" den 02.11.2015
You can get it from here: http://users.freebasic-portal.de/stw/bu ... armv6-rpi/

Joshy

I don't have a running PI ATM. can you post the output from current version 1.0.4 ?

Code: Select all

#include "vbcompat.bi"
var n = Now()
print Format( n,"d-mmmm-yy")
print Format( n,"ttttt")
print Format( n,"dddd")
sleep
stephanbrunker
Posts: 57
Joined: Nov 02, 2013 14:57

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby stephanbrunker » Nov 04, 2015 16:17

Hello Joshy,

I tried the current version. The current locale settings and the output of the little program. The same program on windows (DE settings) output the names translated to german and with the correct number format.

In the bash, the "date" command prints a translated output, too, so
date +"%A" => Mittwoch

Code: Select all



pi@raspberrypi ~ $ locale
LANG=de_DE.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

#include "vbcompat.bi"
dim zeit as double
zeit=now
dim zahl as double = 34987593875.3438
print format(zeit,"dddd ddd dd.mm.yyyy")
print format(zeit,"hh:mm:ss")
print format(zahl,"0,000.00")

pi@raspberrypi ~/basic $ ./testformat
Wednesday Wed 04.11.2015
16:10:47
34,987,5930,875.34
stephanbrunker
Posts: 57
Joined: Nov 02, 2013 14:57

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby stephanbrunker » Nov 05, 2015 9:56

I also checked the weekdayname() and monthname() functions, and they also output in englisch despite the Lang="de,DE" variable.
vdecampo
Posts: 2977
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby vdecampo » Dec 03, 2015 1:35

Is there a version of FreeBASIC for the PI 2 and Raspbian? Doesn't it uses ARM 7?

-Vince
Drago
Posts: 115
Joined: Aug 10, 2005 13:15

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby Drago » Dec 03, 2015 14:27

The Stw Builds are running fine:

http://users.freebasic-portal.de/stw/builds/linux-armv7a-hf-debian/

Here is a 1.02 Test Picture:

Image

Greetings
Drago
peck
Posts: 24
Joined: Aug 04, 2005 1:12
Location: Sweden

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby peck » Jan 20, 2016 10:22

Still an awesome project, to say the least.

I'm curious about buying a development board with an ARM Cortex A9. As long as I can get a proper linux dist running on it, should that be enough to keep me from problems when using the latest Freebasic for ARM-version? Just want to reduce the risk of me buying hardware that likely won't work with my projects. Haven't tried a 64-bit ARM yet neither.
D.J.Peters
Posts: 7172
Joined: May 28, 2005 3:28
Location: Germany

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby D.J.Peters » Jan 20, 2016 21:13

peck wrote:Just want to reduce the risk of me buying hardware that likely won't work with my projects.
You can post a link to your favorit ARM Cortex A9 device before you buy !

Maybe you have to change the compiler flags (inside of the FreeBASIC sourcecode) and recompile the FreeBASIC runtime libs on your target device also !

Cortex-A5 -mcpu=cortex-a5
Cortex-A7 -mcpu=cortex-a7
Cortex-A8 -mcpu=cortex-a8
Cortex-A9 -mcpu=cortex-a9
Cortex-A15 -mcpu=cortex-a15
Image

image are from here: ARM Cortex-A Processors and GCC Command Lines

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

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby St_W » Jan 20, 2016 21:51

Theoretically the Cortex-A5 / A7 / A8 / A9 / A12 / A15 / A17 cores all implement the same (ARMv7-A) architecture. Thus a binary compiled for the ARMv7 ABI should theoretically run on any of those processors. You see, a lot of theory :-)

In practice the compiler allows to compile for a specific platform (to use specific features of that platform) basically for speed / optimization reasons. Another problem are the dependencies to system libraries, which may not be compatible between different systems/platforms.

I develop software for boards using Cortex-A CPUs each day, like NXP (formerly FreeScale) i.MX6 QP (Cortex-A9) or NVidia Tegra K1 (Cortex-A15), just to mention two examples. Maybe I can try whether FB binaries are able to run on the default Linux version for these boards (FreeScaleLinux (Yocto build); Linux4Tegra (Ubuntu based)).

The mentioned boards are used in industrial applications, but for example the Nvidia Tegra K1 surely could be used in non-industrial environments (although these boards are quite expensive compared to something like a Raspberry Pi). Do you already have an idea which board you would like to buy?


//edit: I just tried my latest ARMv7A FreeBasic build (http://users.freebasic-portal.de/stw/bu ... hf-debian/) and it worked out of the box on the Nvidia Tegra K1, which uses a Cortex-A15 CPU and a Ubuntu based OS called (L4T - Linux for Tegra) in console mode. I haven't tried any graphical things yet.
peck
Posts: 24
Joined: Aug 04, 2005 1:12
Location: Sweden

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby peck » Jan 22, 2016 12:32

Thank you both for your replies!

I'll make sure to post information about which board I'm about to order before placing the order.

One more to both Joshy and St_W which doesn't necessarily have that much with FB to do, but absolutely with ARM.
I've started developing some software which is gonna run under a (probably quite stripped) linux distribution. This will be a CPE and will run inside a protective case. However, due to the risk of copying, reverse engineering and hacking, I'm investigating solutions to protect the actual firmware/software from extraction/prying eyes and eavesdropping, even on a hardware level. I've been looking into the Freescale i.MX6 and I'm thinking that it might be what I'm looking for. Seems a bit messy to do all this although completely possible. PINE64 seems to be interesting to, since it supports "Secure Boot", "TrustZone" and other security features. It is however a Kickstarter project in pledge status still, but the pricing looks beyong acceptable. Built-in support for touchscreens doesn't exactly make me less interested, but I would prefer getting started as soon as possible. Any recommendations from you guys?

Edit: Cost is a huge factor and I'm trying to stick to hardware that is below the $50 barrier if possible. Most of the advanced processors/soc/som quickly gets quite expensive. What I'm gonna need are a couple of i/o-pins, ability to add modules such as ethernet/gsm and a small touchpad for user input. That's about it so I don't need a cpu monster either.

When it comes to updating the firm-/software on these products I was thinking to have 3 partitions with everything needed on them (example names):
/dev/sda1 - firmware 1
/dev/sda2 - firmware 2
/dev/sda3 - settings and storage

The main reason is to be able to protect me a bit from power outages etc. If firmware in sda1 is running it'll simply install new firmware to sda2 and when done it'll update the bootloader with the new partition. This way, in case an update fails, I could also have a switch/key/button on the device to make it temporarily boot from the old partition instead, but always keep the same settings and storage no matter which partition it is booting from.

Sorry if too much of all this is off topic, but since us basic developers are quite scarce I would hope that this helps more people mentioned here instead of in private. Time to start a second thread to have one for the compiler and one for simply development discussions for ARM?

Best regards,
Peter
St_W
Posts: 1127
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby St_W » Jan 23, 2016 18:11

I'm working only with development boards and do nothing with such things like protection, so I fear I cannot help much.
I would definitely look for some system that supports protection in hardware, like "HAB" (high assurance boot) for iMX6, which is a variant of secure boot. Secure boot usually works like this (in short): you have public + private key, write the public key into device's read-only memory, sign the (digest of the) image (encrypt with private key), board only allows image with suitable signature (decrypt with public key) to boot.

As you're looking for a low-cost without high cpu/graphics power the Tegra K1 (which is quite powerful) is definitely not the right device for you. I've also worked with several i.MX6 boards from NXP/FreeScale (SABRE AI, SABRE SD) or BoundaryDevices (SABRE Light) and think that they are more powerful than you need (and do cost more than you would like to pay). Unfortunately I've not much experience with low cost devices.

The PINE64 looks nice, but the authors state that "anything purchased after Kickstarter won't ship until May / June" (and the kickstarter campaign is already over). The RPI does not provide HW protection (afaik), so also a no-go.

//edit:
btw meanwhile I tested FreeBasic graphics on the Nvidia Tegra K1 and (after installing the required X libraries) it worked out of the box. Here are some photos: http://imgur.com/a/bqGsn/all . I used my latest ARMv7a build from http://users.freebasic-portal.de/stw/bu ... hf-debian/
Image

//edit2:
Looks like Joshy has some knowledge about "cheap and tiny ARM devices", maybe he can tell whether some of these boards support protection in hardware? But I guess most - if not all - of them will not.

//edit3 [2016-01-26]:
Today I've tried cross-compiling for iMX6 using the Yocto Linux toolchain. Unfortunately FreeBasic does not work well together with the toolchain. I tried a few tweaks, but finally I did assemble and link manually. Simple console programs worked on the iMX6 board running FreeScale Linux (Yocto build), but graphical programs just crashed with a segmentation fault. Probably I'd have to compile the gfxlib using the Yocto toolchain as there are probably some incompatibilities to the binary built for Debian. I could not try the compiler itself on the iMX6 yet as there are no compilers available on the default linux image (everything is cross-compiled on the host, for speed/ressource reasons).
AWPStar
Posts: 34
Joined: May 03, 2009 21:47

Re: FreeBasic 0.90.1 for ARM 6 / 7 devices.

Postby AWPStar » Feb 15, 2016 15:38

Hi!
Cannot find angstrom version. Only debian. Can you reupload it?
It was chrome bug.

But still can not run fbc on angstrom. but it works on debian.

Code: Select all

root@beaglebone:~/fbc2# ./bin/fbc
-sh: ./bin/fbc: No such file or directory
Also cannot run file compilled on debian. But it's the same cpu architecture. Don know why.
Sry, my bad. it works!

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest