its been a Looooong road… but I finally got these chips to compile AND flash w/ naitive ESPHome when using UARTs. I actually have three hardware UARTs defined. what a nightmare…
Notice both the chip definition (this was key) and extra_flags AND platform version. No other combination works, compiles AND wireless logs work. I hope this helps someone else out there…
@jazzmonger Thank you for posting this! I am struggling with getting 2 UARTS to work on a Lolin ESP32 S2 Mini board.
I have a LD2410 and a PM1006 - both needing a UART - connected to the ESP32s2 and only one of the two works at any one time. On a Wemos ESP32 WROOM Mini board I was told that I needed to use pins 1 & 3 (native uart0 pins) for one of my uarts in order to be able to use all 3 otherwise only 2 would work on the Arduino framework. The problem with the S2 mii board is that uart0 pins are not exposed so I can’t do that. If the same rule applies then I can only use a single uart.
The flag you posted helped me get over the CDC error however the version and platform doesn’t seem to help. Do you have any other suggestions other than using a Wemos ESP32 Mini board (on order in case all fails with S2)?
@jazzmonger Yup, I ended up replacing the ESP32-S2 mini board with the one you use and it all worked but it is a bit too big so the build is far from the tidy layout I was hoping for. The s2 has compelling features like the fact that there are no default pins for functionality but its support in esphome seems incomplete or limited compared to the regular ESP32 at this point
Hmmm…well, the S2 board I used had a mini USB port built into it. I can only assume it was tied to the default flashing UART pins on the chip. After all the hassles and countless hours and days I spent chasing all the problems I had with that chip variant, I literally threw all my S2 chips away and stopped using them-lesson learned. It was a interest idea for a chip, but VERY poorly executed.
The ESP32 D1 mini is now my go-to general purpose Dev board. It’s tiny and has no limitations, most Dev boards with the ESP32 WROOM chip (no variant) on them should work without issues. Keep that in mind when looking for a Dev board to buy.
Sorry you guys had so many problems with the S2. I know there are a few quirks with them but once you figure those out these are nice little helpers. I use them for all my UART “jobs” because of their size and price.
To program first time. Press BOOT&RESET at the same time and release RESET but keep BOOT pressed until upload starts!
Use Adafruits online Web ESPTool programmer to upload code in chrome or edge.
Trying to get this figured out.
I am using a ESP32-S2-MINI and CH340X. USB is detected, flashing works fine, and everything works as expected.
If I make a test Arduino sketch, Serial works fine without setting any pins.
When I upload ESPhome, I get the boot message from Serial, but no log at all after that.
I have tried what suggested i this thread but still can’t get any log.