ESP32S3 - Serial Monitor println() non-display issue in VScode

MY BOARD: YD-ESP32-S3-N8R2 (a devkitc-1 variant)

MY SETUP: Mac M1, VScode, pIO, Arduino framework


I’m plugged in on the com port marked “USB” on the left of this board.

THE PROBLEM:

  • The LED flashes as per the code. If I put a blink into the loop also, it blinks as expected.
  • Nothing on the serial monitor shows despite the println commands.

MY INI FILE

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
upload_port = /dev/cu.usbmodem1101

;; SEE: https://community.platformio.org/t/solved-esp32-serial-monitor-not-working/2858/
monitor_rts = 0 
monitor_dtr = 0

build_type = debug

MY MAIN.CPP

#include <Arduino.h>

#define BAUD_RATE 115200
#define LED 45

void setup()
{
  Serial.begin(BAUD_RATE);

  pinMode(LED, OUTPUT); 
  /// flash LED
  for (int i=3;i>=0;i--){
    digitalWrite(LED, HIGH);
    delay(1000);
    digitalWrite(LED, LOW);
    delay(1000);
  }

  Serial.println("Hello!");
  delay(500);
}

void loop()
{
  Serial.println("LEMONS");
  delay(2000);
}

THE RESULT

 *  Executing task: platformio device monitor --port /dev/cu.usbmodem1101 

--- forcing DTR inactive
--- forcing RTS inactive
--- Terminal on /dev/cu.usbmodem1101 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420233d6
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4

(I then do an info-check)
--- Settings: /dev/cu.usbmodem1101  115200,8,N,1
--- RTS: inactive  DTR: inactive  BREAK: inactive
--- CTS: inactive  DSR: inactive  RI: inactive  CD: inactive
--- software flow control: inactive
--- hardware flow control: inactive
--- serial input encoding: UTF-8
--- serial output encoding: UTF-8
--- EOL: CRLF
--- filters: send_on_enter esp32_exception_decoder

Thank you for your time reading this and any assistance you can give. I’m stuck trying to get this board off the ground.

Well, there are two USB ports. One will be the native USB connection to the ESP32S3 chip, the other one will be to the USB-UART converter of the board, which is also in-turn connected to the UART of the ESP32-S3. I’m sure if there’s nothing on “USB” there will be output on the “COM” labeled port.

Note it is a changable compile-time config where Serial.println() logs to (native USB or UART). With

you have the standard settings

And since there is no

in it, it will by-default log via UART. You would have to add

build_flags =
   -DARDUINO_USB_CDC_ON_BOOT=1

to the platformio.ini make it log via the USB CDC.

1 Like

The output now shows!
I am still very junior, and so did not know to look for something like this – thank you so much for your help & patience…

Hi, I have the same problem, but for me this doesn’t solve it.

[env:lilygo-t-display-s3]
platform = espressif32
board = lilygo-t-display-s3
framework = arduino
upload_protocol = esptool
monitor_port = COM4
upload_port = COM4
monitor_speed = 460800
;monitor_dtr = 0

build_type = debug
build_flags = -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DCORE_DEBUG_LEVEL=5

Any other hints?