With all the capabilities, video and audio output, it might be an excellent platform for software emulation of older devices. There is plenty of GPIO that can be driven by the 40 MHz core while the other two work on nobler things.
I'm thinking of building something that emulates a VT-340 terminal. I can take MAME's emulation of the 80186, the ROM dumps, and have something that just translates the 80186 ROM code into a compilable program, with the hardware behavior informed by MAME's description (which is incomplete for the 3xx series).
That would be useful in the retro scene. I once was gifted a terminal from Tindie or Kickstarter or something that was built using custom PCBs and I think a PIC32. It was OK, but it only did VT100 and had some kinks that made it less useful than I hoped.
You can probably transpile the 8080 code of the VT-100 ROM and make a very accurate replica, if you figure out the video generator - you’ll need to translate all the MOVs to VRAM and whatever CRTC the terminal used.
Ah, the Lord Giveth and the Lord Taketh Away. P4 didn't have enough raw speed for camera applications but had MIPI CSI, S31 has enough raw speed but no CSI.
I imagine that most of these (like almost all embedded chips) are designed primarily for some specific customer or two, and then they dump them on the market generally on the off chance someone else wants them too now that they're essentially capitalized.
I'm wrong actually about S31. The cores are actually lower clocked than P4. And somehow I thought S31 is 250 MHz 16-bit DDR PSRAM but it's 8-bit only. So if you have an uncompressed video stream over CSI, there's just nowhere to buffer it.
Sorry for the staple "duh AI article" but the product would be interesting, XDA-Devs is an established name, and then reading chapter titles like "Peripherals already change how it looks" is appaling. Like, ok, you pump up the text with AI, but at least proofread that sentences make sense? At least the titles?
Hey, article author here. No, it's not an AI article. I've been sick the past couple of days and overlooked that heading. What I meant by it was that peripheral support changes how the device positions itself compared to others on the market.
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.
Appreciate the honest feedback. I know such accusations are a tired trope - I never said that the article is AI written, but "pumped up". The article obviously contains a lot of grounded insight, but it instinctively felt a bit Claudish - not only attention grabbing section titles (xy is the biggest downfall), but the A-B structured subtitles (which, I see, is a thing at XDA). It's about the style - I grew up with a lot of classical hardware reporting from the 2000s, Tom's, HardOCP or more mainstream classical Gizmodo or Engadget - and skimming through the link urged me enough to blurp the above, for how I miss the stern, technical, but still fun and gonzo type of reporting nowadays only found in some personal blogs.
That why I don't read the news part of xda-developers. Their staff seem to make a lot of basic technical errors despite what xda-developers is known for.
(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.)
I would never touch anything from there. I do not get how people just flash random binaries to their phones without verifying anything. It is basically asking for malware.
I have esp32’s in every room for tracking down The Who in home automation via home assistant and Bermuda. I soldered some headers for the first time and now I’m making custom pcb boards. I added a fog machine for my halloweeen decorations and I’m just having fun. I could see how a much powerful esp32 could eliminate the dozen have and allow to switch between the outlet and battery.
Interesting. I want to start on similar project for health tracking. i.e Let ESP32 device with camera look at whole data what we are eating, walk and exercise and provide feedback.
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.
The range of difference in capabilities of different boards branded ESP32 is getting larger. Makes it tricky to figure out when someone says ‘you can run this on an ESP32’ what level of hardware investment is required.
They're all just single board computers, generally low-powered (literally and in the sense of capability, particularly memory)
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.
BTW, I was just researching this last week (the christmas display) and ESP32 has a matter compatible chip now... so you an control all this from Apple Home and the other Smart Home platforms.
Absolutely mind blowing. What a fun time to do side projects.
Originally it was the more capable successor to ESP8266, the super cheap chip containing a high speed core with wifi and an IP stack. At one point it powered a huge chunk of all smart devices on the market. Then the original ESP32 was introduced as the successor, with BLE and two cores which were even faster. That made it a very capable chip for tasks demanding compute. After the original ESP32 they decided to add variety and make a whole "ESP32 family" and yes there's quite a lot of variety these days. Even the ISA and cores changed.
It's a family of microcontrollers by Espressif. A microcontroller (MCU) is a type of integrated circuit (IC: physical appearance: Black rectangle of epoxy with exposed metal tabs). It has, in the same IC, a CPU, RAM, non-volatile FLASH memory, and a collection of peripherals which vary depending on the MCU. These usually include I/O protocols, ADCs, DACs, DMA controllers, math processors etc.
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.
The closest direct competitor is Bouffalo Lab's BL6xx chips, which do bluetooth and wifi and have an open SDK. Their documentation is very poor unfortunately (at least in English).
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).
That’s crazy to me: they already have to go through certification for the 2.4GHz stuff, why not include a lower wifi standard in there (for the 2.4GHz band)…
Yeah, if you look at a flagship nRF52840 board like the Xiao Seed, it ships with an integrated lithium charge controller, and just 5 μA power draw in deep sleep. If you are building any small battery-operated device, it's a no-brainer
I had to choose between an ESP-based and nRF-based MCU for my MeshCore node, the power consumption between the two made it obvious the nRF one was the way to go for a solar-powered repeater.
I think their point was more: is an ESP32 more like a arduino (or any other MCU) running bare metal or some thine RTOS or more like a raspberry pi which is more like a mini computer running a full fledged Linux. And I guess the answer it kind of always sat in between a little bit and now the family kind of spreads out across this whole spectrum.
> is an ESP32 more like a arduino (or any other MCU) running bare metal or some thine RTOS or more like a raspberry pi which is more like a mini computer running a full fledged Linux
Arduino have muddied this water now, too, as some newer ones come with a full fledged Qualcomm SOC, multiple GB of RAM, and power consumption which requires quite a beefy heatsink.
To date ESP32s have been best thought of as arduino-like things, albeit with some fancy hardware available like WiFi and Bluetooth stacks. But very much microcontroller boards where you compile firmware and push it to the board over USB.
You can actually do an awful lot of stuff with an ESP32, which often comes as a surprise to people who think you need a full Linux system just to turn a light on and off. For example Goodwe solar inverters/controllers are controlled by ESP32s and do a great job while Enphase controllers use Linux SBCs and are flaky, bug-riddled garbage.
I’d say as well, that a huge difference is a microcontroller has direct access memory (I.e. without translation), and a bigger computers CPU/SoC has an MMU (memory management unit) that does address translation. This is a key hardware difference for isolation of multiple processes, which you don’t typically have in a microcontroller (you _could_ have an MPU to give you some partitioning, but that’s further down the road).
At its core those all ESP32 are microcontrollers with RISC-V cores[0] and integrated wifi. There's a plethora of peripheral configurations, hence all those ESP32-* variations. This one even has Gbit ethernet and audio, bit still, at it's core (hah), RISC-V with only a few hundred MHz and 512kB RAM. So the peripherals are now similar to a Raspberry Pi, but not the CPU part itself.
The most common ESP32 boards now are still the Xtensa ones. Not all of the variants have WiFi. Some only have one core. A lot more variants than many would expect.
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.
It's worth noting that just because it says ESP32, doesn't mean it has WiFi (see the P4), and yeah not just RISC-V but also xtensa. I think it's more synonymous with "has a very shitty ADC" imo.
Does it matter whether the Ethernet interface on an ESP32 is 100 or 1000Mbps? Would it even matter if it was 10Mbps? What could you possibly do with an ESP32 that would require gigabit Ethernet? It seems like advertising the fact that there's a four-line highway running to your fishing shack.
I have an ESP32 here, it can do wifi, but only like 2 requests per second or so, with 50kB of data (I didn't measure it, but that's approximately what it can do).
I think they mean close to a pi in the sense it can run linux and has a better port selection, presumably they're comparing to an original pi or early model (ie pi 3). Also as others have pointed out Pi's have largely followed inflation, they just have more premium options nowadays
Too bad Linux has removed Execute-in-place (XIP) support for RISC-V since 7.1. It allows to run the kernel (and applications) from NOR flash directly, without copying it into RAM first. Somebody should reintroduce it.
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.
IMO Linux is gradually becoming a poor fit for niche use cases and extremely constrained devices. It makes sense, as they are trying to trim less used parts of the code that add maintenance overhead (especially areas without any volunteers to maintain them). And RTOSes are gradually replacing Linux on MCUs. I don’t know what’s best to replace it if you want a full OS, probably NetBSD?
On the topic of general purpose OSes for the ESP32 a project I've been a big fan of is SolarOS, which provides Python and Lua runtimes for user application development and a rapidly expanding API and list of built-in applications. I use it on a LilyGO T-Deck to turn it into something similar to a classic PDA with a python program that reads battery status from various devices I have running on ANT BMS units, far quicker than the utter garbage first-party ANT mobile app.
In the abstract I don't care. Without a set of project requirements for an embedded project this is just a soup of features. What is more impressive is the wild diversity of options they offer. Further making serious fun of anybody who gets lost in trying to maintain a MCU vs SBC processor dichotomy. Focus on the application. I think the difference is in how people conceptualize general purpose computing (desktop) and the thing I want on my wrist or on my copter or in my machinery and so on. It isn't in MCU vs SBC etc.
I don't know what's the final retail/bulk price of S31 and its modules will be, but S3 module with 16 MB NOR Flash and 8 MB PSRAM costs $3.5 for 500+ pcs, and the final PCB BOM cost is $4 or so.
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.
I’ve been developing a guitar pedal firmware in an ESP32-P4, and the flash image size is still under 1 MB and the PSRAM sits unused. It has not only a bunch of sound filters, control code for ADC, DAC a couple of USB devices, SDIO and LittleFS, but also a full-blown serial terminal TUI to control all sorts of details and to monitor performance. Said performance is good, but what blows me away is that there’s no jitter in the number that measures the number of cycles the processor executes while processing a sound frame, i.e. no preemption by the kernel to go and take care of its business.
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.
The benefit of running Linux on a what used to be an MCU is that you're getting the best network stack, Bluetooth/Wi-Fi stack, one of the best device drivers, stock and very well tested software, etc.
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.
Nobody is going to build an IoT device with this MCU running Linux. It's only able to access 64 MB of RAM from its slow cores. 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. Easier to just get a cheap ARM SoC that can probably run Android.
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.
Full operating system with all the compatibility and device drivers. Ease of development: you program on Linux, testing on desktop Linux, and then run on a small Linux. Need additional software? Just compile and use it, without porting or adaptation/integration. I've described everything above, don't know what could I add.
ESP32-S31 is no longer an MCU anymore if it has an MMU I guess. It's a full-blown "computer chip".
> There’s no way a multi-user OS such as Linux can be as efficient as a firmware blob that does one thing
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.
I love seeing a new ESP32, but I don't quite understand how it can run Linux? Like, what makes an ESP32 or any microcontroller efficient and useful is having total control. Managing memory, spending few resources to achieve a lot, basically, and I think turning it around doesn't make sense.
100 comments
[ 0.31 ms ] story [ 37.6 ms ] threadI'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.
(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.
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.
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.
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's answer: yes
So I wouldn’t claim this is a hard and fast rule. Lots of mcu lines have added mmus on some variants.
> Espressif put a real MMU in the ESP32-S31
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.
Isn't it like $2 vs $6?
:)
Most embedded stuff doesn't need that much power.
That is how we end up with Electron.
I think trying to be everything devalues the original idea.
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.
https://github.com/nilseuropa/solar_os
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.
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?
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.
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.
- 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.
Tried running yolo pose on bare S3, and the results were underwhelming.
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