Enable OPI PSRAM and 16MB QIO80MHz of FLASH

I have a project perfectly working on arduino IDE. To put it working, I had to set this flags on tools:

  • FlashMode: QIO80MHZ
  • FlashSize: 16MB
  • PSRAM: “OPI PSRAM”

I am using ESP32-S3-WROOM-1. I know it has the PSRAM, because it works very well on Arduino-IDE!

I am trying to put it to work on platformio, with arduino framework. I saw some topics on this forum related with my issue, but I was not able to solve my problem following those instructions! Can anyone help me, please?

For flash mode and frequency see

https://docs.platformio.org/en/latest/platforms/espressif32.html#flash-frequency

for PSRAM / Flash selection see enabling macro here and

I.e., set

board_build.arduino.memory_type = ...

in accordance to the right folder used here.

Note how the boards.txt says

esp32s3.menu.PSRAM.opi=OPI PSRAM
esp32s3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM
esp32s3.menu.PSRAM.opi.build.psram_type=opi
..
esp32s3.menu.FlashMode.qio=QIO 80MHz
esp32s3.menu.FlashMode.qio.build.flash_mode=dio
esp32s3.menu.FlashMode.qio.build.boot=qio
esp32s3.menu.FlashMode.qio.build.boot_freq=80m
esp32s3.menu.FlashMode.qio.build.flash_freq=80m
..
esp32s3.build.memory_type={build.boot}_{build.psram_type}

So with that info you’d have to try

[env:esp32s3dev]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
build_flags = -DBOARD_HAS_PSRAM
board_build.arduino.memory_type = qio_opi
board_build.f_flash = 80000000L
board_build.flash_mode = qio
; 16MB
board_upload.flash_size = 16MB
1 Like

Hi @maxgerhardt, thank you for you time and help!

I don’t understand what I have to do here:

espressif/arduino-esp32/blob/0d84018d969309addacbcc3e3782c1fadc95fbc8/tools/platformio-build-esp32s3.py#L311-L311

Do I need to put this part of code at some point?

I think that by not doing this, I am having an error in this line of .ini:

board_build.arduino.memory_type = qio_opi

If I put the line above on my .ino file, the compiler give me an error:

fatal error: sdkconfig.h: No such file or directory

Could you help to understand what am I doing wrong? Thanks!!!

Are you sure you’re using the latest platform version?

does exist.

Open a CLIpio pkg update -g -p espressif32 and retry.

1 Like

@maxgerhardt , Can you please, tell me were do you live? I’m going to there to kiss you on the lips!! Hahahahahahah, I am kidding!! Than you so mutch for your help, My brother. Every thing is working well right now!!! Thank you thank you thank you