4 ms·
So 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 li
by dragontamer 4y ago
So 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.
- elcritch 4y ago> 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". People do run RTOS'es on these size of processors, mainly for latency control but you still want beefier processors / RAM. An RPi4 (normally) is cheaper than some Arduino / MCU kits. Also, RTOS'es can be easier to build and keep stable for years which helps with embedded projects where you don't want to update your linux kernel and drivers every 6 months. Baremetal makes less sense though. Well other than for hobbyist reasons IMHO since you tend to need lots of drivers to make them functional which isn't true for many MCUs. I'd guess this is a hobby project for the fun/joy/masochism of running baremetal.
- Fr0styMatt88 4y agoI believe as per this link they actually support VideoCore IV and the associated libraries (not ported to Pascal though) and that allows access to the camera module as well: https://forums.raspberrypi.com/viewtopic.php?t=193560 https://forums.raspberrypi.com/viewtopic.php?t=193560
- dragontamer 4y agoI'm looking through the Wiki, and calling Ultibo "bare metal" seems like a misnomer. I see threads, filesystems, networking (Ethernet) and even graphics drivers here. I dare say that Ultibo is more feature complete than an OS like FreeRTOS. Its a weird marketing choice. Maybe Ultibo's developers aren't very familiar with the language of embedded programs, but I'd call Ultibo a Pascal oriented Operating System for the Raspberry Pi. Just my personal opinion on this matter.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- monocasa 4y agoThe RPi is derided for it's ability to keep up with even soft real time tasks because of the matching "huge"ness of the software stack people commonly associate with it (full Linux). I welcome alternate stabs at software stacks that aim for a KISS attitude to let it compete with an Arduino when it comes to signal twiddling, etc.
- dragontamer 4y agoI personally recall the GPIO benchmarks you're talking about, and I seem to remember it being related to the CPU itself and nothing to do with Linux. Its not very hard to go into "Realtime" priority and force your processes to use up 100% of the CPU's power in Linux. If you need the _WHOLE_ CPU, then you can forcibly grab it as long as you're root.
- monocasa 4y agoIt's more that the GPIO interface on Linux is very heavy weight as it's a sysfs interface to perform any signal transitions, and exposes only a lowest common denominator of function composibility. That eats a ton of cycles. Like, yeah, twiddling a GPIO line is more expensive than you'd think on an RPi. It's in the dozens of cycles range. But if you look at it in terms of wall time, single cycle access on an Arduino is 62.5ns, and each cycle on an RPi at 900Mhz is 1.1ns, so they're in the same ballpark if you have bare metal access.
- dragontamer 4y ago> and each cycle on an RPi at 900Mhz is 1.1ns Its not the CPU's clock that matters here. https://codeandlife.com/2012/07/03/benchmarking-raspberry-pi-gpio-speed/ https://codeandlife.com/2012/07/03/benchmarking-raspberry-pi... With 14MHz best-case from the Rasp. Pi, its clear that the GPIO clocks are simply at a slower rate than the CPU. Also, with C, you can achieve the highest possible GPIO rate on the Rasp. Pi. No need to go into an alternative OS.
- monocasa 4y ago
- chinabot 4y agoFunny story, I found a game I wrote in Turbo Pascal from 1988 so I decided to run it a couple of years ago in a DOSBox. whenever I ran it, it just ended immediately so I assumed it was broke, I eventually tried it in a VM running DOS at about a hundredth the normal CPU speed speed and I saw the system draw the screen, play the demo game, time out and end all in about five seconds.