Skip to content

Build failed: 'mbedtls_ssl_conf_psk' was not declared in this scope #2336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kroegerama opened this issue Jan 16, 2019 · 6 comments
Closed

Comments

@kroegerama
Copy link

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
@atanisoft
Copy link
Collaborator

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.

@kroegerama
Copy link
Author

kroegerama commented Jan 16, 2019

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).

@atanisoft
Copy link
Collaborator

@kroegerama
Copy link
Author

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:

GENCONFIG
*
* 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!

@nevercast
Copy link

@kroegerama Do you recall which properties you changed to get it to work without using the sdkconfig provided?

@nevercast
Copy link

I found out what worked for me: #2154 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants