After upgrade of esp-idf framework, I get errors when compiling

After updating the esp-idf framework I get the following error. It seems to be something with the framework?

1 Like

I have tried deleting the …/framework-espidf folder in order to reinstall it and clean the project. I am still getting the same error messages. :roll_eyes:

How did you “update the esp-idf framework”? By updating the espressif32 platform?

If there was an issue with the installment of the python environment, you need to delete C:\Users\<user>\.platformio\penv\* and restart VSCode.

@maxgerhardt Thanks for the reply!

As I always do using the

pio pkg update

I will try and delete the python environment as you suggest.

Okay I deleted the …/penv/* and restarted VScode, same problem exist?

Building .pio\build\supermini_esp32c3\bootloader.bin
Traceback (most recent call last):
  File "C:\Users\niels\.platformio\packages\tool-esptoolpy\esptool.py", line 41, in <module>
    import esptool
  File "C:\Users\niels\.platformio\packages\tool-esptoolpy\esptool\__init__.py", line 42, in <module>
    from esptool.bin_image import intel_hex_to_bin
  File "C:\Users\niels\.platformio\packages\tool-esptoolpy\esptool\bin_image.py", line 16, in <module>
    from intelhex import HexRecordError, IntelHex
ModuleNotFoundError: No module named 'intelhex'
*** [.pio\build\supermini_esp32c3\bootloader.bin] Error 1
===================================================================== [FAILED] Took 70.07 seconds =====================================================================

This is my platformio.ini:

[env:supermini_esp32c3]
platform = espressif32
board = lolin_c3_mini
framework = espidf
board_build.partitions = ESP32_OTA_4M.csv
board_build.embed_files = src/mqtt_eclipseprojects_io.pem
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
monitor_rts = 0
monitor_dtr = 0

Ah actually, this is a current bug.

Delete C:\Users\<user>\.platformio\packages\tool-esptoolpy to try to force the installation of the latest package version for that.

1 Like

@maxgerhardt Thank for that info. that did it!! :grinning:

Hi,
also have the same intelhex problem. Deleting the C:\Users\<user>\.platformio\packages\tool-esptoolpy folder doesn’t fix the problem. In my platformio.ini file I use platform = espressif32 @ 6.11.0 to stick to the previous version. But if anyone has another suggestion to get around this problem, I will be happy to try it!

I deleted also the packages directory, then just save the platformio.ini with the new version to trigger an update. After successfully instalIing the update the project compiled fine again.

Thanks, this also fixed it for me. I was getting this error after upgrading from Debian 12 to 13.

Imho the way how Platformio adds the needed missing dependencies is the source for issues. The added a script to the esptool package which tries to find pip and is installing dependencies from pypi. This is a hack which will for sure not always work.
The only clean solution is either add this deps to Platformio core or install an venv for Arduino and install all deps “clean” there. This would be the same approach as done for espidf.

The choosen “solution” is not future proof either. esptool v5.x needs to be installed and not “just” calling the esptool.py with Python. This way will be removed in future releases. Actualy a warning is shown “deprecated way of calling esptool.py”

Furthermore esptool v4.9 is not the recommended version for using with espidf

Solution: Install intelhex in the PlatformIO built-in Python environment.

Enter the virtual environment directory

cd C:\Users<username>.platformio\penv\Scripts

Activate the environment

.\activate

pip install intelhex

1 Like

Thanks! That fixed it for me!

thank you, work for me