ESP32-S3-DevKitC-1-N32R8V configuration assistance

I purchased an ESP32-S3-DevKitC-1-N32R8V which has “32MB OT Flash” and “8MB OT PSRAM”, but I’ve been unable to find a matching board configuration.

The only S3 listing I could find was the “Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM)” which has a quarter of the Flash and no PSRAM.

Anyone with the knowledge-extraordinaire to walk me through the overrides (or a different board) needed to fully utilize the device? Also, I noticed that it calls the default_8MB.csv partition table, but that there is no 32MB partition table.

Thanks in advance!

I have the same exact problem. Using [Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM) got me a core dump. Following. Thanks

Same here. I could never get the N32R8 board to work properly with PlatformIO. I don’t understand the partitioning on the ESP32-S3 well enough. While searching for a solution I did come across this board configuration for the N16R8:

I didn’t have a 16MB version so I never tested it.

I ended up purchasing the N8R8 board instead and it works fine with the default esp32-s3-devkitc-1 board when you add these build flags to your platformio.ini file to get the PSRAM to work:

build_flags =
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-DARDUINO_ESP32S3_DEV
-DCORE_DEBUG_LEVEL=5
-DCONFIG_SPIRAM_USE

If someone out there would help get that 32MB to work with PlatformIO that would tremendous!

1 Like

Thank you for that information!

I am away at a conference, but will test this when I get home.

At this point, I would be fine with the partitioning shorting me the 16MB if it works with the NR32R8V. I just would like to get SOME use out of the boards I’ve already purchased.

If anyone out there has any ideas, I/we would be greatful.

Hi @delugeia and @djrosu,

I was able to get my ESP32-S3-DevKitC-1-N32R8V working by using the built-in board slug esp32-s3-devkitc-1 and then putting the following in my platformio.ini file:

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
board_upload.flash_size = 16MB
board_build.partitions = default_16MB.csv
build_flags = 
    -DBOARD_HAS_PSRAM 
    -mfix-esp32-psram-cache-issue
board_build.arduino.memory_type = opi_opi

I think the most crucial part that I was initially missing was that the memory type has to be set to opi_opi. In order to find this out, I had to reference Espressif’s chart here, and somebody else directed me to this folder in the arduino-esp32 core on GitHub that lists all of the possible options for the board_build.arduino.memory_type setting in platformio.ini. Hope this helps!

3 Likes

This also can make the N16R8work,maybe it will help about n32r8.
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
; FLASH Partition table designated as 16MB
board_build.arduino.partitions = default_16MB.csv
; Specify the operating mode of FLASH and PSRAM
board_build.arduino.memory_type = qio_opi
; Predefined macro, enabling PSRAM
build_flags = -DBOARD_HAS_PSRAM
; Specify a FLASH capacity of 16MB
board_upload.flash_size = 16MB

These settings worked for me:

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
board_upload.flash_size = 8MB
board_build.partitions = default_8MB.csv
build_flags = 
    -DBOARD_HAS_PSRAM 
    -DARDUINO_USB_CDC_ON_BOOT=1
    -mfix-esp32-psram-cache-issue
board_build.arduino.memory_type = opi_opi

opi_opi fixed reboot loop, but the board was not communicating over serial until I added -DARDUINO_USB_CDC_ON_BOOT=1

1 Like

Thank you so much for this solution! I managed to get my esp32s3devkitc n32r8v finally working.

Thanks! This platformio.ini works for me too with my ESP32-S3-WROOM-2-N32R8V.

Specifying

Is applying an errata to a different chip, the original ESP32. It does not apply to S3 and just throws away performance on the S3 with unnecessary coddling of PSRAM.

Consider removing that from your configs.

Have anyone successfully have got ESP32-S3-DevKitC-1-N32R8V working with platformio?

On the blank project, tried various configurations, but 1) successful build outputs 4mb of flash 2) when running simple hello world program, it gets into crash loop

ELF file SHA256: 555bcf1296a31579

E (141) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
Rebooting…
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40377404
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fce3808,len:0x41c
load:0x403c9700,len:0x9a8
load:0x403cc700,len:0x28ac
entry 0x403c98b8
E (110) spi_flash: Detected size(512k) smaller than the size in the binary image header(4096k). Probe failed.

assert failed: do_core_init startup.c:328 (flash_ret == ESP_OK)

Please show the content of your platformio.ini.

Hello Boris,

Appreciate your reply!

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino

board_build.flash_size = 32MB
board_build.f_flash = 80000000L
board_build.flash_freq = 80m

board_build.flash_mode = opi
board_build.arduino.memory_type = opi_opi
board_build.partitions = partitions.csv

board_upload.maximum_ram_size = 8388608

build_flags = 
    -DBOARD_HAS_PSRAM 
    -DARDUINO_USB_CDC_ON_BOOT=1
    -mfix-esp32-psram-cache-issue

upload_speed = 460800
monitor_speed = 9600

upload_port = /dev/cu.usbmodem14601
monitor_port = /dev/cu.usbmodem14601

partitions.csv

# Name,   Type, SubType, Offset,   Size,     Flags
nvs,      data, nvs,     0x9000,   0x6000,
otadata,  data, ota,     0xf000,   0x2000,
app0,     app,  ota_0,   0x20000,  0xE00000,
app1,     app,  ota_1,   0xE20000, 0xE00000,
spiffs,   data, spiffs,  0x1C20000,0x200000,
coredump, data, coredump,0x1E20000,0x10000,

And the main.cpp

#include <Arduino.h>

void setup() {
  Serial.begin(9600);
  delay(1000);
  Serial.println("ESP32-S3 Startup");
}

void loop() {
  Serial.println("Loop running");
  delay(1000);
}

The build is successful and with above configuration the esp32 memory and flash size is detected properly:

Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.2% (used 19176 bytes from 8388608 bytes)
Flash: [          ]   1.8% (used 267085 bytes from 14680064 bytes)

Yet, upon successful upload, the device enters into the infinite loop of crash:

         Connected!
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cd9ce
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fce3808,len:0x41c
load:0x403c9700,len:0x9a8
load:0x403cc700,len:0x28d0
entry 0x403c98b8

Please try the following platformio.ini

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino

board_build.arduino.memory_type = opi_opi
board_build.flash_mode = opi
board_build.psram_type = opi
board_upload.flash_size = 32MB
board_upload.maximum_size= 33554432

build_flags = 
  -DBOARD_HAS_PSRAM
  -DARDUINO_USB_CDC_ON_BOOT=1

upload_speed = 460800
monitor_speed = 9600

upload_port = /dev/cu.usbmodem14601
monitor_port = /dev/cu.usbmodem14601

Note:
The line “-DARDUINO_USB_CDC_ON_BOOT=1” routes the output of the Serial object to the native USB port instead of the UART port! See ESP32-S3 native USB interface and Serial Monitor missing first messages - #10 by sivar2311

Your partition table defines 2 x 14 MB for the application and only 2 MB for the SPIFFS partition. Is that really your intention?
The size for the application seems far too large to me and too small for the SPIFFS.

There is a gap of 60 kb between OTA-Data and APP0!

1 Like

Boris, your modifications in platformio nailed it, Hello World boots up and launches successfully!

Also thank you for pointing out an issue with the partition table. I have not yet decided on the sizes, but your thoughts on SPIFFS with more space would be more useful sounds reasonable!

Thank you :pray:!