3 ms·
Because people are trying to use a hammer on a part that needs a precision screwdriver. A generic OS with a monolithic, non-realtime kernel offers downright ter
by Sanddancer 11y ago
Because people are trying to use a hammer on a part that needs a precision screwdriver. A generic OS with a monolithic, non-realtime kernel offers downright terrible support for the useful and interesting parts of embedded components -- the multitude of I/O components designed to keep things from needing the CPU, timers to trigger interrupts at regular intervals, so that it can spend most of its time in sleep, etc.
Generic OSes simply have the wrong sort of philosophy for this. Microcontrollers, like the AVR or ARM Cortex-Ms, tend to provide an environment that gives you more tools needed to take advantage of the processors in a reasonable manner. They provide the hooks for interrupts so that you can service IO when it comes in, they provide network stacks and filesystem libraries that you can use if your project calls for them, or ignore when it doesn't. Because of this, you end up in situations where programming for an ATTiny4313, with 256 bytes of RAM and 4 kilobytes of flash, is more enjoyable and rewarding than a system with a million times those resources.
A lot of this can be blamed on the documentation, or lack thereof. A lot of the higher end embedded devices -- like the broadcom chip in the pi -- don't have nearly the documentation available to the ordinary user as the smaller chips. As a consequence, users have to pore through the tiny amount of documentation that is available to guess their way to the answers, further ensuring that you'll only get a few ports of operating systems that really don't exploit the power of the chip they're running on. You just get a generic experience with a generic OS.
The solution is to hack. Go deeper than Debian, farther than FreeBSD. Bug manufacturers for the tools needed to expose the dark corners of the chip, to get register maps and interrupt handlers. We need good real-time solutions that the common person can count on. To get things not so ugly, we need the opposite of the tools we have now. We need to lay these chips bare, because the current path just isn't sustainable.
- justaaron 11y agoamen