Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Just wondering if anyone has given pijFORTHos (forth on bare metal for Raspberry PI)?

361 views
Skip to first unread message

murphy...@gmail.com

unread,
May 12, 2016, 8:49:43 PM5/12/16
to
It's based on Jonesforth-Asm. I'm currently using a Raspberry PI 3 as I pursue my B.S. of C.S. at UoPeople Online and don't want to take the risk of possibly damaging my PI if I try to use it. Here's the link:

https://github.com/organix/pijFORTHos

If any of you have tried it on Raspberry, please let me know. Take care now.

trevor

unread,
May 13, 2016, 12:01:44 PM5/13/16
to
Hello - I looked at this repository about a year ago but I didn't get as
far running it on my Raspberry Pi for a number of reasons. First, even
back then, the code seemed to be very much "work-in-progress" rather
than a complete out-of-the-box bare metal Forth. Second a quick glance
at it now reveals that the last commit was 16 June 2015 so there doesn't
seem to have been much further progress on it since I looked at it. I
think for a newbie you'd be better off sticking to gforth under linux.

The trouble with the Raspberry Pi for bare metal is the i/o devices
(keyboard, mouse etc) are almost exclusively USB-based and while this is
wonderful if you have OS support, its "universality" conflicts somewhat
with Forth's underlying "keep it simple" mentality. In my studies I have
been looking at different ways of getting round this problem but have
not yet reached any satisfactory conclusions.

That said there a number of quite interesting projects in the RPi bare
metal forum that attempt to provide the relevant i/o device support
without recourse to Linux.

Paul Rubin

unread,
May 13, 2016, 1:53:14 PM5/13/16
to
murphy...@gmail.com writes:
> It's based on Jonesforth-Asm. I'm currently using a Raspberry PI 3 as
> I pursue my B.S. of C.S. at UoPeople Online and don't want to take the
> risk of possibly damaging my PI if I try to use it. ...

I wouldn't worry too much about damaging your pi, but the low level
coding and debugging involved in dealing with bare metal is quite
tedious even if you're already a fluent programmer. From a learning
perspective I think it's better to start under an OS. And if you do
want to program bare metal, it's better to start out with something like
an Arduino or the original MSP430G2553 Launchpad. A Raspberry Pi is
monstrously complicated by comparison.

Before trying to walk across a carpet, it might seem logical to develop
one's balancing skills by starting out on a tightrope, but in practice
most people find it easier to master the carpet before approaching the
tightrope ;-).

murphy...@gmail.com

unread,
May 13, 2016, 5:09:08 PM5/13/16
to
LOL Now that's a very good analogy. I think your right. The problem I have with gforth is it very unstable on my android. Even it's debugger (gforth ITC) crashes way, way too much. It's very hard to tell if I did something wrong or it did. That's one of the reasons I wanted a SBC that I could hook up with my raspberry pi that only ran a good and stable forth, that way it would be easier for me to understand what the computer was doing was what I was telling it to do and not all of the layers of complexity between it and I. Heck if it just had an assemblier and open and complete documentation then I could put something like forth-79 or 83 on it eventually, so that the complexity of software layers would be down to 2 instead of 8 or a dozens which seems to be the current level.

Paul Rubin

unread,
May 13, 2016, 5:26:51 PM5/13/16
to
murphy...@gmail.com writes:
> The problem I have with gforth is it very unstable on my android.

No idea about android but it should work fine on your rpi. I'd
suggest running it on the rpi and connecting to it.

> That's one of the reasons I wanted a SBC that I could hook up with my
> raspberry pi that only ran a good and stable forth,

If you really want this, try amforth on an arduino or one of the several
msp430 forths on a launchpad. That will be far easier to understand
than anything running bare metal on a pi.

> Heck if it just had an assemblier and open and complete documentation
> then I could put something like forth-79 or 83 on it eventually, so
> that the complexity of software layers would be down to 2

You should probably look at eforth then, the most understandable Forth I
know of. I never understood the attraction of Jonesforth except as a
way of starting in the comfort zone of assembly language programmers.
There aren't that many assembly language programmers out there these
days, who don't also use HLL's and know how implement them.

> instead of 8 or a dozens which seems to be the current level.

I wouldn't worry about this. Linux and gforth do a good job of
abstracting away the lowest level stuff so you don't have to think about
it. You get a Forth that works and that you can treat as a VM. There's
a separate body of knowledge, of implementation techniques to run Forth
on typical register-style computers. That topic is interesting in its
own right, but I wouldn't worry about it right away. It won't make that
much sense to you until you're more comfortable with programming in
general.

The Moving Forth series at http://www.bradrodriguez.com/papers/ is a
good place to learn about Forth implementation. There's nothing special
about Forth 79 or 83.

Coos Haak

