7 ms·
Ultibo – Bare-Metal Pascal for Raspberry Pi
- 1vuio0pswjnm7 4y agohttps://github.com/ultibohub/Examples https://github.com/ultibohub/Examples
- pulse7 4y agoTLDR: Ultibo is a bare-metal environment written completely in Free Pascal. Because it supports multi-threading you can see it as Unikernel Operating System. You develop your bare-metal program in Lazarus IDE in Free Pascal and use Ultibo as (unikernel) library for your application. After compilation you get the Raspberry Pi image file which you put on your SD-card and run the program on RPI - baremetal. It has support for USB, Ethernet, FAT, NTFS, ...
- Sunspark 4y agoI knew holding on to my Pascal textbook since the 80s would come in handy one day. :) In all seriousness though, I would like to understand this a bit better as I have not heard of this project before. Is Ultibo actually written in assembler, and then when you compile your Pascal program the assembler boot modules along with the compiled program code are merged together? To me, bare-metal means assembler, or if you're really hardcore, binary.
- djur 4y agoIt doesn't necessarily mean assembly, just the absence of a separate operating system. It looks like Ultibo is mostly written in Pascal, with a small amount of inline assembly to initialize the hardware, etc. https://github.com/ultibohub/Core/blob/master/source/rtl/ultibo/core/bootrpi.pas https://github.com/ultibohub/Core/blob/master/source/rtl/ult...
- lodovic 4y agoBut if interpreted it wouldn't be bare metal, no?
- porcoda 4y agoWho said it’s interpreted?
- djur 4y agoI think the line there is blurry. If someone said "bare metal Smalltalk" I'd probably assume they were referring to a Smalltalk VM running directly on the hardware.
- nine_k 4y agoBare metal Java exists, because Java-oriented CPUs were and are a thing. Have you realized that every smart card you have, like a bank card, or a SIM card in your phone, runs Java code inside, using such a Java-optimized CPU? https://en.wikipedia.org/wiki/Java_Card https://en.wikipedia.org/wiki/Java_Card
- djur 4y agoYes, I'm familiar with that. Why do you ask?
- Smoosh 4y agoProgramming in PASCAL by Grogono ? I still have mine.
- nine_k 4y agoPascal is totally fine for bare metal programming. (Modula-2 would be better, but anyway.) Early versions of macOS [1] were written in Pascal. [1]: https://en.wikipedia.org/wiki/Category:Pascal_(programming_language)_software https://en.wikipedia.org/wiki/Category:Pascal_(programming_l...
- deleted 4y ago[deleted]
- indigodaddy 4y agoWow this seems super fun and awesome for adults and kids alike
- dragontamer 4y agoSo Bare-metal is excellent for smaller boards, like ESP32, Teensy 4.1, or the tiny microcontrollers like AVR DD / ATMega, PIC, and STM32F4 or STM32G0. So are lightweight OSes like FreeRTOS. There's also Arduino (set of libraries), which is somewhere between a proper OS and bare metal. Rasp. Pi however is extremely powerful, far more powerful than any computer we had in the 90s or early 00s. The idea of running RP4 "bare metal" is rather weird to me. RP4 has so much processor power on it that a proper OS seems like a no-brainer. ----------- Looking at Ultibo, it seems like it has a threading library (https://ultibo.org/wiki/Unit_Threads https://ultibo.org/wiki/Unit_Threads), so that makes it an OS in my eyes (at least as much of an OS as FreeRTOS). Hmm, I think from a marketing perspective, they should discuss how Ultibo builds compare against minimal-Linux builds? It'd be great to compare Ultibo-Hello World vs Alpine Linux-Hello World (Alpine being the smallest Linux I'm aware of). Maybe have a comparison vs Ubuntu for good measure as well.
- wila 4y agoThe FAQ says it runs on pretty much all RPI's. So you can also use it on an old Raspberry Pi you might have laying around. It doesn't have to be a RPi 4.
- dragontamer 4y agoRP2 is quad-core, 900MHz and 1000000kB of RAM, a behemoth compared to the single-core 20 MHz and 2kB of RAM chips (ATMega328p aka Arduino Uno, which actually runs at 16MHz) I was comparing it to in the embedded world. My point stands: Raspberry Pi is huge. Even old models like RP2 give you 6-orders-of-magnitude more RAM and 2-orders-of-magnitude more Compute power. Its just not the kind of processor I think of that needs to be run "bare-metal", or even "something more efficient than Linux needs to be installed on here". Its interesting that Ultibo is aiming for the Rasp. Pi. I'm curious what kinds of use cases people will find for it.
- taw28 4y agoRPi2 is pokey enough that you really feel the limitations of the platform when you put Linux on it. Sure, you can run the kernel, but you are going to want to stop short of, say, any web browser that can function well on today’s web. Even a RPi4 isn’t a good daily driver for web browsing. Part of the magic of these bare metal language environments is that you run against your own limits before you reach the limits of the hardware, especially in a hobby coding context. Linux makes it much easier to outstrip the CPU and RAM available in RPis.
- Fr0styMatt88 4y agoExample use in a DIY digital dashboard for a car: https://youtu.be/iH9lp-Nms-o https://youtu.be/iH9lp-Nms-o
- _alex_ 4y agothats really cool
- virgulino 4y agoAwesome! Next steps: ChatGPT in a voice interface, and a Turbo Boost button.
- Fr0styMatt88 4y agoOr combine it with that engine noise generator that uses a full physical simulation: https://youtu.be/RKT-sKtR970 https://youtu.be/RKT-sKtR970 That would be pretty sweet! I’m guessing with the ECU sensors you could feed in the data to a simulation of a different engine to get really authentic different engine noises.
- deleted 4y ago[deleted]
- netfortius 4y agoFYI: Main link [1] -> Object Pascal Tutorial [2] -> "There is currently no text in this page. You can search for this page title in other pages, or search the related logs, but you do not have permission to create this page." [1] https://ultibo.org/make/ https://ultibo.org/make/ [2] https://wiki.freepascal.org/Object_Pascal_Tutorial https://wiki.freepascal.org/Object_Pascal_Tutorial
- nine_k 4y agoThis is a blunder, of course. But the serious docs are there: https://www.freepascal.org/docs.html https://www.freepascal.org/docs.html (And I haven't forgotten Pascal since 1980s anyway...)
- rollcat 4y agoIf you could only buy a Raspberry Pi these days... rpilocator.com exists, but RPi4's and/or Model B's barely (if ever) show up.
- kristianp 4y agoAny pico support planned?