Piccolo OS, a Small Multitasking OS for the Raspberry Pi Pico
github.com
github.com
> To be honest, I am not interested.
I respect this so much.
This means you must carefully balance teaching the right thing (a realistic system implemented skillfully) against teaching the right way (simplification for didactic purposes).
You really shouldn't, Gary is extremely pedantic himself. He really really dislikes criticism or being corrected. For example on youtube, in many of his video comment's, he's engaged in long fights with anyone who claims that Arduino code is C++. In his mind it isn't, therefore that's that.
I dislike him quite a lot to be honest...
struct {
// ...
} typedef piccolo_os_internals_t;
int typedef Int; // also works.
You always learn some new quirk of C. I guess typedef works like const, can put it on the left or the right.My c is pretty rusty, admittedly.
https://github.com/Mr-Bossman/pi-pico2-linux
That's with an 8MB external PSRAM though, fitting modern Linux in the internal SRAM is probably a step too far.
If you're fine with obscure and retro, there's things like RISC-OS (ARM). Or EmuTOS (68k/ColdFire). Or FreeDOS etc (x86)
Speed-wise, both would run exceptionally well on that hardware.
The first Mac had 128kB memory, about 32 of which were taken by its video and audio buffers. It ran at about 8MHz.
The first version of Windows ran on similar hardware, requiring a 8088 and 256kB of memory.
The pico has at least that amount of memory, at top speed 16 times the clock frequency, and two cores.
I may be misunderstanding what you are saying here but if I read this correctly, you are wrong.
The project to run Transputer code on the Pi Pico uses a memory expansion for the original Pi Pico. I described it here:
https://www.theregister.com/2022/05/06/pi_pico_transputer_co...
edit - that is one WILD codebase... it has both pi pico support but also (remnants of)... Mac OS 9 support!? `#ifdef __MWERKS__`??
P.S. I wrote about HeliOS too:
You could consider this type of library OS even more tightly bound to the application than your typical JS app as its actually linked to the user code.
If you define the context to mean it and then assume that everyone agrees with your implicit context, then maybe. In reality, OS and schedulers are not the same thing.
It’s also a leap from the “MacOS 9 was not an OS” GP position.
That wouldn't be the first time I've heard that statement, even among classic Mac enthusiasts.
Here are 3 definitions from 3 different sources: https://www.wordnik.com/words/operating%20system . Not a single one even mentions process scheduling or anything to exclude MULTICS, CP/M, DOS, or any version of MacOS or Windows. I know that some people think that being contrarian on HN is cool, but this is beyond ridiculous.
That's essentially what OS is: some bootstrap, scheduler and some APIs for developers and some drivers.
We like to conceptualise OSes as programs, but at the low end they start to resemble libraries.
if your FS is just a library, process switching is timers and interrupts, and memory protection is provided by the processor, what is the OS? Where is the OS?
The extensions available from Hunter Adams at Cornell are also very useful. In particular, PT_YIELD_INTERVAL() has been very useful for me.
https://people.ece.cornell.edu/land/courses/ece4760/RP2040/C...
Worth reminding that lots of tasks don't need their own stack, so detecting (or hinting) that would be extremely worthwhile.