ESP32 compilation error triggered by recommended PSRAM type

I use SparkFun Thing Plus - ESP32-S3 board with next SW environment:
Arduino IDE: 2.3.4
Installed boards support:
Arduino ESP32 Boards v2.0.18 - arduino.5 by Arduino
esp32 v3.2.0-RC1 by Espressif

If I choose PSRAM: QSPI PSRAM option according to Hookup guide.
During compilation of RGB_LED.ino example I get next compilation error:

In file included from …/Arduino15/packages/esp32/tools/esp-x32/2411/xtensa-esp-elf/include/sys/reent.h:34,
from …\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-bcb3c32d-v1\esp32s3/include/newlib/platform_include/sys/reent.h:13,
from …/Arduino15/packages/esp32/tools/esp-x32/2411/xtensa-esp-elf/include/stdio.h:60,
from…\Arduino15\packages\esp32\hardware\esp32\3.2.0-RC1\cores\esp32/Arduino.h:27,
from …\AppData\Local\arduino\sketches\F2D0A6956F0C0D1ADC2714C276F620B6\sketch\RGB_LED.ino.cpp:1:
…\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-bcb3c32d-v1\esp32s3/include/newlib/platform_include/sys/lock.h:9:10: fatal error: sdkconfig.h: No such file or directory
9 | #include “sdkconfig.h”
| ^~~~~~~~~~~~~
compilation terminated

Choosing option “OPI PSRAM” for PSRAM prevents the error.
This problem may be reproduced with last stable release of esp32 library by Expressif: 3.1.3

After compiling examples with PSRAM option “OPI PSRAM” download is successful but applications do not run.

The monitor output, read by external terminal is

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x18 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4038531a
SPIWP:0xee
mode:DOUT, clock div:1
load:0x3fce2810,len:0x1074
load:0x403c8700,len:0x4
load:0x403c8704,len:0xac0
load:0x403cb700,len:0x2e58
entry 0x403c8890

It might be worth seeing if an issue for this has already been filed and if not go ahead and file one GitHub · Where software is built

Thank you for your response, @TS-Russell.

The issue you mentioned was not described in the ESP-IDF repository you suggested, so I have opened a new one. However, I doubt it will receive much attention since the problem seems to be specific to the Arduino IDE environment rather than ESP-IDF.

In the meantime, I have the following questions:

  1. Based on the UART log and the absence of LED activity, it appears that the RGB_LED application is loaded but not running. Could this be caused by using OPI PSRAM instead of the recommended QSPI PSRAM?
  2. Do you know which versions of the Arduino IDE and Espressif ESP32 board library were used when the SparkFun Thing Plus - ESP32-S3 Hookup Guide was written?
  3. If your company has an Arduino IDE setup that successfully compiles and runs the SparkFun_Thing_Plus_ESP32-S3 repository examples, could you please provide the version of the IDE and board support package used, along with the chosen configuration?

Thank you in advance.

Update:

While checking different versions of Espressif’s ESP32 board support, I discovered that the problem can be reproduced starting from version 3.1.0-RC1 and onward. It does not occur in the previous version, 3.0.7.

It may be worth verifying this, and if my findings are confirmed, updating the Thing Plus - ESP32-S3 Hookup Guide accordingly.

Alrighty; thanks for the heads-up

I’ll forward this along to the relevant parties :slight_smile:

Please add to you message that reference to ESP32-S3 specific documentation at Hookup Guide leads to the page that does not exist now.

1 Like

Hi @TS-Russell ,
Do we have any news about ability to set PSRAM to value QSPI PSRAM for ESP32-S3 Thing Plus board?

Look like that wrong PSRAM settings cause board to restart constantly. See dedicated discussion.

For now my recommendation would be to not use the release candidate and instead go with the stable release

Can you please specify which stable release of the ESP32 board support you are referring to?

For the recent stable releases—3.1.0, 3.1.1, 3.1.2, and 3.1.3—compilation fails when PSRAM: QSPI PSRAM is selected. Please see the attached compilation logs for versions 3.1.0 and 3.1.3.

However, in version 3.0.7, the compilation succeeds, but running the following simple sketch results in no output on the Serial Monitor and causes the board to reset every few seconds. The same boards function correctly when using the IDF-ESP v5.4 IDE
esp32_3.1.0_log.txt (6.9 KB)
esp32_3.1.3_log.txt (6.8 KB)

Here is my example sketch:

void setup() {
Serial.begin(9600);
while (!Serial); // Corrected the while condition
Serial.print(“Setup”);
}

void loop() {
Serial.print(“Loop”);
}

In all cases I specify ESP32S3 Dev Module Octal (WROOM2) as target board.

Not that i have the answer, but i have tried to compile the RGB-LED.ino on with the ESP32S3 Dev Module Octal (WROOM2) and it compiles without an errors.
I have ESP32 version 3.1.3 and there is also a variant now “Sparkfun ESP32-S3 Thing Plus”. That compiles without changes and without errors as well.

The sdkconfig.h file is automatically generated and contains information about the SOC capabilities and setting.

I am using the same IDF library version as in one of your logs files : idf-release_v5.3-489d7a2b-v1.
Could it be that it is damaged? Maybe try a complete reinstall of the ESP32 library, because changing the library version does NOT change everything.

  • Close down Arduino-IDE
  • Remove the ESP32 board library: the folder
    C:\Users\baruch\AppData\Local\Arduino15\packages\esp32
  • Restart Arduino-IDE and re-install ESP32 version 3.1.3. Now all will be new.

see what happens

Hi @paulvha,

You wrote:

I have ESP32 version 3.1.3 and there is also a variant now “Sparkfun ESP32-S3 Thing Plus”

Just to clarify, do you mean the ESP32 board support package by Espressif, version 3.1.3?

On the other hand, “Sparkfun ESP32-S3 Thing Plus” is the name of a board. So, I am not sure I correctly understood your sentence.

Is there board support specifically for the “Sparkfun ESP32-S3 Thing Plus”?

yes: the Espressif ESP32 version 3.1.3

As a variant where you had selected the “ESP32S3 Dv module Octal(WROOM2)”", you can also select instead the “Sparkfun ESP32-S3 Thing plus”. Seems it was added in the ESP32 Espressif .

Have you tried the steps to re-install ?

Dear @paulvha,

You had made my week (ro couple of them)! :folded_hands: :grinning_face:
Re-install of board support library did not helped, but defining correct board certainly did!

Dear @TS-Russell,
If would help tremendously if you will update your documentation

FixSparkFunManual

1 Like

Good to hear.

Does it solve your other issue (What could be causing the constant restarts when using the Arduino IDE?) as well ?

Yes,
Restart, most probably, has been cause by wrong PSRAM type.
I had updated the thread.

1 Like