Platform IO: Could not find package xtensa32

I tried opening and uploading a project i got from someone else and got this error:

UnknownPackageError: Could not find the package with ‘toolchain-xtensa32 @ ~2.80200.0’ requirements for your system ‘windows_amd64’

I tried a few things i read on forums but nothing worked for me so far.

When i try installing it manually, it tells me that xtensa is already installed.

Does anyone have an idea what i could do to fix this?

The 8.2.0 package does not exist (anymore?), only 8.4.0. See What platformio.ini are you using? This should only appear in very outdated platform-espressif32 installations. Because nowadays, the pacakge espressif/toolchain-xtensa-esp32 is used instead.

Hi max,

My platformio.ini looks like this:

board_build.partitions = custompart.csv
platform = espressif32@1.12.4
board = esp32dev
framework = espidf
upload_port = COM3
monitor_port = COM3
monitor_speed = 115200

I’m not too familiar with esp’s or platformio in general so i don’t really have a clue on how to resolve this…

Okay that’s ancient in todays terms, released “Jun 17, 2020” originally. PlatformIO broke compatibility by deleting that 8.2.0 package.

Can you add

platform_packages = 

in the platformio.ini to try and get it to use an existing compiler package?

Well it worked so far with this one, but now it’s got a problem with my local windows username having a whitespace in it…

Older platforms indeed used to have a problem with that. The other path is ofc seeing if you can’t upgrade the platform to a more recent one, e…g, at least espressif32@3.5.0.

1 Like

Hmm and how could i do that?

You change the version in this platformio.ini to one I suggested.

So i tried this solution but i now got the error

Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch2
UnknownPackageError: Could not find the package with 'espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch2' requirements for your system 'windows_amd64'

CC @ivankravets, the espressif32 platform version 3.5.0 which is the last one to reference the still often-used 1.0.6 Arduino-ESP32 core has dead packages.

What is the reason that you use 3-year-old development platform? If your project depends on ESP-IDF 4, please use the latest stable 5.3.0 version Release 5.3.0 · platformio/platform-espressif32 · GitHub

Change your configuration to:

board_build.partitions = custompart.csv
platform = espressif32@^5
board = esp32dev
framework = espidf
upload_port = COM3
monitor_port = COM3
monitor_speed = 115200

Next, in VSCode, click on the PlatformIO icon on the left activity bar > Project Tasks > Dependencies > Update. Build project.

Thanks @ivankravets for your reply,
I got the project from someone else and should set it up on my computer now. I tried your solution but now got the error:

Error: Detected a whitespace character in project paths.

The problem seems to be the whitespace in my local windows username…
Is there a solution or should i just make a temporary user on my pc?

This is the error from ESP-IDF. It does not support projects where the canonical path contains the space.

Could you try to move your project somewhere where there is no space in the path? For example, C:\Projects?

I tried this but the problem seems to be the platformio config… can i move that folder too?

The terminal process "C:\Users\Noe Steiner\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Yes, please do the following steps:

  1. Close VSCode
  2. Remove C:\Users\Noe Steiner\.platformio
  3. Create C:\.platformio empty folder
  4. Start VSCode.

The PlatformIO Core should be installed in the C:\.platformio.

1 Like

Thank you so much! It works now!