hckrnws
The newest ESP32 can run Linux and it's getting close to a Raspberry Pi
by adunk
by adunk
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.
[deleted]
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.
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.
(Although xda-developers forum isn't exactly a great place for technical discussions either. Not following standard software engineering practice and instead using forum posts to track bugs and announce releases in 2020s is beyond me.)
Do you have any pointer for starting on this ? Something with eink screern and browser rendering would be very good combo. I looked at M5Stack paper s3, but it doesn't cave camera.
Here are the archive onion and regular links:
https://web.archivep75mbjunhxc6x4j5mwjmomyxb573v42baldlqu56r...
https://web.archive.org/web/20260924163612/https://www.xda-d...
https://github.com/foky26/Retro-Gamer
https://github.com/EremusOne/ESPectrum
https://github.com/hchunhui/tiny386
New chips like the one in the article should be even more capable. 486 won’t be out of reach for long.
One of the big problems has been handling peripheral emulation, multiple controllers, etc. USB plus the other cores should help with this.
Tried running yolo pose on bare S3, and the results were underwhelming.
Most embedded stuff doesn't need that much power.
That is how we end up with Electron.
- 1 or 2 M.2 NVMe for fast storage
- 2 RAM sockets for expandability. Not sure if DDR5 or if DDR4 is sufficient. SO-DIMM is fine.
- 2.5 GBit ethernet (or better). Two ports would be better than one.
- a CPU with a bunch of cores that can saturate it well. Also a NPU inside the CPU.
- power via USB-PD
- optionally a couple of USB ports for things like USB sticks, Wifi (if needed), printer.
That's it. I don't need a display port like HDMI or DP.
[dead]
[dead]
I'll fix it, and thanks for mentioning it, but I also wanted to add that the "AI article" accusation was unnecessary. I spent a lot of time going through Espressif's documentation and the datasheet, and working out how Sv32 works and differs from the "MMU" implementation Espressif typically touts. It just feels like a strange accusation to tack on to an otherwise fair point regarding the article's readability.
Indeed. The closest direct competitor is likely the Nordic nRF52840, which does bluetooth + thread, but can't talk actual wifi
Otherwise NXP recently released their RW6xx line with wifi/bt/thread/zigbee. But as with any other western maker, the documentation and SDK aren't as easily accessible to mere mortals (but I think NXP in particular has gotten better with this).
The only thing Espressif does good is SDK support.
> Espressif put a real MMU in the ESP32-S31
So I wouldn’t claim this is a hard and fast rule. Lots of mcu lines have added mmus on some variants.
Espressif's answer: yes
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.
Absolutely mind blowing. What a fun time to do side projects.
I have virtual power outlets and fans that actually just some process on linux.
what's the meaningful distinction now? It isn't all SoC anymore and it has had a linux capable MMU since S3, even if it required a lot of work.
The only real difference at this point is pure numbers, and i'm not that keen on defining microcontrollers as "those things with less ram than an SBC.", and if it's a microcontroller because it requires bare-metal flashes; well then I point to the older S3 MMU boards running busybox.
If you want a web API for something in the physical world, make ESP32 do it.
[0] older versions had Xtensa cores, not RISC-V.
Comparisons to a Raspberry Pi are a stretch IMO. It is not a single board computer. You can't hook it up to a monitor/TV, plug a mouse and keyboard in, and use it as a Linux PC. However, there are people who use Raspberry Pis like a microcontroller because of its GPIOs... but they should all be using microcontrollers instead.
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.
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.
>There's also limited support for 32-bit RISC-V in distros so anyone looking to run Linux on this will need to build everything themselves.
For this kind of a device, "everything" is a kernel + your application/libraries + maybe busybox/toybox with some applets, all with XIP.
>Easier to just get a cheap ARM SoC that can probably run Android
It's at least twice as expensive for the features S31 provides. See my other messages here.
But what does Linux actually give you in a MCU? It's a lot of overhead so it has to really be worth it.
ESP32-S31 is no longer an MCU anymore if it has an MMU I guess. It's a full-blown "computer chip".
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.
[deleted]
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.
I'm sorry to be asking this, but what is that supposed to mean?
Smart homes are dumb unless you are presence aware. Looking at your phone to do a thing is just moving a light switch to your hand.
The Who is — does the automation make sense for one or many people. If two people are in a room what happens? If one person leaves what happens?
Esp32’s are pivotal in actually making a smart home predict what you want making the home more of a friend, “get on up there Peter Townsend.”
I also have 7 beacons that are tracked. A guest can grab a lanyard with the beacon and wear it and every panel on the wall changes to what you would expect a guest to want to see.
The weather, anybody in the bathroom, how cold is the pool, is the hot tub on, what will the chef be making for dinner?
The site also requires a User-Agent header
Maybe XDA Developers does not like pseudo-anonymity
According to Espressif website, current "reference price" for S31 sample module (1 piece) with 16MB flash + 16MB RAM is $6.2.
If S31 won't be much more expensive than S3 in bulk, it has a chance to become a very successful and what's more importantly really cheap full-featured Linux platform, in a small form factor, with flash, RAM, and radios integrated.
Espressif here could easily kill many contenders. You can count Wi-Fi-integrated Linux SoCs on one hand, let alone with RAM+Flash integrated, let alone cheap and available in quantities, and with reasonable soft and tech support.
Oh, and ESP module quite literally doesn't need anything more than a 3.3V power and maybe 2 capacitors to work.
There are a lot of competitors in China, the BK7258 is arguably better than S3, but cost similar.
And if you are willing to sign NDA, there are much better offer from BES.
What BES chip are you referring to?
I think trying to be everything devalues the original idea.
A microcontroller is a type of processor that offers very fast startup, predictable timing and direct access to hardware peripherals. In contrast to application processors that are intended to run an operating system, a microcontroller will not have OoO execution, multiple tiers memory (eg cache and dram). Usually they also lack an mmu and multiple privilege levels of execution (although that seems more common on riscv microcontrollers). All this means microcontrollers aren’t designed to run Linux (even if someone does figure out how to do that) or clock in the gigahertz, but instead provide very predictable low latency execution required for managing real time systems. For example they might need to operate a set of mosfets with microsecond accuracy to efficiently and safely control a motor.
Similar to a lot of old cortex-A soc.
>multiple tiers memory
The S31 also has cache and sram, with inpackage psram.
> Usually they also lack an mmu
The S31 has mmu.
SBC is a PCB which includes ports for power, I/O, often other parts like sensors on it. Esp32 is a MCU. You can put an Esp32 on a PCB and call it an SBC. (Although semantically SBC usually refers to something that runs a GPOS, but perhaps that's flexible or changing)
Ex - go check amazon, they're all the "dev kit" versions of ESP32.
Hell - even Alibaba has an overwhelming majority of the kits in the SBC form, rather than the straight MCU (although they at least exist in that form there, unlike amazon).
Even on digikey... there are like 4 listing for the straight MCU, and hundreds of listings for PCB board versions.
So I think for most consumers purchasing these... functionally they end up buying a form factor that is much closer to SBC than MCU.
---
From my perspective... I'm old enough to remember when Arduinos were the hot shit in this space, and now ESP32 is basically the same value prop at 1/10 the price point (or better, if you are actually willing to solder it to the PCB yourself... then you get down to 1/50th the price point).
Now, if you want to argue that the difference between a dev board and an SBC is kind of vague, I agree on that front. I'd argue that the distinction is mostly the vendor's intent. E.g. if I sell the ICs in bulk and _also_ sell a board with that IC, it's probably a dev board. If I source the ICs from somebody else, only sell the assembled boards, and ship a general-purpose OS with it, it's probably an SBC. With sufficiently powerful hardware (like this thing seems to be), you could use a dev board as an SBC, and that is basically what this article is all about.
Technically a chip can excel at both.
[deleted]
Personally I just have presence sensors and eink tablets on the walls.
prompting, can it reasonable get close to answering. context, can it understand my question and perform an action.
So the schools of thoughts should be folding on itself here and aligning.
1. Go to mouser.com
2. Type ESP32 into the search bar
3. There's your part.
Its difficult to buy a very specific nut or bolt from Amazon (their nut/bolt search interface doing precisely nothing it appears to be intended to do). That doesn't mean McMaster-Carr doesn't exist. You're just going to the wrong store.
If you're in particular referring to how hard it is to find a PDIP package (that is, a through-hole package) for an ATMEGA MCU, that's because they don't make them anymore. Insofar as I'm aware, Espressif has never made a through-hole ESP32 module, but maybe they made one with castellated edges?
But an ESP32 module is as easy to come by as a surface-mount ATMEGA328P. Which is to say, very easy.
Last time I checked digikey had every module version avaiable for every version. You get hundreds of other versions because there are more variations of those.