Skip to content

Commit 4c4714f

Browse files
committed
Small fixes for Debug prints on C3, C6 and H2
1 parent 181628b commit 4c4714f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: cores/esp32/esp32-hal-uart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ int log_printfv(const char *format, va_list arg) {
878878
}
879879
#endif
880880
*/
881-
#if CONFIG_IDF_TARGET_ESP32C3
881+
#if CONFIG_IDF_TARGET_ESP32C3 || ((CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C6) && ARDUINO_USB_CDC_ON_BOOT)
882882
vsnprintf(temp, len + 1, format, arg);
883883
ets_printf("%s", temp);
884884
#else

Diff for: cores/esp32/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ void loopTask(void *pvParameters) {
4848
// sets UART0 (default console) RX/TX pins as already configured in boot or as defined in variants/pins_arduino.h
4949
Serial0.setPins(gpioNumberToDigitalPin(SOC_RX0), gpioNumberToDigitalPin(SOC_TX0));
5050
#endif
51-
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
51+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG && (!CONFIG_IDF_TARGET_ESP32C3 || !ARDUINO_USB_CDC_ON_BOOT)
5252
printBeforeSetupInfo();
5353
#else
5454
if (shouldPrintChipDebugReport()) {
5555
printBeforeSetupInfo();
5656
}
5757
#endif
5858
setup();
59-
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
59+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG && (!CONFIG_IDF_TARGET_ESP32C3 || !ARDUINO_USB_CDC_ON_BOOT)
6060
printAfterSetupInfo();
6161
#else
6262
if (shouldPrintChipDebugReport()) {

0 commit comments

Comments
 (0)