Issues with Zephyr installation in ESP32 board


Jonathan Beri
 

On Wed, Jan 12, 2022 at 04:08 AM, <manuel.pazos@...> wrote:
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
 
It looks like you didn't set ZEPHYR_TOOLCHAIN_VARIANT. The instructions are in the documentation here. Also, the espressif plugin outputs the exact path needed when you run west espressif install or west espressif update


manuel.pazos@...
 

I've been trying to get Zephyr installed in my Ubuntu VM by following https://docs.zephyrproject.org/2.7.0/getting_started/index.html , but when it comes to testing the hello_world sample the terminal shows this error 

manu@manu-VirtualBox:~$ cd zephyrproject/zephyr/samples/hello_world/
manu@manu-VirtualBox:~/zephyrproject/zephyr/samples/hello_world$ west build -p auto -b esp32
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/manu/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/manu/zephyrproject/zephyr/samples/hello_world
-- Zephyr version: 2.7.99 (/home/manu/zephyrproject/zephyr), build: v2.7.99-3156-g32c492cc0ce7
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter 
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: esp32
-- Cache files will be written to: /home/manu/.cache/zephyr
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.13.1 (/home/manu/zephyr-sdk-0.13.1)
-- Found dtc: /home/manu/zephyr-sdk-0.13.1/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.13.1 (/home/manu/zephyr-sdk-0.13.1)
-- Found BOARD.dts: /home/manu/zephyrproject/zephyr/boards/xtensa/esp32/esp32.dts
-- Generated zephyr.dts: /home/manu/zephyrproject/zephyr/samples/hello_world/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/manu/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/manu/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/manu/zephyrproject/zephyr/samples/hello_world/build/zephyr/dts.cmake
Parsing /home/manu/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/manu/zephyrproject/zephyr/boards/xtensa/esp32/esp32_defconfig'
Merged configuration '/home/manu/zephyrproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home/manu/zephyrproject/zephyr/samples/hello_world/build/zephyr/.config'
Kconfig header saved to '/home/manu/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/autoconf.h'
CMake Error at /home/manu/zephyrproject/zephyr/cmake/compiler/gcc/target.cmake:10 (message):
  C compiler
  /home/manu/zephyr-sdk-0.13.1/xtensa//xtensa-zephyr-elf/bin/xtensa-zephyr-elf-gcc
  not found - Please check your toolchain installation
Call Stack (most recent call first):
  /home/manu/zephyrproject/zephyr/cmake/target_toolchain.cmake:57 (include)
  /home/manu/zephyrproject/zephyr/cmake/app/boilerplate.cmake:589 (include)
  /home/manu/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/manu/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:5 (find_package)
 
 
-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/manu/zephyrproject/zephyr/samples/hello_world/build -S/home/manu/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=esp32

Could someone help me out of here? Thanks