Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-C3-MINI Serial monitor stays blank when uploading with Platform.io, but not with Arduino IDE #6529

Closed
1 task done
ggalisky opened this issue Apr 4, 2022 · 6 comments
Labels
IDE: PlaformIO Issue relates to PlatformIO IDE

Comments

@ggalisky
Copy link

ggalisky commented Apr 4, 2022

Board

ESP32-C3-MINI Custom board

Device Description

A ESP32-C3-MINI module with hand soldered wires and decoupling caps (see diagram below)

Hardware Configuration

Hand wired module with below schematic

Screen Shot 2022-04-03 at 7 33 22 PM

Version

other

IDE Name

Platform.io

Operating System

Windows and Mac

Flash frequency

80,000,000

PSRAM enabled

no

Upload speed

115200

Description

Serial monitor is completely blank when uploading main.cpp when using Platform.io. The issue does not persist when using the Arduino IDE. The main.cpp runs fine after flashing, but I get no data on the serial monitor from platform.io

I believe it may have something to do with the "USB CDC" option. When I disable this in the Arduino IDE I get no serial output, when I enable it I get serial output. I've tried adding this to my platform.ini file but have not had any luck getting the serial monitor to work with PIO

Sketch

#include "Arduino.h"
void setup() {
    Serial.begin(115200);

}
void loop() {
    Serial.println("I'm alive");
    delay(100);
}

ini

[env:arduino-esp32c3]
platform = https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200

build_flags = 
    ; enable USB serial
    -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
    -D USBCON

Debug Message

All I see on the serial monitor: 

--- 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
--- Miniterm on /dev/cu.usbmodem21401  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

Other Steps to Reproduce

I've tried both MacOS and Windows and haven't been able to solve this. Been plugging away at it for the last few days.

I've checked every thread I could find, but none have solved my issue. Thank you for your help

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@ggalisky ggalisky added the Status: Awaiting triage Issue is waiting for triage label Apr 4, 2022
@lbernstone
Copy link
Contributor

If it works in Arduino IDE, but not in platform.io, the issue should be moved to https://github.com/platformio/platform-espressif32/issues

@VojtechBartoska VojtechBartoska added IDE: PlaformIO Issue relates to PlatformIO IDE and removed Status: Awaiting triage Issue is waiting for triage labels Apr 4, 2022
@Jason2866
Copy link
Collaborator

Jason2866 commented Apr 4, 2022

It is 100% Platformio!
The reason is that the Serial Console after flashing is on standard UART (serial) and NOT on USBSerial (GPIO 18 /19)
anymore. I will have a look if i find a solution
EDIT:
@ggalisky Use this settings

[env:esp32c3]
platform = https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
build_flags =
                -DARDUINO_USB_CDC_ON_BOOT=1
                -DARDUINO_USB_MODE=1

@Jason2866
Copy link
Collaborator

Jason2866 commented Apr 4, 2022

I will add a boards.json for ESP32-C3 mini and Adafruit QT Py ESP32-C3 in my Platformio fork, which includes this settings

@Jason2866
Copy link
Collaborator

Jason2866 commented Apr 4, 2022

Update :-) Boards added (adafruit_qt_py_esp32-c3 and esp32-c3-mini)

[env:esp32c3-mini]
platform = https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip
board = esp32-c3-mini
framework = arduino
monitor_speed = 115200

@ggalisky
Copy link
Author

ggalisky commented Apr 4, 2022

This solved my issue, I also posted in https://github.com/platformio/platform-espressif32/issues as per @Ibernstone suggestion, Jason responded with the same solution and I can confirm it is working on my end: platformio/platform-espressif32#755

@ggalisky ggalisky closed this as completed Apr 4, 2022
@derFrickler
Copy link

Hi There, i am trying to get the USB Serial working on my ESP32-C3 Mini in platformio, but i am not able to get a Serial device after flashing and rebooting. Flashing works fine, but after reboot there is no serial device coming up. Using Arduino IDE 2 with USB CDC on Boot Enabled it works just fine.

Seems that i am missing something?

here is my config:

[env:esp32c3]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
build_flags =
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1

Any hints on what i can try? As said, it works with Arduino but i prefer pio for all my projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE: PlaformIO Issue relates to PlatformIO IDE
Projects
None yet
Development

No branches or pull requests

5 participants