iTranslated by AI
How to Fix Issues with Serial Monitor Not Displaying on M5Stack CoreS3 Using M5Unified
I had trouble displaying characters on the serial monitor with the M5Stack CoreS3 Lite (hereafter "CoreS3"), and since I couldn't find a site that offered a direct solution, I have compiled the solution here.
Environment
M5Stack
- M5Stack CoreS3 Lite
The only difference from the standard M5Stack CoreS3 is the inclusion of a DIN base.
Development Environment
- Windows 11 Home
- VSCode + PlatformIO
Libraries & Others
- Arduino platform
- M5Unified 0.2.0
Initial Code
#include <M5Unified.h>
void setup() {
M5.begin();
Serial.begin(115200);
}
void loop() {
M5.update();
Serial.println("hello from cores3");
}
This displays correctly on the M5Stack Core2 v1.1, but it did not display anything on the CoreS3.
Checking platformio.ini
Ensure that the monitor_speed matches the value specified in Serial.begin(). Also, add the following lines to your configuration:
build_flags =
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
I will leave the detailed explanation of these flags to other resources.
However, it still wouldn't display.
Installing the Driver
The driver automatically assigned by Windows (WinUSB) does not work properly. While BASIC and Core2 models have a built-in USB-Serial converter chip that requires its own driver, the CoreS3 does not have one. Instead, the USB is connected directly to the ESP32-S3, so you need to install the ESP32-S3 driver.
After downloading the driver zip file from the link above, open the Device Manager and find the "USB JTAG/serial debug unit" under Universal Serial Bus devices.

Right-click to show Properties, then open the Driver tab.

Click "Update driver" and select "Browse my computer for drivers."

Specify the folder where you downloaded the driver and click Next.

If you see this, it is a success.


However, it still wouldn't display. I realized later that this step was also crucial, and skipping it would prevent the serial monitor from displaying output.
The Helping Hand from Google's AI Mode
As a last resort, I asked Google's AI model for help.

Looking at the initial code, I was executing Serial.begin() after M5.begin(). I had a hunch, so I tried writing the code with the modification...
It appeared!

Final Code
#include <M5Unified.h>
void setup() {
auto cfg = M5.config();
cfg.serial_baudrate = 115200;
M5.begin(cfg);
}
void loop() {
M5.update();
Serial.println("hello from cores3");
}
Afterword
Coming from a background of using M5Stack Core2 v1.1 and AVR microcontrollers, it was quite shocking that even getting the serial monitor to display was not straightforward. However, I am glad I was able to get it working. I'll probably write again if anything else comes up. Until then.
completed
Discussion