Platformio.ini file for ESP32-S3-WROOM-1-N4CT-ND

I’m struggling to configure my Platform IO Arduino project which uses an ESP32-S3-WROOM-1-N4CT-ND.
This module does not have PSRAM and has only 4MB of flash.

Please help me to create a .json file for this particular model.

Each time I uploaded via PIO (using the default config esp32-s3-devkitc-1) the module enters a bootloop.
I have tried other configurations, for example for the lolin_s3_mini, but get the "unknown board error.

Upload form the Arduino IDE with the following settings works fine:

Here is more info on the module:


Table from here.

I ordered the module here.

Here is what I see during the boot loop:

21:31:59.920 -> ESP-ROM:esp32s3-20210327
21:31:59.920 -> Build:Mar 27 2021
21:31:59.920 -> rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
21:31:59.964 -> Saved PC:0x4037786c
21:31:59.964 -> SPIWP:0xee
21:31:59.964 -> mode:DIO, clock div:1
21:31:59.964 -> load:0x3fce3808,len:0x44c
21:31:59.964 -> load:0x403c9700,len:0xbec
21:31:59.964 -> load:0x403cc700,len:0x2920
21:31:59.964 -> entry 0x403c98d8
21:32:00.038 -> E (99) spi_flash: Detected size(4096k) smaller than the size in the binary image header(8192k). Probe failed.
21:32:00.038 -> 
21:32:00.038 -> assert failed: do_core_init startup.c:326 (flash_ret == ESP_OK)
21:32:00.038 -> 
21:32:00.038 -> 
21:32:00.038 -> Backtrace: 0x40377c5e:0x3fceb180 0x4037ac89:0x3fceb1a0 0x4038087d:0x3fceb1c0 0x42012cc6:0x3fceb2f0 0x403775cd:0x3fceb320 0x403cd6db:0x3fceb350 0x403cd99a:0x3fceb380 0x403c992d:0x3fceb4b0 0x40045c01:0x3fceb570 |<-CORRUPTED
21:32:00.070 -> 
21:32:00.070 -> 
21:32:00.070 -> 
21:32:00.070 -> 
21:32:00.070 -> ELF file SHA256: 6178ab7e4f51bc83
21:32:00.070 -> 
21:32:00.070 -> E (127) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
21:32:00.070 -> Rebooting...

I got it working like this:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

; Used ESP32 S3 module: ESP32-S3-WROOM-1-N4CT-ND

[env:lolin_s3]
platform = espressif32
board = lolin_s3
board_build.mcu = esp32s3
framework = arduino
monitor_speed = 921600
;upload_protocol = jlink
debug_tool = esp-builtin
; esp-builtin or jlink
debug_speed = 40000
upload_port = COM5

lib_deps =
	

; For this to work the file lolin_s3.json was modified.
; The modified version of the file is included in the folder "boards" of this project.
; You need to replace the original lolin_s3.json file in the %HOMEPATH%\.platformio\platforms\espressif32\boards directory
; Rename the file from this project to lolin_s3.json

Modified lolin_s3.json file content:

{
  "build": {
    "arduino": {
      "ldscript": "esp32s3_out.ld",
      "memory_type": "qio_qspi"
    },
    "core": "esp32",
    "extra_flags": [
      "-DARDUINO_LOLIN_S3",
      "-DARDUINO_USB_MODE=1"
    ],
    "f_cpu": "240000000L",
    "f_flash": "80000000L",
    "flash_mode": "qio",
    "hwids": [
      [
        "0x303A",
        "0x1001"
      ]
    ],
    "mcu": "esp32s3",
    "variant": "lolin_s3_2"
  },
  "connectivity": [
    "wifi",
    "bluetooth"
  ],
  "debug": {
    "openocd_target": "esp32s3.cfg"
  },
  "frameworks": [
    "arduino",
    "espidf"
  ],
  "name": "lolin_s3_2",
  "upload": {
    "flash_size": "4MB",
    "maximum_ram_size": 327680,
    "maximum_size": 4194304,
    "wait_for_upload_port": true,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://www.lcsc.com/product-detail/WiFi-Modules_Espressif-Systems-ESP32-S3-WROOM-1-N4_C2913197.html",
  "vendor": "Espressif Systems"
}

1 Like