Problems installing ESP32 toolchain

Hello,

I have been following the directions for installing the ESP32 toolchain and hit a roadblock. I have been following the directions on the docs site, but the toolchain is not found. Am I doing something wrong?

Here is the error output from my terminal (linux)
`

=== downloading ESP-IDF tools..
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, riscv32-esp-elf, openocd-esp32
Skipping [email protected] (already installed)
Skipping [email protected] (already installed)
Skipping [email protected]_64eb9ff-8.4.0 (already installed)
Skipping [email protected] (already installed)
=== downloading ESP-IDF tools completed
The toolchain has been downloaded to /home/maximm/.espressif/tools/zephyr
Export or set the following variables into the environment:
export ESPRESSIF_TOOLCHAIN_PATH="/home/maximm/.espressif/tools/zephyr"
export ZEPHYR_TOOLCHAIN_VARIANT="espressif"
(.venv) [email protected]:~/zephyr-esp/zephyr$ ^C
(.venv) [email protected]:~/zephyr-esp/zephyr$ export ESPRESSIF_TOOLCHAIN_PATH="/home/maximm/.espressif/tools/zephyr"
(.venv) [email protected]:~/zephyr-esp/zephyr$ west build -b esp32 samples/basic/minimal/
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /home/maximm/zephyr-esp/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/maximm/zephyr-esp/zephyr/samples/basic/minimal
-- Zephyr version: 2.7.99 (/home/maximm/zephyr-esp/zephyr), build: v2.7.99-2139-g2bf02f4854aa
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: esp32
-- Cache files will be written to: /home/maximm/.cache/zephyr
-- Using toolchain: zephyr 0.13.2 (/home/maximm/zephyr-sdk)
-- Found dtc: /home/maximm/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/maximm/zephyr-esp/zephyr/boards/xtensa/esp32/esp32.dts
-- Generated zephyr.dts: /home/maximm/zephyr-esp/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/maximm/zephyr-esp/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/maximm/zephyr-esp/zephyr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/maximm/zephyr-esp/zephyr/build/zephyr/dts.cmake
Parsing /home/maximm/zephyr-esp/zephyr/Kconfig
Loaded configuration '/home/maximm/zephyr-esp/zephyr/build/zephyr/.config'
No change to configuration in '/home/maximm/zephyr-esp/zephyr/build/zephyr/.config'
No change to Kconfig header in '/home/maximm/zephyr-esp/zephyr/build/zephyr/include/generated/autoconf.h'
CMake Error at /home/maximm/zephyr-esp/zephyr/cmake/compiler/gcc/target.cmake:10 (message):
  C compiler
  /home/maximm/zephyr-sdk/xtensa//xtensa-zephyr-elf/bin/xtensa-zephyr-elf-gcc
  not found - Please check your toolchain installation
Call Stack (most recent call first):
  /home/maximm/zephyr-esp/zephyr/cmake/target_toolchain.cmake:57 (include)
  /home/maximm/zephyr-esp/zephyr/cmake/app/boilerplate.cmake:599 (include)
  /home/maximm/zephyr-esp/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/maximm/zephyr-esp/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/home/maximm/zephyr-esp/.venv/bin/python3 -B/home/maximm/zephyr-esp/zephyr/build -S/home/maximm/zephyr-esp/zephyr/samples/basic/minimal -GNinja

Hi Maxim,

Looks like the West build system is having troubles finding the Espressif toolchain, could you run the following command in your terminal and let us know what you see?

echo $PATH

That will let us know where your terminal is searching for the toolpath.

Could you also please run the following?

export -r

As you can see in the lines you pasted above, we would expect to see the ESPRESSIF_TOOLCHAIN_PATH and the ZEPHYR_TOOLCHAIN_VARIANT set in your export variables. If these are different or if your $PATH is not what is listed after the Espressif toolchain install, that is likely the source of the problems.

Chris