Additional ESP-IDF specifics can be found in [Espressif/ESP-IDF](./ESP-IDF/README.md). The [wolfSSL Manual](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html) is also a useful
resource.
## Requirements
The wolfSSL Espressif code requires the ESP-IDF to be installed for
Delete the `./build` and rename/delete your `sdkconfig` file, then run
`idf.py set-target`, in this example setting to `esp32c3`:
```bash
idf.py set-target esp32c3
```
#### Cmake Cache Warning
```
Executing action: clean
Project sdkconfig was generated for target 'esp32s3', but CMakeCache.txt contains 'esp32c3'. To keep the setting in sdkconfig (esp32s3) and re-generate CMakeCache.txt, run 'idf.py fullclean'. To re-generate sdkconfig for 'esp32c3' target, run 'idf.py set-target esp32c3'.
```
As indicated, run `idf.py set-target` and/or delete the `./build` directory.
#### Connecting, but fails to connect.
Some devices, particularly 3rd party, non-Espressif dev boards may not have implemented
the reset-program hardware properly, causing devices to not be programmed with the
`idf.py flash` command:
```
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
CMake Error at run_serial_tool.cmake:56 (message):
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
[... snip ...]
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyS55: [Errno 13] Permission denied: '/dev/ttyS55'
```
### Panic Task watchdog got triggered.
Long-running code may trip the watchdog timer.
```
Task watchdog got triggered.
Guru Meditation Error: Core 0 panic'ed (unknown). Exception was unhandled.
```
The watchdog needs to be [fed](https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/api-reference/system/wdts.html?highlight=watchdog#_CPPv418esp_task_wdt_resetv) on a regular basis
with `void esp_task_wdt_reset(void)` from `esp8266/include/esp_task_wdt.h`.
Try turning off the WDT in menuconfig, or for Makefiles: