The current version (1.0.1) fails to build as esp-idf component (esp-idf stable 3.1.2):
CXX build/arduino/libraries/ESPmDNS/src//ESPmDNS.o
CXX build/arduino/libraries/WiFiClientSecure/src//WiFiClientSecure.o
CXX build/arduino/libraries/WiFiClientSecure/src//ssl_client.o
<...>/components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp: In function 'int start_ssl_client(sslclient_context*, const char*, uint32_t, const char*, const char*, const char*, const char*, const char*)':
<...>/components/arduino/libraries/WiFiClientSecure/src/ssl_client.cpp:144:67: error: 'mbedtls_ssl_conf_psk' was not declared in this scope
(const unsigned char *)pskIdent, strlen(pskIdent));
^
/opt/esp-idf/make/component_wrapper.mk:291: recipe for target 'libraries/WiFiClientSecure/src//ssl_client.o' failed
you did not use the sdkconfig from arduino-esp32 as a basis for your compilation, you need to enable a few options in the sdkconfig to allow successful compilation.
I couldn't find any sdkconfig in the arduino-esp32 repository. But I have set the arduino options myself in make menuconfig (e.g. using the arduino loop).
Thanks! This information should be added to https://github.com/espressif/arduino-esp32/blob/master/docs/esp-idf_component.md, though.
There are some new attributes in the latest esp-idf:
*
* Restart config...
*
*
* SPI RAM config
*
Initialize SPI RAM when booting the ESP32 (SPIRAM_BOOT_INIT) [N/y/?] n
SPI RAM access method
1. Integrate RAM into ESP32 memory map (SPIRAM_USE_MEMMAP)
> 2. Make RAM allocatable using heap_caps_malloc(..., MALLOC_CAP_SPIRAM) (SPIRAM_USE_CAPS_ALLOC)
3. Make RAM allocatable using malloc() as well (SPIRAM_USE_MALLOC)
choice[1-3?]: 2
Type of SPI RAM chip in use
> 1. Auto-detect (SPIRAM_TYPE_AUTO)
2. ESP-PSRAM32 or IS25WP032 (SPIRAM_TYPE_ESPPSRAM32)
3. ESP-PSRAM64 or LY68L6400 (SPIRAM_TYPE_ESPPSRAM64)
choice[1-3]: 1
Set RAM clock speed
> 1. 40MHz clock speed (SPIRAM_SPEED_40M)
choice[1]: 1
Enable workaround for bug in SPI RAM cache for Rev1 ESP32s (SPIRAM_CACHE_WORKAROUND) [Y/n/?] y
Enable bank switching for >4MiB external RAM (SPIRAM_BANKSWITCH_ENABLE) [Y/n/?] y
Amount of 32K pages to reserve for bank switching (SPIRAM_BANKSWITCH_RESERVE) [8] 8
Try to allocate memories of WiFi and LWIP in SPIRAM firstly. If failed, allocate internal memory (WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST) [Y/n/?] y
Allow .bss segment placed in external memory (SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY) [N/y/?] n
PSRAM CS IO for ESP32-PICO chip (PICO_PSRAM_CS_IO) [10] (NEW)
*
* MKSPIFFS configuration
*
SPIFFS logical block size (SPIFFS_LOG_BLOCK_SIZE) [4096] (NEW)
SPIFFS logical blockpage size (SPIFFS_LOG_PAGE_SIZE) [256] (NEW)
SPIFFS size (SPIFFS_SIZE) [0x100000] (NEW)
SPIFFS base address (SPIFFS_BASE_ADDR) [0x291000] (NEW)
Build is working fine now, thanks a lot!
@kroegerama Do you recall which properties you changed to get it to work without using the sdkconfig provided?
I found out what worked for me: https://github.com/espressif/arduino-esp32/issues/2154#issuecomment-455402425
Most helpful comment
I found out what worked for me: https://github.com/espressif/arduino-esp32/issues/2154#issuecomment-455402425