Embedded Project Oberon is an adapted subset of the complete Oberon operating system as defined and described in the book Project Oberon by Niklaus Wirth and Jürg Gutknecht.
Embedded Project Oberon comprises the full Inner Core:
- Kernel: heap memory allocation, garbage collection, SD card IO
- FileDir, Files: file system
- Modules: dynamic module loader-linker
Plus these modules of the Outer Core:
- Oberon: command/task invocation loop
- System: system commands, trap and abort handlers
- Texts: formatted text output and input
- Input: read characters from Astrobe terminal
- Upload: transfer files from host PC to target’s SD card
- RTC: hardware real-time clock interface/integration
The system is started by the boot loader, BootLoad.mod. This module is compiled in a special mode, and gets “burned” into the programmable ROM of the RISC5 processor, as implemented in the FPGA.
Astrobe for RISC5 comes with an image file that needs to be transferred to an SD card, which then serves as system disk. That image file contains:
- an “invisible” boot file, which is composed of the compiled and linked modules of the Inner Core
- all compiled system files of the Outer Core as per the above list
- compiled example files
The boot file with the compiled and linked Inner Core is required because we don’t have a file system before the Inner Core is loaded.
The startup process proceeds as follows:
- The boot loader loads the boot file with the Inner Core from the SD card and terminates with a branch to address 0.
- A branch at address 0, set by the boot file, transfers control to the body of Modules, which initialises the bodies of Files, Kernel, and FileDir (in this order). This establishes a working file system. From here on, the compiled modules of the Outer Core can be loaded from the SD card.
- Then Modules loads Oberon, which implicitly loads the imported modules Texts and Input. From here on, we have a working user interface via the Astrobe console.
- The body of Oberon loads System, which installs the two handlers for traps and abort.
- Thereafter, the body of Oberon continues to set up the garbage collector, to then finally call the Loop. From here on, we have working Embedded Project Oberon system that responds to user input via the Astrobe console, as well as upload requests from the Astrobe IDE.
Using the System
For the use of Embedded Project Oberon, including writing and uploading Oberon modules, refer to the documentation that comes with Astrobe for RISC5.
Astrobe for RISC5 now provides the functionality to make changes to the Inner Core as well. Hence all system modules can be changed, but be aware that the startup sequence requires that all system modules are consistent as regards the module keys. If not, the boot procedure will fail, and you won’t get any error messages, because the terminal output system is not ready yet. Tricky to debug.