Close

Solving the single-core issue

A project log for Espoir

An open source, PoE+, ESP32 devboard with a mikroBUS socket.

marc-antoine-lalondeMarc-Antoine Lalonde 09/20/2022 at 14:340 Comments

A small slice of developer life, where I learned about delays and date codes.

---

Between the moment Espoir started as an idea, became a hobby project and ended up as a product, it went through several microcontrollers: the STM32H7, the ATSAME, the ESP32-PICO, and finally the ESP32-MINI-1, which is what it uses now.

The ESP32-MINI-1 has a PCB antenna, it is shielded, and it is also the cheapest ESP32 (possibly the cheapest MCU) that comes with a MAC interface for Ethernet. However, when I switched to that model last year, it had one not-so-small flaw: it was a single-core MCU. Back then I though it would not matter too much. The ESP32-MINI-1 already runs at 240 MHz with 4 MB of flash and 520 kB of RAM, it's a beast in its own right.

The thing I had not considered was library compatibility. I was new to the ESP32 world, and since ESP-IDF, the basic development framework for ESP32, has a single-core option, then everything is good, right?

Right?

Well, no. The reality is that most ESP32 MCUs are dual-core, so the developers of Arduino-ESP32, made it dual-core too. And many really cool frameworks like Tasmota and ESPHome, are built on top of Arduino-ESP32. And what happens when you try to run a dual-core library on a single-core MCU? Boot-looping. An endless loop of disappointment.

Of course, there are ways to go around this issue. You can compile Arduino-ESP32 for single-core yourself, then build other libraries on top of that, and so on. But, that means you need to maintain the builds, the documentation, and continuously monitor for new releases.

It's not that hard, but it takes time. A lot of time one would rather spend doing something else. The extra steps for everything also make the devboard more intimidating, and the users also depend on you continuing to maintain the custom builds.

And there comes Espressif's PCN-2021-021. In December 2021, Espressif changed the ESP32-MINI-1 from single-core to dual-core. Just like that, things seemed they would turn out okay. In April 2022, I ordered a new small batch of these MCUs.

It turns out, I took a bit of time for these upgraded versions to come to the market. I quickly realized I had just bought more single-core microcontrollers. Disappointed, I left that on the backburner and added "maintain my own builds" to the to-do list.

In August 2022, seeing that things would get pretty involved, I contacted Digi-Key and Mouser and asked them if, now 8 months after the new dual-core release, I could request parts with more recent date codes. To my great pleasure, I got a positive response from Digi-Key, so I ordered two MCUs to test, and was very happy to confirm that I had finally got my hands on a dual-core ESP32-MINI-1!

I then ordered enough of these new parts to get the first production batch of Espoir built with only dual core MCUs. I'm very happy with that development, since it means I have a lot less work to do, and everyone enjoys more simplicity and better long-term support for whatever library they choose to use.

Discussions