Problem with Installing toolchain-riscv32-esp on Windows 64-bit using PlatformIO for ESP32-WROOM-32 with ESP-IDF
Hi everyone,
I am trying to build a project using PlatformIO with the ESP-IDF framework targeting the ESP32-WROOM-32 (board: esp32dev). However, I keep encountering the following error during build:
Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r1
UnknownPackageError: Could not find the package with 'espressif/toolchain-riscv32-esp @ 8.4.0+2021r1' requirements for your system 'windows_amd64'
Why I am Doing This
- I have some existing code that was working perfectly with older versions of PlatformIO and ESP-IDF.
- I want to run that same code without modifying it.
- The older versions did not require the RISC-V toolchain for ESP32-WROOM-32.
- Therefore, I want to build using the older PlatformIO
espressif32platform version (like 3.4.0 or 4.3.0) to keep compatibility and avoid this toolchain error.
What I Have Tried
- Specifying only the Xtensa toolchain explicitly in
platformio.ini - Removing any RISC-V related components or libraries from the project
- Clearing the PlatformIO cache and
.piofolders - Reinstalling the
espressif32platform at various versions (including 3.4.0, 4.7.0) - Updating PlatformIO and its packages
Despite all these attempts, PlatformIO still tries to download and install the toolchain-riscv32-esp package, which is not available for Windows 64-bit.
Why This Is a Problem
- The
toolchain-riscv32-esppackage is needed for ESP32-C3, ESP32-S2, and ESP32-H2 chips (which use RISC-V cores). - The ESP32-WROOM-32 chip uses the Xtensa architecture, and therefore should not require the RISC-V toolchain.
- However, PlatformIO’s tool manager seems to forcibly install the RISC-V toolchain even when building for the ESP32-WROOM-32, causing the build to fail on Windows.
My platformio.ini
[env:esp32dev]
platform = espressif32@3.4.0
board = esp32dev
framework = espidf
platform_packages =
toolchain-xtensa-esp32 @ 8.4.0+2021r1
Request for Help
- How can I prevent PlatformIO from trying to install the RISC-V toolchain when building for ESP32-WROOM-32 on Windows?
- Is there a known fix or workaround to avoid this error?
- Should I downgrade or upgrade to a specific version of PlatformIO or the ESP-IDF platform to fix this?
- Any suggestions on project structure or dependencies to avoid pulling in RISC-V components?
Thank you in advance!
Additional Information:
- OS: Windows 10/11 64-bit
- PlatformIO version: latest stable
- Board: ESP32 Dev Module (esp32dev)
- Framework: ESP-IDF
- I am following this book: [Developing IoT Projects with ESP32 | IoT & Hardware | Paperback)
- Project source: GitHub link
.
#Note
- After uploading the projects from the GitHub link, the build succeeds but at runtime ESP32 shows continuous software reset (SW_CPU_RESET).
- The same code was tested before and worked fine (outside PlatformIO).
Feel free to suggest any debugging steps or configuration changes!
If you want, I can also provide my full platformio.ini or project structure for further help.
Thank you! ![]()