Thanks for the responses.
I took a look at `HardwareSerial.h` file located at `C:\Users\holup\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1`
I got the file location from verbose compile output of Arduino IDE.
Here I found my default pin definitions...
#if CONFIG_IDF_TARGET_ESP32
#define RX1 (gpio_num_t)26
...
#if CONFIG_IDF_TARGET_ESP32
#define TX1 (gpio_num_t)27
...
#if CONFIG_IDF_TARGET_ESP32
#define RX2 (gpio_num_t)4
...
#if CONFIG_IDF_TARGET_ESP32
#define TX2 (gpio_num_t)25
It seems that in my case:
RX1 = GPIO26
TX1 = GPIO27
RX2 = GPIO4
TX2 = GPIO25
(I did not verify the RX pins on my board yet)
There are different pins defined for `CONFIG_IDF_TARGET_`: `ESP32`, `ESP32S2`, `ESP32C2`, `ESP32C3`, `ESP32S3`, `ESP32C6`, `ESP32H2`
I found definition for these constants in `C:\Users\holup\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-442a798083\`
Here are directories: `esp32`, `esp32c3`, `esp32c6`, `esp32h2`, `esp32s2`, `esp32s3`
Is one of these folders set by selecting the board in the Arduino IDE?
How would I notice if I had wrong board/config location selected? Would it fail completely, or would I, for example, have pins in unexpected places?
Each folder contains two files `sdkconfig.h` in dirs `dio_qspi` and `qio_qspi`. They define constants like `CONFIG_IDF_TARGET_ESP32`.
What are `dio_qspi` and `qio_qspi` and how to find out which one am I using or should use?
Where does the discrepancy between my config and most pinouts I found online come from?