M5Dial no serial output (M5Stamp s3 board)


I’m new in this board development and I need help. I’ve M5Dial (uses M5stamp s3) and was playing around with it using Arduino IDE (2.2.1), but it was rather limiting, so I decided to try out Platformio via vscode extension. I’ve imported arduino project and at first I was just happy that project compiled and uploaded. But I realized that I have no serial output. I can connect to COM3, but there are no messages.

I can build code using Arduidno IDE, and it sends serial messages, can connect via arduino or vscode serial monitor (also using platformio), but that same code, just copy pasted to vscode, builds successfully and uploads, yet no serial output, neither on vscode, nor arduino.

On Arduino, I had to add this url to Additional Boards Manager Urls: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
Not sure if this is something that I need to do on platformio. Instructions are from m5stack docs: m5-docs

For test run, I used this most basic code in main.cpp:

#include <Arduino.h>

void setup() {
  // put your setup code here, to run once:

void loop() {
  Serial.println("Hello World");

and my platformio.ini contents:

platform = espressif32
board = m5stack-stamps3
framework = arduino
monitor_speed = 115200

Compiles and uploads, but no serial output when done from platformio. If I use same code on arduino (just without including arduino), serial works and I can see “Hello World” being sent every second using platformio serial monitor.

I have tried adding following to platformio.ini env without any success:

monitor_dtr = 0
monitor_rts = 0

Any help would be really appreciated, thank you!

Just noticed that when doing full build, I get these warnings aobut UART:

.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c: In function 'uartSetPins':
.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:153:9: warning: 'return' with no value, in function returning non-void
.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:149:6: note: declared here
 bool uartSetPins(uint8_t uart_num, int8_t rxPin, int8_t txPin, int8_t ctsPin, int8_t rtsPin)

Can this be related to my issue of not having serial output?
It is using this package: - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14), which I assume is the latest one.

platformIO is not using the M5Stack specific Arduino core at all. It uses the Espressif standard core (https://github.com/espressif/arduino-esp32/). Hence that version may be missing some specific configurations or extra functions.

In the case of the M5Stamp S3, when looking at the schematics, it appears that there is no USB-to-UART adapter chip on the board, the ESP32S3 is connected directly to the USB-C plug. As thus, Serial should be using the native USB-CDC capabilities of the ESP32S3 chip.

Both the Arduino IDE (Espressif core) and PlatformIO have that turned off though.

Thus, you should try this platformio.ini that activates it again:

platform = espressif32
board = m5stack-stamps3
framework = arduino
build_flags =
monitor_speed = 115200
1 Like