What does HackerNews think of circle?

A C++ bare metal environment for Raspberry Pi with USB (32 and 64 bit)

Language: C

#10 in C++
#5 in Framework
#6 in Raspberry Pi
Nice. I can see something like this being used with circle (https://github.com/rsta2/circle) to run bare metal on a Pi, too.
Bare metal C++ for PI. https://github.com/rsta2/circle

Access to most of the hardware and real-time deterministic behavior. It’s a really great project and lets you twiddle those gpio pins at ridiculous speeds with perfect timing (less than a millisecond).

A PI comes with a whole bunch of great hardware baked in, so if you have one laying around, and want to do some microcontroller stuff, I think it’s a great choice.

It uses the circle library (https://github.com/rsta2/circle) to provide a minimal runtime (mainly to interface with the hardware).
Natively would be amazing but a vast amount of work.

The way Apple moved classic MacOS from 680x0 to PowerPC was to write a tiny kernel emulator, with an API to run native stuff on the metal, and run more or less the whole OS under emulation, profile it and just translate the most speed-critical bits.

https://en.wikipedia.org/wiki/Mac_OS_nanokernel

That's a lot of work for a FOSS project but given the performance delta between 1980s 680x0 and 2020s ARM, total emulation of the whole thing should be perfectly fine. It's how the PiStorm Amiga upgrade works.

https://amigastore.eu/853-pistorm.html

So all I envision is something like Aranym:

https://aranym.github.io/

... running on top of Ultibo, say:

https://ultibo.org/

Or maybe Circle:

https://github.com/rsta2/circle

Pretty cool. Seems like this project was built on the Microdexed [1] code, which is a port of Dexed to run on a teensy. It uses circle [2] as a bare-metal basis on the pi, which was also used by mt-32pi [3] to run a sample-based synth that can emulate the roland mt-32.

[1] https://codeberg.org/dcoredump/MicroDexed [2] https://github.com/rsta2/circle [3] https://github.com/dwhinham/mt32-pi

From a glance, it looks interesting to get started.

Reminds me of some 'bare metal OS' series for Raspberry Pi: https://www.rpi4os.com and https://s-matyukevich.github.io/raspberry-pi-os and https://github.com/rsta2/circle

Recent x64 AMD and Intel PC's use UEFI secure boot and require signed boot images, so this simple approach won't boot out-of-the box anymore I suspect. Same for Mac M1. So some update would be useful, without requiring to disable UEFI secure boot.

Does studying toy operating systems teach strictly more, or just different skills, than studying bare-metal embedded frameworks like https://github.com/rsta2/circle (which powers https://github.com/dwhinham/mt32-pi, unlike Zynthian which is Linux-based (https://zynthian.org/#software))? I dropped out of uni before completing my OS course, and I planned to look into mt32-pi, but sadly struggled with hardware and software setup (game MIDIs wouldn't play right, and in terms of sound design, all the good MT-32 patch editors are for obsolete platforms and many are gone from the Internet).
It's too bad it needs Linux as a base, would be great to build a Smalltalk-based system using something like the circle library for low-level access (https://github.com/rsta2/circle). Hopefully someone can reverse engineer the binary blob for controlling the eInk display.
This is going to end up somewhat specific, as most low-level initialization routines are. ARM vs x86 vs RISC-V vs MIPS vs a BASIC stamp or propeller etc...

I will suggest studying some general Assembly language concepts, memory locations, how to set-up RAM timings and bring offchip RAM into an address space, etc.

This stuff is used daily in the world of microcontrollers, I'm a huge fan of the Parallax propeller, in which the Spin interpreter in ROM launches Assembly routines on individual cores in about the simplest fashion possible...

Some things you may find interesting: https://github.com/dwelch67/raspberrypi

https://github.com/rsta2/circle

https://ultibo.org/

Think of the latter 2 as "HAL plus some primitives" rather than RTOS...