ESP32 S3 PlatformIO configuration?

Today i got JC4827W543R board, that has ESP32-S3-N4R8 microcontroller on it. But i can’t make it work. I wrote simple possible piece of code

main.cpp

#include <Arduino.h>

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.println("ESP32 Working!");
}

PlaformIO.ini

[env:esp32-s3-devkitc1-n4r8]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.21-2/platform-espressif32.zip
board = esp32-s3-devkitc1-n4r8
framework = arduino
board_build.partitions = default.csv
monitor_speed = 115200

But i get nothing in Serial Monitor. Also without adding this “board_build.partitions = default.csv” into platformio.ini file i could not even build this code. What am i doing wrong? What is the correct configuration for this board?

I don’t know this board. Can you take a look at the schematics how the USB-C port is connected to the ESP32-S3? Is it connected to an USB to Uart chip or to the usb pins of the esp32-s3?

I can use USB connection to flash it’s software via VS Code and PlatformIO, but I can’t monitor it. Does that helps? Also i think it’s connected directly to the USB pins on microcontroller, 18 & 19, if my memory is correct.

You need to set in your platformio.ini:

build_flags =
  -DARDUINO_USB_CDC_ON_BOOT=1

to route the output of the Serial object to USB instead of UART port.

Also note that the connection gets interrupted when the ESP32 reboot as ther is no external USB to Serial chip which keeps the connection during a reboot.

I have ab 5" Elecrow Crowpanel with exact a smilar ESP32 ESP32-S3-WROOM-1-N4R8
where I have troubles decoding JPEGs and tried your configuration, when I try compiling
I get

Building in release mode
Compiling .pio/build/esp32-s3-devkitc1-n4r8/lib10b/SPI/SPI.cpp.o
sh: 1: xtensa-esp32s3-elf-g++: not found
Compiling .pio/build/esp32-s3-devkitc1-n4r8/libc8d/FS/FS.cpp.o
*** [.pio/build/esp32-s3-devkitc1-n4r8/lib10b/SPI/SPI.cpp.o] Error 127
sh: 1: xtensa-esp32s3-elf-g++: not found
*** [.pio/build/esp32-s3-devkitc1-n4r8/libc8d/FS/FS.cpp.o] Error 127

does anyonw has ab idea?
Kind Regards

Maybe an OS / path thing.

  • Which OS do you use?
  • What’s the path to your .platformio directory?
  • Waht’s the path to your project directory?

OS Linux Mint
.platformio path my home
project path my home/Dokumente/Platformio/Projects/

Thank you for helping

Since I tried the platformio.ini from above none of my previous working sketches will compile

Get ERROR ** missing SConscript file ‘/home/mk/.platformio/packages/framework-arduinoespressif32@src-87ac2a9d947aea8f7d6ce292db8f4c47/tools/pioarduino-build.py
File “/home/mk/.platformio/platforms/espressif32/builder/frameworks/arduino.py”, line 973, in

What can I do?

  • Close VS Code
  • Delete ~/.platformio/packages
  • Delete ~/.platformio/platforms
  • Restart VS Code
  • Open your project
  • Wait until PlatformIO finished reinstalling all necessary platform and package files

Thank you very much. It works again

1 Like