Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting esp-idf path to match Espressif's documentation #24844

Closed
beriberikix opened this issue Apr 30, 2020 · 6 comments
Closed

Setting esp-idf path to match Espressif's documentation #24844

beriberikix opened this issue Apr 30, 2020 · 6 comments
Assignees
Labels
area: Documentation bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale

Comments

@beriberikix
Copy link

I set up a new mac with both Espressif's IDF/toolchain and Zephyr. I ran into a build error because the ESP_IDF_PATH was not set. This wasn't set correctly because:

  1. The Zephyr docs didn't mention it when setting up the environment
  2. The Espressif docs tell you to run an install.sh that sets a different value to IDF_PATH.

I'd like to recommend switching the IDF_PATH to match the Espressif docs. I think west options needs to be updated and some of the CMAKE files in Zephyr.

Thoughts?

@beriberikix beriberikix added the bug The issue is a bug, or the PR is fixing a bug label Apr 30, 2020
@carlescufi carlescufi added area: Documentation priority: low Low impact/importance bug labels Apr 30, 2020
@carlescufi
Copy link
Member

@beriberikix would you send a PR to fix the documentation?

@carlescufi
Copy link
Member

@nashif have you ever had to set ESP_IDF_PATH when building for ESP32?

@beriberikix
Copy link
Author

Happy to submit the immediate doc bug. However, the change I suggested would require modifying the source code. Should I submit the PR for the docs or should we discuss the proposed change first?

@pabigot
Copy link
Collaborator

pabigot commented May 3, 2020

I do the following to build for ESP32:

. ~/esp/esp-idf/export.sh
export ZEPHYR_TOOLCHAIN_VARIANT=espressif
export ESPRESSIF_TOOLCHAIN_PATH=${HOME}/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/
export ESP_IDF_PATH=${IDF_PATH}

west build -b esp32
west flash --esp-device /dev/ttyUSB0

@github-actions
Copy link

github-actions bot commented Jul 3, 2020

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@novellogp64
Copy link

/zephyrproject/zephyr/samples/hello_world$ west build -b esp32 -p
-- west build: making build dir /home/novello/zephyrproject/zephyr/samples/hello_world/build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/novello/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/novello/zephyrproject/zephyr/samples/hello_world
-- Zephyr version: 2.7.99 (/home/novello/zephyrproject/zephyr), build: v2.7.99-748-gb88111bcf01f
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
-- Board: esp32
-- Cache files will be written to: /home/novello/.cache/zephyr
-- Using toolchain: zephyr 0.13.1 (/home/novello/zephyr-sdk)
-- Found dtc: /home/novello/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/novello/zephyrproject/zephyr/boards/xtensa/esp32/esp32.dts
-- Generated zephyr.dts: /home/novello/zephyrproject/zephyr/samples/hello_world/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/novello/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/novello/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/novello/zephyrproject/zephyr/samples/hello_world/build/zephyr/dts.cmake
Parsing /home/novello/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/novello/zephyrproject/zephyr/boards/xtensa/esp32/esp32_defconfig'
Merged configuration '/home/novello/zephyrproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home/novello/zephyrproject/zephyr/samples/hello_world/build/zephyr/.config'
Kconfig header saved to '/home/novello/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/autoconf.h'
CMake Error at /home/novello/zephyrproject/zephyr/cmake/compiler/gcc/target.cmake:10 (message):
C compiler
/home/novello/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/novello/zephyrproject/zephyr/cmake/target_toolchain.cmake:57 (include)
/home/novello/zephyrproject/zephyr/cmake/app/boilerplate.cmake:579 (include)
/home/novello/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/novello/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/novello/zephyrproject/zephyr/samples/hello_world/build -S/home/novello/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=esp32
sorry I'm using zephyr 2.7.99 over ubuntu 20.04 and this is the error ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Documentation bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale
Projects
None yet
Development

No branches or pull requests

5 participants