It's still a microcontroller, but it's a step above any other.
123 comments
Stated another way: An MCU, like the ESP32, is a tiny computer, sans the hardware you physically interface with it.
The computing power, and memory is much lower than your desktop or laptop PC (or mobile phone), but if you are using it to run a dedicated task, instead of using a big OS like Linux or Windows, it can complete the tasks really fast (often microseconds) and with minimal power use. This is because it's easy to program to do exactly what you need, with nothing competing for the hardware.
A note on ESP in particular compared to other MCUs: It's one of the only (Or was?) options which has Wi-Fi integrated into the MCU itself. It's a good default if you want that.
They're generally intended to run flashed firmware and be single-purpose. They usually come bundled with peripheral components and typically have breakouts to add more (pots, sensors, etc).
They're great for doing one thing (though some support firmware switching), and you can build the 'software' for them pretty easily using Python or C-like variants.
So for hobbyists they're perfect. You want a quick LED christmas display you can toggle between Rudolph and Santa from a quick network call? You want a humidity sensor in your bedroom? You want to create a networked security camera? These are the types of use cases for MCUs.
Each type of device has different capabilities. Most have Wifi, some don't. Some have extra RAM and ROM, and some don't.
The main thing that ties all the different devices together is the ESP-IDF software stack.
If you want a web API for something in the physical world, make ESP32 do it.
Isn't it like $2 vs $6?
:)
There’s no way a multi-user OS such as Linux can be as efficient as a firmware blob that does one thing. Tell me if I’m wrong, but in my mental model, one can get about the same mileage with 16 MB of PSRAM in an MCU running FreeRTOS as one can get in a 512 MB SBC running Linux. For my use case, the winner combination would, of course, be a 512 MB SBC running FreeRTOS, but I’ve so far been unable to find such a wondrous thing.
For your use case, you need raw performance and low-level control, and you have it. But for IoT device which is all about network more or less, there's usually no need to go low-level.
ESP32 for Wi-Fi handling uses wpa_supplicant port from Linux for example.
You can run a real, multi-user Linux with as low RAM as 8 MB. You get the benefit of running any Linux-supported programming languages (and combine any amount of them without extra effort, just on a real machine), established portable abstractions, established memory protection model, ease of debugging.
You can run both though. Both FreeRTOS and Linux simultaneously, where Linux is a FreeRTOS task on a dedicated core. That's how several Linux ports work, haven't checked if Espressif's works this way as well.
Or you could just use it as a microcontroller. Networking support is already good. Programming language support is better than you think (C++, Rust, Python, JavaScript). Debugging just works on newer boards.
Yes, obviously. The advantage is in how easy it is to port software to the board, and how much work you need to do to get any given amount of functionality.
Espressif's port use 6.18 due to this exact reason. There's also another port, using 7.1, not sure if it supports XIP.
https://www.phoronix.com/news/RISC-V-XIP-Being-Removed
XIP is almost essential for these low-RAM devices. You can run Linux with 8 MB RAM with reasonable functionality.
Edit: I looked into it, sounds like NetBSD hasn’t done work on ESP32 before because of the lack of MMU. Now this should be possible, but there’s probably a fair amount of work to do.
Here are the archive onion and regular links:
https://web.archivep75mbjunhxc6x4j5mwjmomyxb573v42baldlqu56r...
https://web.archive.org/web/20260924163612/https://www.xda-d...
The site also requires a User-Agent header
Maybe XDA Developers does not like pseudo-anonymity
Read the full thread on Hacker News →
Related stories
- Running Linux with kernel 6.3 on Open Source Hardware board with ESP32-S3olimex.wordpress.comLobsters · 8 points · over 3 years ago
- The lightweight Arch Linux based distro that runs, without root privileges, upon any Linux distrogithub.comLobsters · 12 points · over 4 years ago
- Hacker News · 4 points · 8 days ago
- Raspberry Pi Arch Linux ARM no-systemdgitlab.comLobsters · 7 points · over 5 years ago
- Espressif releases Linux BSP for ESP32-S31 RISC-V boardscnx-software.comLobsters · 6 points · about 1 month ago
- Linux process infection (part I)tarlogic.comLobsters · 2 points · almost 8 years ago