Framework = arduino, espidf ESP32-S3 xTaskCreate() crashes

Making progress with framework = arduino, espidf using examples but finding xTaskCreate() throws a stack overflow. This works with just an ESP32 dev board such as the TTGO T-Display but does not work with ESP32-S3. (minimal code example below)

**Are there some other settings I am missing here to get this working with ESP32-S3 (which is my go-to board for all new development)?

error messages: (also some monitor weirdness that looks like mis-matched baud rate but they are definitely matched)

␛[0;32mI (0) cpu_start: Starting scheduler on APP CPU.␛[0m
␛[0;32mI (1225) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations␛[0m***ERROR*** A stack overflow in task arduino_task has been detected.

Backtrace: 0x403764ed:0x3fce9d40 0x4037db79:0x3fce9d60 0x40381469:0x3fce9d80 0x4037fc6b:0x3fce9e00 0x4037dc30:0x3fce9e20 0x4037dc26:0xffffffff |<-CORRUPTED


platform = espressif32
framework = arduino, espidf

monitor_speed = 115200
board = esp32-s3-devkitc-1
;board_build.arduino.memory_type = dio_opi ; set to octal in SDKconfig
board_build.partitions = default_partitions.csv

build_flags = 

Key SPIRAM settings in sdkconfig.esp32-s3-devkitc-1


# SPI RAM config

minimal code example:

#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "sdkconfig.h"
#include <Arduino.h>

void arduinoTask(void *pvParameter)
    Serial.println("Hello World");

    while(1) {

extern "C" void app_main()
    // initialize arduino library before we start the tasks

    xTaskCreate(&arduinoTask, "arduino_task", configMINIMAL_STACK_SIZE, NULL, 5, NULL);


# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x140000,
app1,     app,  ota_1,   0x150000,0x140000,
spiffs,   data, spiffs,  0x290000,0x170000,
coredump, data, coredump,,        64K

Okay. So give it more stack if it says stack overflow.

Hello Max,
Well yes, of course… silly me to assume that examples should actually work with the chips listed as supported… especially with such a minimal program, I was surprised to see a stack overflow 8^(

I believe the configMINIMAL_STACK_SIZE is just simply too small for the ESP32-S3.

I triangulated on a value that works…an additional 380 words of stack.

xTaskCreate(&arduinoTask, "arduino_task", configMINIMAL_STACK_SIZE + 380, NULL, 5, NULL);

Thanks Max for helping me with the “obvious”.

I submitted an issue to as configMINIMAL_STACK_SIZE appears inadequate for ESP32-S3 in examples #1190