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

Forth booting on a Raspberry pi

580 views
Skip to first unread message

none albert

unread,
Feb 10, 2019, 8:08:56 AM2/10/19
to
Last saturday we had a meeting of the Dutch Forth
chapter.
One of the members I met there has built a Forth that runs
on a Raspberry pi as an os. It accomodates all sort of
I/O including graphics. I've seen the (single)
assembler file, and understand little, except that he
had to include all the addresses, constant, mask etc.
from the BCM chip underlying the pi and knows how
to use them. I'm particularly impressed about initializing
the memory map.

Has anybody heard of anybody having a stand alone Forth
on the Raspberry pi?

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

Cecil - k5nwa

unread,
Feb 10, 2019, 11:03:50 AM2/10/19
to
On 2/10/2019 7:08 AM, albert wrote:
> Last saturday we had a meeting of the Dutch Forth
> chapter.
> One of the members I met there has built a Forth that runs
> on a Raspberry pi as an os. It accomodates all sort of
> I/O including graphics. I've seen the (single)
> assembler file, and understand little, except that he
> had to include all the addresses, constant, mask etc.
> from the BCM chip underlying the pi and knows how
> to use them. I'm particularly impressed about initializing
> the memory map.
>
> Has anybody heard of anybody having a stand alone Forth
> on the Raspberry pi?
>
> Groetjes Albert
>

Impressive since the hardware is not open there is a lot of digging to
be done for information to make it work. I'm not familiar but does the
Raspberry have a built in BIOS to provide basic software to talk to the
major hardware items? If not the every new model of the Raspberry will
be a major struggle to get it working.

--

Cecil - k5nwa

Alexander Shpilkin

unread,
Feb 10, 2019, 11:30:24 AM2/10/19
to
On Sun, 10 Feb 2019 10:03:45 -0600, Cecil - k5nwa wrote:
> On 2/10/2019 7:08 AM, albert wrote:
>> Last saturday we had a meeting of the Dutch Forth chapter.
>> One of the members I met there has built a Forth that runs on a
>> Raspberry pi as an os. It accomodates all sort of I/O including
>> graphics. I've seen the (single)
>> assembler file, and understand little, except that he had to include
>> all the addresses, constant, mask etc. from the BCM chip underlying the
>> pi and knows how to use them. I'm particularly impressed about
>> initializing the memory map.
> [snip]
>
> Impressive since the hardware is not open there is a lot of digging to
> be done for information to make it work. I'm not familiar but does the
> Raspberry have a built in BIOS to provide basic software to talk to the
> major hardware items? If not the every new model of the Raspberry will
> be a major struggle to get it working.

The Pi is /almost/ documented, as in there's hardware documentation for
everything... except the graphics and some other internal workings of the
Broadcom SoC. This is especially bad because the graphics chip is what
boots the system in the first place (think of the baseband processor in
mobile SoCs), you can't just disregard it. However, for the /first/ Pi,
much of the reverse engineering work has been done[1]; people have at
least written their own boot routines and an emulator that can interpret
the vendor ones. I don't know whether this helps with later Pis, but it
probably does at least in part.

(It surprises me that, despite all this, the Pi has been successful,
while the completely documented BeagleBoard seems to have faded into
obscurity. The situation with secret undocumented hardware is
understandable. Deplorable, but... at least the reasoning is clear.
This, on the other hand, is both sad and puzzling.)

[1]: https://github.com/hermanhermitage/videocoreiv

--
Alex

none albert

unread,
Feb 10, 2019, 3:27:23 PM2/10/19
to
In article <q3pi13$1ijm$1...@gioia.aioe.org>,
No there is not even a BIOS.
Even the virtual memory initialization has to be done apparently even
before a serial interface works that could help in debugging but
it is all far from clear.

>
>--
>
>Cecil - k5nwa

peter4...@gmail.com

unread,
Feb 10, 2019, 6:09:30 PM2/10/19
to
Albert,

Since last year I have my own Forth bare metal running on the PI 3B,
but even it runs well for my own use, it is still not complete.
Startup is 2 seconds flat.
It communicates over RS232 ,reads screen files from the sd card in dos standart,
and has video output of chars and keyboard input over usb, of course it has
GPIO pin access. I added also dynamic memory allocation, so it can extend the dictionary "forever".

My intention is to complete it to have a wifi repl, and make it fully eforth
compatible so it can be easily upgraded with standard apps. (I have not implemented a specific standart yet, I went my own way experimenting from diff.
forths ). When I finished it I will upload it to github and post some videos.

Cheers
Peter

jo...@planet.nl

