Very good article!
Anecdote about this summary at the bottom: > This setup gives you the best of both worlds: ESP-IDF and FreeRTOS manage Wi-Fi, BLE, and system tasks on Core 0, while Core 1 runs your bare-metal Rust code at full speed with zero scheduler interference.
I am doing something somewhat like this, but with separate MCUs instead of separate cores. I flashed Esp-Hosted-MCU onto an ESP-32 (C3, but any including S3 will work). This is official firmware which turns the ESP into a "radio co-processor", so you can treat it like a SPI or UART Wi-Fi/BLE chip.
On another MCU (STM32), I run bare-metal firmware in rust which talks to the radio over SPI. Wi-Fi uses the ESP IDF, and BLE uses standard HCI commands.
> This is official firmware which turns the ESP into a "radio co-processor", so you can treat it like a SPI or UART Wi-Fi/BLE chip.
Kinda funny because the ESP8266 basically started off as a WiFi "co-processor" with AT commands sent over UART. People quickly discovered it had a good amount of power and you could run your entire application on the ESP8266 instead of using it as a co-processor. That led to an explosion in popularity for "makers" because the chip was so cheap and capable for projects at the time, and I think that led to the ESP32 becoming so widely known.
Interestingly, Espressif nowadays does something similar on the ESP32-P4 which is RiscV but doesn't have builtin Wifi/BT. So they tend to pair it with an ESP32-C6 which runs the WiFi stack and firmware that communicates with the P4 using SDIO. Not bare metal though, but similar dual-mcu setup for wifi/bt.
I didn’t know about hosted-MCU! I just started using the ESP-AT firmware for an ESP acting as a radio co-processor on a project at work - do you know how hosted-MCU differs?
I did glance at the readme and get the impression that hosted-MCU works for all compatible ESPs and seems more flexible and powerful, where ESP-AT is for select ESP chips and is more limited.
I don't, and haven't used ESP-AT. It sounds like AT may use a text-based protocol (Something that was big a while back?). Esp-Hosted uses Protobuf/RPC to access IDF commands, and HCI direct.