Show HN: Minimal freestanding C runtime for bare-metal/embedded PC projects
github.com
github.com
The idea for fleet (and thus for startc) is to work inside a hypervisor (kvm) instead of real hardware so you get a few devices implemented through virtio and run on top of that.
His blog post on fleet is at http://www.redecho.org/2015/10/01/system-programming-is-fun-...
Edit: There is a Erlang project already: http://erlangonxen.org/ Edit2: wrong link...
A more interesting trick of exokernel frameworks would be to provide a consistent interface across platforms such as video, input, storage and threads made easily accessible like QNX and others have done.
I actually wrote parts of this library in C at first, but ported them down to assembler once I got them working, because it felt more elegant to divide my project cleanly into a 'runtime' library written in assembler and a 'kernel' program written in C. A matter of taste, I suppose. The use of assembly doesn't really create a maintenance burden as the target architecture isn't changing and the library already does everything it needs to.
http://ecos.sourceware.org/about.html
I've always been surprised they weren't modified for use in VM's in the JeOS-type deployments. I'm sure some components like network stack could use some security review but I don't think that's why they were ignored. eCos's configuration options were particularly a strength as you could keep just what you wanted.
There are a few self-contained snprintf implementations, such as this one: http://www.ijs.si/software/snprintf
Some porting work may be required for freestanding/bare metal platforms.
There is no example of supported hardware, so at first glance It seems it would only be useful on old hardware, or Soekris-like boxes...
"Requiring each program to include drivers for every possible hardware device would be madness, and slow madness since device emulation is tricky and expensive. These programs are never going to be run on bare metal anyway, so I’m going to ignore all legacy PC devices and define the ‘fleet’ system interface a consisting solely of virtio devices. These devices all have a simple, standardized IO interface, so it should be no problem to build drivers for six or eight of them into my kernel-library. I’ll offer an efficient low-level I/O API for nonblocking DMA transfers. All the clunky, synchronous, blocking C APIs can be implemented on top of that."