Their main advantage is the comparatively low transistor count. The chips can be made cheaply and don't need cutting-edge fabs. This also makes them exceptionally power-efficient and tolerant of a wide range of supply voltages, so they're easier to integrate into many designs.
Just as important, they are far easier to master. Single-cycle instruction execution, single chip-wide clock, simple interfaces to all peripherals. If you don't have an OS to abstract it all away, most of the contemporary 32-bit platforms are a serious pain. Adjusting clock speed on a typical Cortex-M chip requires following a carefully-choreographed sequence of steps, possibly fiddling with flash wait states, various bus clocks, PLLs, and so on. On an 8-bit MCU, you just flip a bit or two.
It's a weird misconception that "8-bit" means antiquated or slow. Modern 8-bit MCUs run at high speeds, have plenty of fast memory, and integrate all kinds of cool on-die peripherals - DACs, ADCs, op-amps, DMA controllers, USB controllers, and so on. And in a good majority of embedded applications, they are enough.
Of course, there's nothing sacred about 8-bit ALUs, so I wouldn't be surprised if 32-bit ALUs eventually take hold in this market segment. But the replacements would need to preserve that "I can learn this in a weekend" property that isn't preserved in most of the high-performance 32-bit chips available today.
> Single-cycle instruction execution
For what it's worth, single cycle execution is really a detriment to power efficiency. There is an optimal logic level per pipeline stage for CMOS processes which will minimize power (and it's usually quite small!). Extremely deep pipelining lets you hit a higher Fmax, but if you don't crank up the frequency you will often save quite a bit of power.
Honestly even 16 bit is tiny.
- Even today, 8-bit MCUs can be significantly cheaper than 32-bit MCUs. A lot of microcontrollers are used for very simple tasks that simply don’t need anything more than what an 8-bit MCU can do. Although, these days it looks like 16-bit MCUs are comparable or sometimes cheaper when looking at Mouser and DigiKey? RL78-S1 may or may not count as 16-bit. I’m not familiar with it, and seeing some conflicting info.
- Plenty of legacy designs certainly continue to get manufactured, since updating the design and software to support a more advanced/cheaper processor would both require requalification of the product and require engineering time.
- If you need the absolute lowest power consumption, a simpler, smaller, slower core can be helpful.
- Existing expertise/familiarity
I laughed at this - amazing work once again.
This is both very impressive in terms of the sheer amount of work that went into that, but also a tiny bit disappointing because it's not really Linux running natively on an 8-bit chip.
I suspect that native Linux is technically doable and would be a lot faster, but would require a lot of fiddling with the kernel, to the point where you'd be rewriting as much as you're keeping. A lot of assembly shims to port, gotta get rid of all the MMU code, etc. AVR chips in particular also also a bit weird because they follow the Harvard architecture - separate addressing for code and data, which is not something the Linux kernel is made for.
FWIW, modern 8-bit MCUs are actually pretty darn fast. They have clocks all the way to 50 MHz or so, single-cycle execution for most opcodes, some have DMA and other cool gizmos on the die. They are orders of magnitude faster than the 8-bit tech we had back in the 1980s.
I wonder how fast is a Cortex M0, an M1, an M3, an M4 and a Cortex M7.
[1] https://yewtu.be/watch?v=z-GoLDQHYsE
[2] https://www.beagleboard.org/boards/beaglev-ahead
Update: Found this discussion on the Milk-V of 3 months ago: https://news.ycombinator.com/item?id=36377439
Some kind of Raspberri Pi style desktop replacement (or capable of that). GPU, GB's of RAM, plug in USB peripherals, fast external storage, ...
Microcontroller: on the lower extreme of CPU power, no graphics, small flash/RAM, grab soldering iron to hook up peripherals. There's ~$0.10 parts there.
Boards like the Milk-V Duo fall in between. uC like, faster cpu, larger embedded RAM, may produce video output, not suitable to run modern desktop OS.
Very different beasts for very different applications.
I'm still keeping an Eye on these device types because someday I hope it will be possible to create my personal Audio Player / iPod Nano clone with Wifi and long battery life by putting a buildroot based image (https://github.com/FunKey-Project/FunKey-OS) and Running a C# or Flutter UI on the framebuffer (https://docs.avaloniaui.net/docs/guides/deep-dives/running-o...)
I think Mango Pis Cyberpad 1 is pretty close to my wishes, but I haven't had the time to check it out :-) https://mangopi.org/cp1m
I did improve upon this more recently: http://dmitry.gr/?r=05.Projects&proj=33.%20LinuxCard