|Number of watchers on Github||161|
|Number of open issues||3|
|Average time to close an issue||2 months|
|Average time to merge a PR||about 10 hours|
|Open pull requests||3+|
|Closed pull requests||0+|
|Last commit||over 2 years ago|
|Repo Created||almost 6 years ago|
|Repo Last Updated||over 2 years ago|
|Organization / Author||organix|
|Do you use pijFORTHos? Leave a review!|
|View open issues (3)|
|View pijFORTHos activity|
|View on github|
|Fresh, new opensource launches 🚀🚀🚀|
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
A bare-metal operating system for Raspberry Pi, based on Jonesforth-ARM.
Jonesforth-ARM is an ARM port, by M2IHP'13 class members listed in
AUTHORS, of x86 JonesForth.
x86 JonesForth is a Linux-hosted FORTH presented in a Literate Programming style
by Richard W.M. Jones email@example.com originally at http://annexia.org/forth.
Comments embedded in the original provide an excellent FORTH implementation tutorial.
/annexia/ directory for a copy of this original source.
The algorithm for our unsigned DIVMOD instruction is extracted from 'ARM Software Development Toolkit User Guide v2.50' published by ARM in 1997-1998
Firmware files to make bootable images are maintained at https://github.com/raspberrypi/firmware.
/firmware/ directory for local copies used in the build process.
pijFORTHos is a bare-metal FORTH interpreter for the Raspberry Pi (original, Model B). It follows the general strategy given by David Welch's excellent examples. A simple bootloader is built in, supporting XMODEM uploads of new bare-metal kernel images.
The interpreter uses the RPi serial console (115200 baud, 8 data bits, no parity, 1 stop bit). If you have pijFORTHos on an SD card in the RPi, you can connect it to another machine (even another RPi) using a USB-to-Serial cable. When the RPi is powered on (I provide power through the cable), a terminal program on the host machine allows access to the FORTH console.
NOTE: HEAD is in active development, for a stable version the latest release is recommended.
If you are building on the RPi, just type:
$ make clean all
If you're cross-compiling, type:
$ CROSS=arm-linux-gnueabi- clean all
...where CROSS corresponds to the ARM cross-compiler toolchain you have installed.
If you can't compile (or cross-compile) from source,
you can use the pre-built
Next, copy the firmware and kernel to a blank SD card, for example:
$ cp firmware/* /media/<SD-card>/ $ cp kernel.img /media/<SD-card>/
The end state for the SD card is to have a FAT32 filesystem on it with the following files:
bootcode.bin start.elf kernel.img
Put the prepared SD card into the RPi, connect the USB-to-Serial cable (see RPi Serial Connection for more details), and power-up to the console.
To get to the console, you'll need to connect. Here are two ways to try:
$ minicom -b 115200 -o -D <device>
<device> is something like
/dev/ttyUSB0 or similar
(wherever you plugged in your USB-to-Serial cable).
minicom is not working for you, try using
$ screen <device> 115200
<device> is, again, something like
The console will be waiting for an input, press
<ENTER>. You should then see:
pijFORTHos <version> sp=0x00008000
With FORTH REPL running, try typing:
HEX 8000 DECIMAL 128 DUMP
You should see something like:
00008000 08 10 4f e2 01 d0 a0 e1 80 e0 9f e5 02 09 a0 e3 |..O.............| 00008010 01 00 50 e1 44 06 00 0a 00 e0 a0 e1 7f 2c a0 e3 |..P.D........,..| 00008020 f8 07 b1 e8 f8 07 a0 e8 20 20 52 e2 fb ff ff ca |........ R.....| 00008030 1e ff 2f e1 fe ff ff ea 1e ff 2f e1 00 10 80 e5 |../......./.....| 00008040 1e ff 2f e1 00 00 90 e5 1e ff 2f e1 b0 10 c0 e1 |../......./.....| 00008050 1e ff 2f e1 b0 00 d0 e1 1e ff 2f e1 00 10 c0 e5 |../......./.....| 00008060 1e ff 2f e1 00 00 d0 e5 1e ff 2f e1 0e 00 a0 e1 |../......./.....| 00008070 1e ff 2f e1 10 ff 2f e1 ff 5f 2d e9 f8 07 b1 e8 |../.../.._-.....|
For something a little more interesting, try the GPIO Morse Code tutorial.
The FORTH reference page describes the FORTH words available in pijFORTHos.
The Bootloader page describes the memory layout and boot process.
There is a persistent thread on the Rasberry Pi forums with a useful collection of bare-metal resources, including ARM CPU programming references and peripheral register descriptions.