unread,
Feb 11, 2019, 7:58:25 AM2/11/19
to
Hi,
All my Rpi's use Gforth and are able to run headless.
The network part is optional. When the router is switched off
the program in Gforth will continue to run.
When the router is switched on again the included webservers will
automatically come online again.

A shutdown/reboot button can be used in case of trouble without the use of a network.

Jos

menti...@gmail.com

unread,
Feb 11, 2019, 9:41:54 AM2/11/19
to
Open-source Mentifex MindForth is available for Raspberry Pi.

http://www.mail-archive.com/a...@agi.topicbox.com/msg00649.html shows that there is some demand for implementing the http://ai.neocities.org/mindforth.txt AI on a Raspberry Pi. It might then be used as the brain of a robot.

--
http://ai.neocities.org/EnVerbPhrase.html

trevor

unread,
Feb 11, 2019, 10:38:42 AM2/11/19
to
On 10/02/2019 13:08, albert wrote:
> Last saturday we had a meeting of the Dutch Forth
> chapter.
> One of the members I met there has built a Forth that runs
> on a Raspberry pi as an os. It accomodates all sort of
> I/O including graphics. I've seen the (single)
> assembler file, and understand little, except that he
> had to include all the addresses, constant, mask etc.
> from the BCM chip underlying the pi and knows how
> to use them. I'm particularly impressed about initializing
> the memory map.
>
> Has anybody heard of anybody having a stand alone Forth
> on the Raspberry pi?
>
> Groetjes Albert
>
Some years ago I attempted a port of colorFORTH to the Raspberry Pi
using the examples of "bare metal" code in the Raspberry Pi Forum of the
same name to boot the code without OS support. While this was successful
up to a point (raw framebuffer for video, primitive serial I/O for
keyboard) I have not completed the project to the point of booting from
SD card and USB keyboard partly due to time pressure but also the
inherent complexity associated with these aspects of the PI hardware. If
anyone would like to take up the challenge to complete this work I'd be
happy to share my code. Please email me at tgritchie at blueyonder dot co uk

Cheers
Trevor

mariobe...@gmail.com

unread,
Feb 23, 2019, 9:59:42 AM2/23/19
to
Hi,
I find this discussion very interesting. I'm running many programs written in Gforth (for home automation) on my Raspberry Pi 3. What I'm missing is, what are the advantages of booting on a Forth OS, compared to booting on Linux and running my Forth programs on boot? I suspect that a Forth OS would support far less features than Linux? Thanks. Very interesting topic.

gnuarm.del...@gmail.com

unread,
Feb 23, 2019, 10:39:00 AM2/23/19
to
On Saturday, February 23, 2019 at 9:59:42 AM UTC-5, mariobe...@gmail.com wrote:
> Hi,
> I find this discussion very interesting. I'm running many programs written in Gforth (for home automation) on my Raspberry Pi 3. What I'm missing is, what are the advantages of booting on a Forth OS, compared to booting on Linux and running my Forth programs on boot? I suspect that a Forth OS would support far less features than Linux? Thanks. Very interesting topic.

I think bare metal Forth has but two advantages, one is a very quick boot. The other is the pride the author would have in constructing such a program.

Do you need either of those?

Rick C.

jo...@planet.nl

unread,
Feb 23, 2019, 1:12:00 PM2/23/19
to
Hi,

For a Rpi I do not see many advantages.
But On a ESP8266 that would be great since it could
prevent the use of a lot of memory.

Jos

Anton Ertl

unread,
Feb 23, 2019, 1:13:32 PM2/23/19
to
gnuarm.del...@gmail.com writes:
>I think bare metal Forth has but two advantages, one is a very quick boot.

That's very doubtful. Initializing all the hardware on a complex
system like the Raspi is somewhat time-consuming; the Linux people
have worked quite a bit on parallelizing this task in order to make it
faster. Will most Forthers do much better? Doubtful.

Of course, the Forth approach is to initialize only the hardware that
the application needs, but one can do that with Linux, too, by
configuring Linux appropriately. Then again, configuring Linux seems
to become ever harder, and it may be just as hard as writing a
bare-metal Forth.

- 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 2018: http://www.euroforth.org/ef18/

Zbig

unread,
Mar 7, 2019, 7:45:34 PM3/7/19
to
> One of the members I met there has built a Forth that runs
> on a Raspberry pi as an os. It accomodates all sort of
> I/O including graphics.

Is he going to release his Forth to the "public"?

> Has anybody heard of anybody having a stand alone Forth
> on the Raspberry pi?

I was pondering: we could "crowdfund" Mitch Bradley to persuade him to port his OpenFirmware to (well documented, if I'm correct) BeagleBone Black and/or BeagleBoard-X15. I believe with his experience it wouldn't take too long.
0 new messages