unread,
May 13, 2016, 7:31:07 PM5/13/16
to
Op Fri, 13 May 2016 14:09:07 -0700 (PDT) schreef murphy...@gmail.com:

> LOL Now that's a very good analogy. I think your right. The problem
> I have with gforth is it very unstable on my android.

What version do you have? I installed Gforth from the play store
on my cellphone and my tablet. It updates itself and at the moment
I have version 0.7.9_20160427. I never have crashes.
( Maybe because I use Forth since 1981 ;-)

> Even it's
> debugger (gforth ITC) crashes way, way too much.

Never heard of or used a gforth debugger.

BTW, it's _its_ debugger.

groet Coos

murphy...@gmail.com

unread,
May 13, 2016, 9:01:39 PM5/13/16
to
Paul, thank you so much for all of this useful information. I'll have to look into audrino implementations. Coos, I am running the same version of gforce. Also my tablet is a Google Pixel C, which is running the newest update of Marshmallow. gforth as a debug forth called gforth ITC. It has a step by step execution using dbg like this: 15 dbg fizzbuzz. I've already spoken with the developer and he reports that there are some bugs, especially in the gforce ITC.

Paul Rubin

unread,
May 13, 2016, 10:00:26 PM5/13/16
to
murphy...@gmail.com writes:
> Also my tablet is a Google Pixel C, which is running the newest update
> of Marshmallow.... there are some bugs, especially in the gforce ITC.

Really if you're trying to be a programmer you should use similar
computers to what programmers use. Android is a media consumption
system and the latest version of it is simply more of the same. You
want a development system and not a consumption system. My suggestion
is sell that Pixel on Craigslist and use the money to buy a crappy old
laptop and install Debian on it. Or if you must use the Pixel, just use
it as a terminal into your Rpi and do your development on the rpi.

murphy...@gmail.com

unread,
May 13, 2016, 10:10:49 PM5/13/16
to
Thanks Paul for that advice. I'll probably remote in. I hate to give up my Pixel because there is a lot I can do with it, but you are right that it's not really very useful for developement. Take care now.

jo...@planet.nl

unread,
May 14, 2016, 3:15:09 AM5/14/16
to
Hi,

On my rPi B+ nothing is connected to the USB Ports. It's monitor is mostly off and it has no mouse.
To edit files I use the IDE of Win32Forth in Unix mode on a PC that uses an Ethernet connection to the rPi. The debugger is indeed a problem. CR .S ABORT does the trick in case of a problem.

Gforth is able to run automatically an application on the Rpi.
Then it provides a server with a Html-Gui for my tablet or phone.

Jos

May 13th, 2016 18:01:44 UTC+2 trevor wrote:

Anton Ertl

unread,
May 14, 2016, 3:40:29 AM5/14/16
to
murphy...@gmail.com writes:
>gforth as a debug forth called gforth ITC. It has a step =
>by step execution using dbg like this: 15 dbg fizzbuzz.

The single-stepper works only with gforth-itc, yes. It can be useful
for novices to understand execution, but I don't find it useful for
debugging, and use more effective debugging techniques (in particular,
inserting ~~ tracers). And so does Bernd Paysan. As a result, we
don't use the single-stepper or gforth-itc much, and if it breaks,
please make a useful bug report: What did you do, what did you expect,
and what did actually happen.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2016: http://www.euroforth.org/ef16/

Albert van der Horst

unread,
May 14, 2016, 5:44:30 AM5/14/16
to
On 2016-05-13, murphy...@gmail.com <murphy...@gmail.com> wrote:
> LOL Now that's a very good analogy. I think your right. The problem
The ciforth for the ARM at last has passed all tests, including the
generation of turnkey programs. The pdf for ARM ciforth remains to
be done, but i86 pdf is largely applicable.
It misses interfaces to c-libraries.
Send me an e-mail if you want to have a beta.

This comes in FIG-Forth style with a single assembler source.
If you'll find a defect you're likely to fix it without too much
trouble.
[Then there is the meta system, based on m4. I advice that if you want
to change from ITC to DTC. ]

Groetjes Albert

--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Bernd Paysan

unread,
May 14, 2016, 4:55:28 PM5/14/16
to
The debugger only works in the ITC system. As very few people seem to use
it, it had a bug when it ran into a crash. That has been fixed, if you
auto-update Gforth, you should either already have or soon get a version
of the debugger that doesn't crash.

--
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o ID: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
http://bernd-paysan.de/

Bernd Paysan

unread,
May 14, 2016, 4:57:25 PM5/14/16
to
Am Sat, 14 May 2016 07:33:24 +0000 schrieb Anton Ertl:

> What did you do, what did you expect,
> and what did actually happen.

I already got a useful bug report. He ran into a stack empty crash, and
the debugger hung next time when debugging the same word.

That was because the debugger didn't remove the breakpoint. Actually,
nobody seemed to have debugged a crashing program so far ;-).
0 new messages