Ultibo Core
Developer(s) | Garry Wood et al. |
---|---|
Initial release | 2015 |
Stable release | Ultibo-Core-2.0.029 "Beetroot"
/ February 3, 2021 |
Preview release | Demo-RPi-4-support
|
Written in | Pascal, Object Pascal, Assembler |
Engine | |
Operating system | Embedded for Raspberry Pi (No OS) |
Type | Compiler, Integrated Development Environment, Embedded operating system |
License | GNU General Public License for the compiler and utility executables. GNU General Public License with static linking exception for the runtime, package, component and other libraries that become part of executables created with the compiler |
Website | www |
Search Ultibo Core on Amazon.
Ultibo Core is a runtime library to support embedded Raspberry Pi projects. It is not an OS, but a kernel-in-a-runtime-library providing much functionality of a modern OS and is a quasi-Real Time Operating System if carefully implemented by the programmer. It supports most Raspberry Pi models up to the Pi 3B+ with Pi 4 support imminent as of a 2021-05-05 demo release. Ultibo Core is free under GNU LGPL version 2.1[1] license and developed and supported by Ultibo.org. It is based on the Free Pascal programming language[2] and includes the Lazarus Integrated Development Environment[3] (IDE) and runtime libraries to interface to the hardware of the Raspberry Pi and provide the runtime operations including GPIO related events (interrupts, detections, output, etc.).
Overview[edit]
Ultibo IDE is a fork of Lazarus for Windows. 3rd party ports exist for MacOS and Linux (including Raspberry Linux'). It cross compiles Free Pascal to make a bootable runtime for the Raspberry Pi. The runtime is under the control of the Ultibo Core runtime functions which include a multi-tasking, multi-threaded, time sliced, pre-emptive scheduler and interrupt handler. Particular emphasis is placed on access to the Rapsberry Pi's GPIO 'header' and other hardware functions including Ethernet, USB, graphics, video and others. Programming in inline assembler is also possible but rarely needed as the compiler is well optimized.
Intended audience[edit]
Ultibo Core is aimed at hobbyists and prototypers who want to explore making powerful embedded applications on Raspberry Pi computers using the Pi's wide range of interface capabilities and relatively powerful CPU at the Pi's price point. Notably, as there is no operating system, the programmer can attempt high performance applications free from the high overheads of an OS. Raspberry Pi is available in a compute module that can in turn be integrated into production hardware, so it is entirely possible to use Ultibo Core in production systems. <<<< there is at least one known use case for this, but I'd have to get their permission to include it here...>>>>>
Runtime[edit]
At boot (power on) the runtime library configures the CPU and board hardware to an initial state and the various thread managers are started. The user's main thread is started and may be run to initialize and then run as a loop or it may stop via a call to the runtime. Any threads, timers, workers, interrupts, etc., that it has started will remain running until they complete. Overhead is minimized by the implementation of a unikernel within the runtime library. It has control of the CPU's from the start, including the system timer interrupts which allow it to maintain control of all threads and interrupts on the system. The application code runs independently as a thread or many threads as well as other dispatch-able tasks such as Timers and Workers. "User" code is always pre-emptable by the kernel but various locks are provided to ensure parallel processes accessing a common resource can be managed to avoid corruption, deadlock or race conditions. The user code can control which CPU (on multicore processors) a given thread is assigned to, or let the runtime select based on load.
The GPIO header of the Raspberry Pi is one of its most popular and useful features for prototyping and Internet of things applications so the runtime library provides rich functionality to access these functions.
In a typical Pascal application, functional operations can be separately written as self complete units (with a 'public' interface section for other units and main program to access variables, constants, types, procedures and functions, etc., 'implementation' section and initialization/finalization sections). For example, a unit may be written solely to interface to an external UART device such as a GPS, while another unit would interface with the display. These units may implement such as a single or numerous threads. Such a thread could be a loop which can cooperatively sleep for a period in order to yield the CPU to another thread. However, given that the runtime is pre-emptive, a thread need not be cooperative - though that is the best practice. Further, a unit may use numerous other low level tasks such as timers and workers that operate similarly to threads: they can be started and repeat at an interval, they can loop and sleep (and be pre-empted) and of course self terminate. Inter-process communications is provided by various system features as well as various lock mechanisms to prevent race, corruption and deadlocks.
The runtime provides various event based hooks from the GPIO header such that, for example, a switch going from high to low state will result in a callback to a function written by the user.
Real Time[edit]
While Ultibo Core is not a RTOS, careful implementation will yield a reliable real time embedded application while using the Raspberry Pi's resources efficiently.
Latest version[4][edit]
Component | Version |
---|---|
Core | 2.0.895 (3 February 2021) (Beetroot release) |
FPC | 3.1.1 revision 32846 |
Lazarus | 1.6RC1 |
References[edit]
- ↑ "License". Ultibo.org. Ultibo.
- ↑ "Free Pascal".
- ↑ "Lazarus".
- ↑ "Ultibo Current Version". Ultibo.
This article "Ultibo Core" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Ultibo Core. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.