PlatformIO Community

Question about IDF version of ESP platform version 3.4.0

When I compile ESP32 Aduino code with platform specification espressif32@3.4.0.
The code compiles fine and works, however one thing is strange:

If I compare the IDF version of the running ESP32 with ESP.getSdkVersion() function, I got:
v3.3.5-1-g85c43024c

If i look at this link https://github.com/platformio/platform-espressif32/releases, it states:

Updated ESP-IDF to the latest 4.3.1

Do I overlook something?

This is correct for projects using the espidf framework directly (framework = espidf, example).

Arduino-ESP32 uses a precompiled ESP-IDF base and does not build ESP-IDF from source. PlatformIO is currently using Arduino-ESP32 version 1.0.6, which is not the latest 2.0 version. Supporting that is an open issue (https://github.com/platformio/platform-espressif32/issues/619) (with workarounds available).

As such, when using PlatformIO with framework = arduino and platform = espressif32 projects, you will have Arduino-ESP32 1.0.6, which based on a precompiled ESP-IDF v3.3 version.

Thank you, clear answer. I will give the latest coreversions an experimental try.

I managed to compile my code and run the code with core version 2.0.2.

Question: Is the IDF on this core also precompiled?

If not I want to tune the WIFI parameters as described in:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html

so I can improve the ESP32 server respons speed to match the performance of the ESP8266 webserver , who is remarkable faster then the ESP32 webserver.

All Arduino-ESP32 cores I know are precompiled. The precompiled core is present in v2.0.2 too in the usual form of .a library files, as e.g. in https://github.com/espressif/arduino-esp32/tree/2.0.2/tools/sdk/esp32/lib. Due to ESF-IDF having a file count size of a bazillion and the compilation time nearing ∞ minutes, I don’t think this ever going to change, as linking a precompiled lib greatly speeds up compilation.

Recompiling the ESP-IDF core of Arduino-ESP32 is a path of pure pain and suffering, based on my experience when I tried it. It worked out in the end, but it really wasn’t nice. Maybe things have improved now. https://github.com/espressif/esp32-arduino-lib-builder is your starting point for it – good luck. If you can obtain the needed .a files as linked above, you should be able use them to replace the old ones in C:\users\<user>\.platformio\packages\framework-arduinoespressif32@someversion\tools\sdk\esp32\lib. (Assuming chip = ESP32)

Usually PlatformIO supports the ESP-IDF and Arduino as a component better, but https://github.com/platformio/platform-espressif32/tree/develop/examples/espidf-arduino-blink is outdated with respect to the used core and ESP-IDF version.

Ok. When I use the ESP-IDF and Arduino solution, is it possible to config the Wifi parameters?

The ESPIDF-Arduino-Blink example uses a ESP-IDF v4.0 based branch (source), I’m not even sure if that example still compiles. If it does though, yes, you can easily go into the menuconfig and adapt the WiFi settings. If not – best to open an issue and wait for official support to get Arduino Core 2.0.2 + dynamic ESP-IDF base updated in PlatformIO. Per linked issue above though, we aren’t even at the ARduino Core 2.0.2 support stage yet. The other way would be to try using my newly adapted platform and example (https://github.com/maxgerhardt/pio-espidf-4.4-test) that can actually build ESP-IDF v4.4. firmwares. Maybe that already works when framework = espidf is changed to framework = espidf, arduino (with the proper menuconfig), but no guarantes or checks.

Thanks for your detailed explanation

I followed your recommendations and did some tests:

1: I tried the https://github.com/platformio/platform-espressif32/tree/develop/examples/espidf-arduino-blink example. It compiles fine when I modify the platformio.ini file slightly.

Upload to ESP32 works and the code runs fine and as expected.

I see also sdconfig file.

But when I try to run pio run -t menuconfig to modify the options in this file. I run in an error:

Running menuconfig…
ninja: error: build.ninja:16408: expected ‘=’, got lexing error
t/.platformio/packages/tool-cmake/share/cmake-3.16/Modules/Compiler/Path…
^ near here
Error: Couldn’t execute ‘menuconfig’ target.
scons: *** [menuconfig] Explicit exit, status 1

I am using Atom with Platfom IO core 5.2.4 running on Windows 10.

2: I am trying to install your newly adapted platfrom https://github.com/maxgerhardt/pio-espidf-4.4-test

But that fails:

Processing esp32dev (platform: https://github.com/maxgerhardt/platform-espressif32.git; board: esp32dev; framework: espidf)

Tool Manager: Installing platformio/toolchain-esp32ulp @ ~1.22851.0
Unpacking…
Tool Manager: toolchain-esp32ulp @ 1.22851.191205 has been installed!
Tool Manager: Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2
Unpacking…
Tool Manager: toolchain-xtensa-esp32 @ 8.4.0+2021r2 has been installed!
Tool Manager: Installing espressif/toolchain-xtensa-esp32s2 @ 8.4.0+2021r1
Unpacking…
Tool Manager: toolchain-xtensa-esp32s2 @ 8.4.0+2021r1 has been installed!
Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r1
Unpacking…
Tool Manager: toolchain-riscv32-esp @ 8.4.0+2021r1 has been installed!
Tool Manager: Installing git+https://github.com/maxgerhardt/esp-idf.git#release/v4.4
git version 2.31.0.windows.1
Cloning into ‘C:\Users\edaut.platformio.cache\tmp\pkg-installing-0hrb_vcy’…
Updating files: 100% (9572/9572), done.
Submodule ‘components/asio/asio’ (https://github.com/espressif/asio.git) registered for path ‘components/asio/asio’
Submodule ‘components/bootloader/subproject/components/micro-ecc/micro-ecc’ (https://github.com/kmackay/micro-ecc.git) registered for path ‘components/boo
tloader/subproject/components/micro-ecc/micro-ecc’
Submodule ‘components/bt/controller/lib_esp32’ (https://github.com/espressif/esp32-bt-lib.git) registered for path ‘components/bt/controller/lib_esp32’
Submodule ‘components/bt/controller/lib_esp32c3_family’ (https://github.com/espressif/esp32c3-bt-lib.git) registered for path ‘components/bt/controller/li
b_esp32c3_family’
Submodule ‘components/bt/host/nimble/nimble’ (https://github.com/espressif/esp-nimble.git) registered for path ‘components/bt/host/nimble/nimble’
Submodule ‘components/cbor/tinycbor’ (https://github.com/intel/tinycbor.git) registered for path ‘components/cbor/tinycbor’
Submodule ‘components/cmock/CMock’ (https://github.com/ThrowTheSwitch/CMock.git) registered for path ‘components/cmock/CMock’
Submodule ‘components/coap/libcoap’ (https://github.com/obgm/libcoap.git) registered for path ‘components/coap/libcoap’
Submodule ‘components/esp_phy/lib’ (https://github.com/espressif/esp-phy-lib.git) registered for path ‘components/esp_phy/lib’
Submodule ‘components/esp_wifi/lib’ (https://github.com/espressif/esp32-wifi-lib.git) registered for path ‘components/esp_wifi/lib’
Submodule ‘components/esptool_py/esptool’ (https://github.com/espressif/esptool.git) registered for path ‘components/esptool_py/esptool’
Submodule ‘components/expat/expat’ (https://github.com/libexpat/libexpat.git) registered for path ‘components/expat/expat’
Submodule ‘components/ieee802154/lib’ (https://github.com/espressif/esp-ieee802154-lib.git) registered for path ‘components/ieee802154/lib’
Submodule ‘components/json/cJSON’ (https://github.com/DaveGamble/cJSON.git) registered for path ‘components/json/cJSON’
Submodule ‘components/libsodium/libsodium’ (https://github.com/jedisct1/libsodium.git) registered for path ‘components/libsodium/libsodium’
Submodule ‘components/lwip/lwip’ (https://github.com/espressif/esp-lwip.git) registered for path ‘components/lwip/lwip’
Submodule ‘components/mbedtls/mbedtls’ (https://github.com/espressif/mbedtls.git) registered for path ‘components/mbedtls/mbedtls’
Submodule ‘components/mqtt/esp-mqtt’ (https://github.com/espressif/esp-mqtt.git) registered for path ‘components/mqtt/esp-mqtt’
Submodule ‘components/nghttp/nghttp2’ (https://github.com/nghttp2/nghttp2.git) registered for path ‘components/nghttp/nghttp2’
Submodule ‘components/openthread/lib’ (https://github.com/espressif/esp-thread-lib.git) registered for path ‘components/openthread/lib’
Submodule ‘components/openthread/openthread’ (https://github.com/espressif/openthread.git) registered for path ‘components/openthread/openthread’
Submodule ‘components/protobuf-c/protobuf-c’ (https://github.com/protobuf-c/protobuf-c.git) registered for path ‘components/protobuf-c/protobuf-c’
Submodule ‘components/spiffs/spiffs’ (https://github.com/pellepl/spiffs.git) registered for path ‘components/spiffs/spiffs’
Submodule ‘components/tinyusb/tinyusb’ (https://github.com/espressif/tinyusb.git) registered for path ‘components/tinyusb/tinyusb’
Submodule ‘components/unity/unity’ (https://github.com/ThrowTheSwitch/Unity.git) registered for path ‘components/unity/unity’
Submodule ‘examples/build_system/cmake/import_lib/main/lib/tinyxml2’ (https://github.com/leethomason/tinyxml2.git) registered for path ‘examples/build_sys
tem/cmake/import_lib/main/lib/tinyxml2’
Submodule ‘examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib’ (https://github.com/espressif/esp-cryptoauthlib.git) registere
d for path ‘examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib’
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/asio/asio’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/bootloader/subproject/components/micro-ecc/micro-ecc’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/bt/controller/lib_esp32’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/bt/controller/lib_esp32c3_family’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/bt/host/nimble/nimble’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/cbor/tinycbor’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/cmock/CMock’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/coap/libcoap’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/esp_phy/lib’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/esp_wifi/lib’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/esptool_py/esptool’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/expat/expat’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/ieee802154/lib’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/json/cJSON’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/libsodium/libsodium’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/lwip/lwip’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/mbedtls/mbedtls’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/mqtt/esp-mqtt’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/nghttp/nghttp2’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/openthread/lib’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/openthread/openthread’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/protobuf-c/protobuf-c’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/spiffs/spiffs’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/tinyusb/tinyusb’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/unity/unity’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/examples/build_system/cmake/import_lib/main/lib/tinyxml2’…
Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthli
b’…
From https://github.com/espressif/asio

  • branch f31694c9f1746ba189a4bcae2e34db15135ddb22 → FETCH_HEAD
    Submodule path ‘components/asio/asio’: checked out ‘f31694c9f1746ba189a4bcae2e34db15135ddb22’
    Submodule path ‘components/bootloader/subproject/components/micro-ecc/micro-ecc’: checked out ‘d037ec89546fad14b5c4d5456c2e23a71e554966’
    Submodule path ‘components/bt/controller/lib_esp32’: checked out ‘54a69e53616cbd3e3f3bbf150e42930a7912349a’
    Submodule path ‘components/bt/controller/lib_esp32c3_family’: checked out ‘86145c184578f9061d2d0efb30fefa20a91a75e9’
    Submodule path ‘components/bt/host/nimble/nimble’: checked out ‘554cd264cd028886411b183885bb21b47b8901a6’
    Submodule path ‘components/cbor/tinycbor’: checked out ‘7c349dbb6b8d76db39383b226d3ebdf59b8ab37d’
    Submodule path ‘components/cmock/CMock’: checked out ‘eeecc49ce8af123cf8ad40efdb9673e37b56230f’
    Submodule ‘vendor/c_exception’ (https://github.com/throwtheswitch/cexception.git) registered for path ‘components/cmock/CMock/vendor/c_exception’
    Submodule ‘vendor/unity’ (https://github.com/throwtheswitch/unity.git) registered for path ‘components/cmock/CMock/vendor/unity’
    Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/cmock/CMock/vendor/c_exception’…
    Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/cmock/CMock/vendor/unity’…
    Submodule path ‘components/cmock/CMock/vendor/c_exception’: checked out ‘71b47be7c950f1bf5f7e5303779fa99a16224bb6’
    Submodule path ‘components/cmock/CMock/vendor/unity’: checked out ‘cf949f45ca6d172a177b00da21310607b97bc7a7’
    Submodule path ‘components/coap/libcoap’: checked out ‘3aa11612c143c9734d72022720f33e12506f7a2c’
    Submodule ‘ext/tinydtls’ (https://github.com/eclipse/tinydtls.git) registered for path ‘components/coap/libcoap/ext/tinydtls’
    Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/coap/libcoap/ext/tinydtls’…
    From https://github.com/eclipse/tinydtls
  • branch 59055b8a935bc53bf69d002fc089ad4bd08851b2 → FETCH_HEAD
    Submodule path ‘components/coap/libcoap/ext/tinydtls’: checked out ‘59055b8a935bc53bf69d002fc089ad4bd08851b2’
    Submodule path ‘components/esp_phy/lib’: checked out ‘2d89c532ccba0bb9988d1d1c6d719bbe1d8b65b8’
    Submodule path ‘components/esp_wifi/lib’: checked out ‘428480bbb90442db61fb20fed9980dd035245fe9’
    Submodule path ‘components/esptool_py/esptool’: checked out ‘b082b0ed2d86b3330134c4854a021dfd14c29b08’
    Submodule path ‘components/expat/expat’: checked out ‘a28238bdeebc087071777001245df1876a11f5ee’
    From https://github.com/espressif/esp-ieee802154-lib
  • branch f7b5e8059a3bb6f321e79ac3bf2aa4d2a9b93326 → FETCH_HEAD
    Submodule path ‘components/ieee802154/lib’: checked out ‘f7b5e8059a3bb6f321e79ac3bf2aa4d2a9b93326’
    Submodule path ‘components/json/cJSON’: checked out ‘d348621ca93571343a56862df7de4ff3bc9b5667’
    Submodule path ‘components/libsodium/libsodium’: checked out ‘4f5e89fa84ce1d178a6765b8b46f2b6f91216677’
    Submodule path ‘components/lwip/lwip’: checked out ‘2749568fe15df2003f6c3f37f0dfd44f8f01fcd6’
    Submodule path ‘components/mbedtls/mbedtls’: checked out ‘dc406b82b20481bde74a60fa8a776285d3fb9cf3’
    Submodule path ‘components/mqtt/esp-mqtt’: checked out ‘89894bd0c611b1392967fe90bb49682eba858383’
    Submodule path ‘components/nghttp/nghttp2’: checked out ‘8f7b008b158e12de0e58247afd170f127dbb6456’
    Submodule ‘third-party/mruby’ (https://github.com/mruby/mruby) registered for path ‘components/nghttp/nghttp2/third-party/mruby’
    Submodule ‘third-party/neverbleed’ (https://github.com/tatsuhiro-t/neverbleed.git) registered for path ‘components/nghttp/nghttp2/third-party/neverbleed’
    Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/nghttp/nghttp2/third-party/mruby’…
    Cloning into ‘C:/Users/edaut/.platformio/.cache/tmp/pkg-installing-0hrb_vcy/components/nghttp/nghttp2/third-party/neverbleed’…
    Submodule path ‘components/nghttp/nghttp2/third-party/mruby’: checked out ‘7c91efc1ffda769a5f1a872c646c82b00698f1b8’
    From https://github.com/tatsuhiro-t/neverbleed
  • branch b967ca054f48a36f82d8fcdd32e54ec5144f2751 → FETCH_HEAD
    Submodule path ‘components/nghttp/nghttp2/third-party/neverbleed’: checked out ‘b967ca054f48a36f82d8fcdd32e54ec5144f2751’
    From https://github.com/espressif/esp-thread-lib
  • branch 9a8d34d8f698cad2c9468468b473e26a3dda51b9 → FETCH_HEAD
    Submodule path ‘components/openthread/lib’: checked out ‘9a8d34d8f698cad2c9468468b473e26a3dda51b9’
    Submodule path ‘components/openthread/openthread’: checked out ‘c36c0e77a2465355bcf13bd7dc718d8c9aa6ff64’
    Submodule path ‘components/protobuf-c/protobuf-c’: checked out ‘dac1a65feac4ad72f612aab99f487056fbcf5c1a’
    Submodule path ‘components/spiffs/spiffs’: checked out ‘f5e26c4e933189593a71c6b82cda381a7b21e41c’
    From https://github.com/espressif/tinyusb
  • branch c4badd394eda18199c0196ed0be1e2d635f0a5f6 → FETCH_HEAD
    Submodule path ‘components/tinyusb/tinyusb’: checked out ‘c4badd394eda18199c0196ed0be1e2d635f0a5f6’
    Submodule path ‘components/unity/unity’: checked out ‘7d2bf62b7e6afaf38153041a9d53c21aeeca9a25’
    Submodule path ‘examples/build_system/cmake/import_lib/main/lib/tinyxml2’: checked out ‘7e8e249990ec491ec15990cf95b6d871a66cf64a’
    Submodule path ‘examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib’: checked out ‘36d0642e66ff5b1c7a291873f24c498ca6ffedef’
    Error: Traceback (most recent call last):
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio_main_.py”, line 121, in main
    cli() # pylint: disable=no-value-for-parameter
    File “C:\Users\edaut.platformio\penv\lib\site-packages\click\core.py”, line 1128, in call
    return self.main(*args, **kwargs)
    File “C:\Users\edaut.platformio\penv\lib\site-packages\click\core.py”, line 1053, in main
    rv = self.invoke(ctx)
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\commands_init_.py”, line 44, in invoke
    return super(PlatformioCLI, self).invoke(ctx)
    File “C:\Users\edaut.platformio\penv\lib\site-packages\click\core.py”, line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “C:\Users\edaut.platformio\penv\lib\site-packages\click\core.py”, line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “C:\Users\edaut.platformio\penv\lib\site-packages\click\core.py”, line 754, in invoke
    return __callback(*args, **kwargs)
    File “C:\Users\edaut.platformio\penv\lib\site-packages\click\decorators.py”, line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\commands\run\command.py”, line 144, in cli
    is_test_running,
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\commands\run\command.py”, line 176, in process_env
    result = {“env”: name, “duration”: time(), “succeeded”: ep.process()}
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\commands\run\processor.py”, line 68, in process
    build_vars, build_targets, self.silent, self.verbose, self.jobs
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\platform_run.py”, line 60, in run
    self.autoinstall_runtime_packages()
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\platform_packages.py”, line 74, in autoinstall_runtime_packages
    self.pm.install(self.get_package_spec(name))
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 49, in install
    spec, silent=silent, skip_dependencies=skip_dependencies, force=force
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 97, in _install
    pkg = self.install_from_url(spec.url, spec, silent=silent)
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 152, in install_from_url
    return self._install_tmp_pkg(pkg_item)
    File “C:\Users\edaut.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 244, in _install_tmp_pkg
    shutil.copytree(tmp_pkg.path, dst_pkg.path, symlinks=True)
    File “C:\Users\edaut.platformio\python3\lib\shutil.py”, line 368, in copytree
    raise Error(errors)
    shutil.Error: [(‘C:\Users\edaut\.platformio\.cache\tmp\pkg-installing-0hrb_vcy\components\coap\libcoap\examples\contiki\coap_config.h’, ‘C:\U
    sers\edaut\.platformio\packages\framework-espidf\components\coap\libcoap\examples\contiki\coap_config.h’, ‘symbolic link privilege not held’), (
    ‘C:\Users\edaut\.platformio\.cache\tmp\pkg-installing-0hrb_vcy\components\coap\libcoap\examples\lwip\coap_config.h’, ‘C:\Users\edaut\.platf
    ormio\packages\framework-espidf\components\coap\libcoap\examples\lwip\coap_config.h’, ‘symbolic link privilege not held’), (‘C:\Users\edaut\.pl
    atformio\.cache\tmp\pkg-installing-0hrb_vcy\components\coap\libcoap\README’, ‘C:\Users\edaut\.platformio\packages\framework-espidf\components
    \coap\libcoap\README’, ‘symbolic link privilege not held’), (‘C:\Users\edaut\.platformio\.cache\tmp\pkg-installing-0hrb_vcy\components\expat\e
    xpat\README.md’, ‘C:\Users\edaut\.platformio\packages\framework-espidf\components\expat\expat\README.md’, ‘symbolic link privilege not held’)]

============================================================

An unexpected error occurred. Further steps:

============================================================

Deleted the .platformio\packages directory to eliminate any unwanted dependencies but problem still occurs.

After spending many hours searching a solution and learning a lot of the Platform IO building system.

Finally it works:

Compiling ESP32 core 2.0.2 with IDF 4.4.0 works when using:

downloading https://github.com/tasmota/platform-espressif32 package

and modify

platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2idf/platform-espressif32-2.0.2.zip

instead of platform = espressif32

in the platform.ini file for example in:

https://github.com/tasmota/platform-espressif32/blob/idf_v4.4/arduino_v2.0.2/examples/espidf-arduino-blink/platformio.ini.

With pio run -t menuconfig using j & k keys scrolling through the IDF menu.

Changing settings to boost webserver performance.

→ Partition Table → Partition Table → (X) Factory app, two OTA definitions
→ Arduino Configuration → [ ] Autoconnect WiFi on boot
→ Compiler options → Optimization Level → (X) Optimize for performance (-O2)
→ Component config → ESP System Settings → [ ] Watch CPU1 Idle Task
→ Component config → Wi-Fi → (16) Max number of WiFi static RX buffers
→ Component config → Wi-Fi → (64) Max number of WiFi dynamic RX buffers
→ Component config → Wi-Fi → (64) Max number of WiFi dynamic TX buffers
→ Component config → Wi-Fi → (32) WiFi AMPDU TX BA window size
→ Component config → Wi-Fi → (32) WiFi AMPDU RX BA window size
→ Component config → Wi-Fi → [ ] WiFi NVS flash
→ Component config → LWIP → [*] Enable LWIP IRAM optimization
→ Component config → LWIP → (64) TCPIP task receive mail box size
→ Component config → LWIP → TCP → (65534) Default send buffer size
→ Component config → LWIP → TCP → (65535) Default receive window size
→ Component config → LWIP → TCP → (64) Default TCP receive mail box size

and manually change
#CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240

in the device sdkconfig file.

OTA is not working yet. Have to figure that out.

Thanks @Jason2866 for your excellent work and @maxgerhardt for your support

1 Like

Changes for a working OTA solution compatible with the standard Arduino Core:

→ Partition Table → Partition Table → (X) Custom partition table CSV
→ Partition Table → Partition Table → (default.csv) Custom partition CSV file

Put defaults.csv file from the ESP32 Arduino Core packages in the projects dir.
Added board_build.partitions = default.csv in platform.ini file

Compile and perform a serial upload. After that OTA will work.

1 Like