ESP32 SOLO on Arduino Framework Setup

Hi,
Looking for some help getting a project migrated from esp32 to esp32 solo. The only difference (of which I’m aware) is running in single core per the menuconfig utility. But, I’m using the ardunio framework. Setting the build flags in platform.ini still produced a dual core binary. I get this error after loading the binary,
E (459) cpu_start: Running on single core chip, but application is built with dual core support.
E (459) cpu_start: Please enable CONFIG_FREERTOS_UNICORE option in menuconfig.

Here’s my platform.ini contents,
[env:chillout32]
platform = GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO
framework = arduino
board = esp32dev
build_flags =
-g
-DCONFIG_FREERTOS_UNICORE=1
-DENABLE_INVARIANTS
-DDEBUG_ORB
-DDEBUG_LOG
-DDEBUG=1
-DAUTO_CIPHERTEXT
-DSPIFFS_CACHE_WR
-DDEBUG_ESP_PORT=Serial
-DDEBUG_ESP_SSL
-DCONSOLE=1
-DBUZZOFF=1
monitor_speed = 115200

How can I configure the Arduino framework to run single core? If I need to rebuild the Arduino framework, can someone point me to the repo and readme? TY!

Strictly said, this is an issue within the ESP32 Arduino core, not PlatformIO. Refer ESP32-Solo-1 with Arduino IDE · Issue #3324 · espressif/arduino-esp32 · GitHub.

The issue presents copying over new pre-compiled versions of the libraries as a solution, as can be seen in GitHub - lbernstone/arduino-esp32-solo: Compiled libraries for ESP32-SOLO. From what you said in the other topic, you would need to copy these to your C:\Users\Doug\.platformio\packages\framework-arduinoespressif32\ folder.

Ah, and since the repository references Arduino core version 1.0.4 you would also need to switch to the platform version which has that core version, aka

platform = espressif32@1.11.0

(refer Releases · platformio/platform-espressif32 · GitHub). After this modification and one compiliation there should be a new framework-arduinoespressif32-xyz folder in which you need to overwrite these file.

Thank you for your response. The libraries from libernstone are binary. Is the ardunio framework in platformio built from, GitHub - espressif/arduino-esp32: Arduino core for the ESP32?
So, If I pull the espressif code, edit the configsdk (via menuconfig), and build in the ardunio ide, would I end up with an updated platformio framework? So instead of replacing four libraries and one header, I would be able to rebuild the arduino esp32 framework with any other config changes I might need to make? Is there a description of how to do that somewhere?

It’s an exact copy of it.

I’m not a Arduino-ESP32 core developer so maybe these people can help your more in regards of rebuilding the SDK libraries. The only good reference I could find was Compiling core at 80Mhz · Issue #1142 · espressif/arduino-esp32 · GitHub.

Once you have updated binaries for the latest version you can also integrate them in PlatformIO by using the platform_packages (docs) directive. For that just fork GitHub - espressif/arduino-esp32: Arduino core for the ESP32, push your new library / headers in there and use your new git repository to replace the framework-arduinoespressif32 package.

Due to that complexity I would however first suggest to try the last suppoert version from lbernstone, as seen above.

There might also be another way: You can use ESP-IDF as a base and Arduino-ESP32 as a component. That should give you a modifyable sdkconfig.h for your Unicore changes. See the official example at platform-espressif32/examples/espidf-arduino-blink at develop · platformio/platform-espressif32 · GitHub.

1 Like

Just to close this thread. With help from @maxgerhardt and the libernstone library, I have my project building for esp solo chips. I still need to figure out how to rebuild the arduino framework. But for now, I’m moving forward again. Thank you!

Max has a lot of great suggestions in this post. Can you show me which way you chose to do it and your platformio.ini setup?

Thank you.
Michael

This is my example.

[env:esp32dev]
board = esp32dev
platform = espressif32@1.11.0
framework = arduino, espidf
build_flags =
-D CONFIG_FREERTOS_UNICORE=YES

It builds successfully. But, it does not work. I get this message. “Please enable CONFIG_FREERTOS_UNICORE option in menuconfig.”

You have to rebuild the arduino libraries with the correct menuconfig setting for running on a single core ESP. There are posts here to help with links to already-built libraries that work. If you end up rebuilding the arduino libraries, you also must copy the correct files into the correct platformio folders and you must use the correct version of the esp idf and correct version of the arduino source (there are posts here for that too). PlatformIO keeps track of all your installed build tools, so it can be complicated to setup an integrated workflow that also builds/reinstalls the arduino libs. I ended up using only the ESP IDF for my project and now have an integrated workflow for build/deploy/test.

1 Like

Thank you for your quick response. It is wonderful that Max has put a lot of links here to help us. Now I understand all the work required to make it work for a new part.

I am able to use ESP IDF to build and flash the ESP32 Solo 1. I think I have the basic understanding to try it. I also can understand the approach you took. It is a great opportunity for me to learn how things work behind the PIO project.

Thank you!!!
Michael