atomic14 / esp32-sdcard-msc

18 stars 1 forks source link

HWCDC Serial and USBCDC Serial conflict #1

Open Sheepshell opened 10 months ago

Sheepshell commented 10 months ago
2edd13c17ef6e9b3d56b6b918c31c8f

As shown above, would you mind tell me what exactly i need to do to run your code?

drogne commented 9 months ago

I commented that line out, and it does compile. After downloading a memory card appeared but was said unformatted for some reason. I popped it out checked it, it was FAT32 with data on it. Then I reconnected to ESP32 and now it showing hardware unrecognized, and was wondering how to debug this problem. This HWCDC serial might be the way one needs to debug this code, I am not sure.

Sheepshell commented 9 months ago

Thanks for the hint, I work that out.

cgreening commented 9 months ago

Sorry for not picking this up earlier.

You'll need to update the platformio.ini:

  ; make sure serial output works
  ; -DARDUINO_USB_MODE
  ; -DARDUINO_USB_CDC_ON_BOOT
  ; prevent hardware serial being used - we'll use USB serial
  -DNO_GLOBAL_SERIAL

The -DNO_GLOBAL_SERIAL prevents the conflict.

Debugging is really tricky!