question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can’t build for ESP32S3 - KeyError: 'toolchain-xtensa-esp32'

See original GitHub issue

From: https://community.platformio.org/t/cant-build-for-esp32s3/28090

I am having issues compiling for a new esp module ESP32-WROOM-1U.

I can build just fine using idf.py build

I am using esp-idf.

This is the output:

> Executing task: C:\Users\Someone\.platformio\penv\Scripts\platformio.exe run --target upload --target monitor --environment esp32s3box <

Processing esp32s3box (platform: espressif32; board: esp32s3box; framework: espidf)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32s3box.html
PLATFORM: Espressif 32 (4.4.0) > Espressif ESP32-S3-DevKitC-1
HARDWARE: ESP32S3 240MHz, 512KB RAM, 8MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf @ 3.40302.0 (4.3.2)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.30300.0 (3.3.0)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-ninja @ 1.9.0
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch3
KeyError: 'toolchain-xtensa-esp32':
  File "C:\Users\Someone\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 184:
    env.SConscript("$BUILD_SCRIPT")
  File "C:\Users\Someone\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\Someone\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "C:\Users\Someone\.platformio\platforms\espressif32\builder\main.py", line 283:
    target_elf = env.BuildProgram()
  File "C:\Users\Someone\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "C:\Users\Someone\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 63:
    env.ProcessProgramDeps()
  File "C:\Users\Someone\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "C:\Users\Someone\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 126:
    env.BuildFrameworks(env.get("PIOFRAMEWORK"))
  File "C:\Users\Someone\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "C:\Users\Someone\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 346:
    SConscript(env.GetFrameworkScript(f), exports="env")
  File "C:\Users\Someone\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 660:
    return method(*args, **kw)
  File "C:\Users\Someone\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\Someone\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "C:\Users\Someone\.platformio\platforms\espressif32\builder\frameworks\espidf.py", line 58:
    TOOLCHAIN_DIR = platform.get_package_dir(
  File "C:\Users\Someone\.platformio\penv\lib\site-packages\platformio\platform\_packages.py", line 32:
    pkg = self.get_package(name)
  File "C:\Users\Someone\.platformio\penv\lib\site-packages\platformio\platform\_packages.py", line 29:
    return self.pm.get_package(spec or self.get_package_spec(name))
  File "C:\Users\Someone\.platformio\penv\lib\site-packages\platformio\platform\_packages.py", line 21:
    owner=self.packages[name].get("owner"),
====================================================================================== [FAILED] Took 0.66 seconds ======================================================================================
The terminal process "C:\Users\Someone\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload', '--target', 'monitor', '--environment', 'esp32s3box'" terminated with exit code: 1.

Board file:

{
  "build": {
    "arduino":{
      "ldscript": "esp32s3_out.ld",
      "memory_type": "qspi_qspi"
    },
    "core": "esp32",
    "extra_flags": "-DBOARD_HAS_PSRAM",
    "f_cpu": "240000000L",
    "f_flash": "80000000L",
    "flash_mode": "dio",
    "mcu": "esp32s3",
    "variant": "esp32s3"
  },
  "connectivity": [
    "wifi"
  ],
  "debug": {
    "openocd_target": "esp32s3.cfg"
  },
  "frameworks": [
    "arduino",
    "espidf"
  ],
  "name": "Espressif ESP32-S3-DevKitC-1",
  "upload": {
    "flash_size": "16MB",
    "maximum_ram_size": 524288,
    "maximum_size": 8388608,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html",
  "vendor": "Espressif"
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
martinberlincommented, Nov 25, 2022

Thanks a lot @Jason2866 The Schematics of my S3 board are here With this I can already go forward. Created an Issue there in my fork so you can track my advance since I have the feeling we are communicating over here and it’s starting to be Offtopic for the nice Platformio people.

0reactions
Jason2866commented, Nov 26, 2022

Solution: The problem was a faulty Pio setup.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't build for ESP32S3 - PlatformIO Community
Hi, I am having issues compiling for a new esp module ESP32-WROOM-1U. Looks like this is a S3 module. I can build just...
Read more >
Fatal error: can't create .pio\build\esp32dev ... - Stack Overflow
I was able to resolve this issue by cloning/changing the project folder on to the drive close to the root as possible i.e. ......
Read more >
Get Started - ESP32-S3 - — ESP-IDF Programming Guide v4 ...
This document is intended to help you set up the software development environment for the hardware based on the ESP32-S3 chip by Espressif....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found