【问题解决】ESP32报错:make: xtensa-esp32-elf-gcc: Command not found
生活随笔
收集整理的這篇文章主要介紹了
【问题解决】ESP32报错:make: xtensa-esp32-elf-gcc: Command not found
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題:
make menuconfig執行報錯:
Python requirements from /home/pjw/ESP32/esp-idf/requirements.txt are satisfied. DEFCONFIG MENUCONFIG*** End of the configuration. *** Execute 'make' to start the build or try 'make help'.GENCONFIG make: xtensa-esp32-elf-gcc: Command not found expr: 語法錯誤 Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER. App "hello-world" version: 1 make: xtensa-esp32-elf-gcc: Command not found expr: 語法錯誤 /bin/sh: xtensa-esp32-elf-gcc:未找到命令 /bin/sh: xtensa-esp32-elf-gcc:未找到命令分析:
執行 ./install.sh 的LOG:
Installing ESP-IDF tools Installing tools: xtensa-esp32-elf, esp32ulp-elf, openocd-esp32 Installing xtensa-esp32-elf@esp-2020r3-8.4.0 Downloading xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz to /home/pjw/.espressif/dist/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz.tmp Done Extracting /home/pjw/.espressif/dist/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz to /home/pjw/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0 Installing esp32ulp-elf@2.28.51.20170517 Downloading binutils-esp32ulp-linux64-2.28.51-esp32ulp-20180809.tar.gz to /home/pjw/.espressif/dist/binutils-esp32ulp-linux64-2.28.51-esp32ulp-20180809.tar.gz.tmp Done Extracting /home/pjw/.espressif/dist/binutils-esp32ulp-linux64-2.28.51-esp32ulp-20180809.tar.gz to /home/pjw/.espressif/tools/esp32ulp-elf/2.28.51.20170517 Installing openocd-esp32@v0.10.0-esp32-20200709 Downloading openocd-esp32-linux64-0.10.0-esp32-20200709.tar.gz to /home/pjw/.espressif/dist/openocd-esp32-linux64-0.10.0-esp32-20200709.tar.gz.tmp Done Extracting /home/pjw/.espressif/dist/openocd-esp32-linux64-0.10.0-esp32-20200709.tar.gz to /home/pjw/.espressif/tools/openocd-esp32/v0.10.0-esp32-20200709執行 . ./export.sh 的LOG
Adding ESP-IDF tools to PATH... Checking if Python packages are up to date... Python requirements from /home/pjw/ESP32/esp-idf/requirements.txt are satisfied. Added the following directories to PATH:/home/pjw/ESP32/esp-idf/components/esptool_py/esptool/home/pjw/ESP32/esp-idf/components/espcoredump/home/pjw/ESP32/esp-idf/components/partition_table//home/pjw/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/home/pjw/.espressif/tools/esp32ulp-elf/2.28.51.20170517/esp32ulp-elf-binutils/bin/home/pjw/.espressif/tools/openocd-esp32/v0.10.0-esp32-20200709/openocd-esp32/bin/home/pjw/.espressif/python_env/idf4.0_py3.8_env/bin/home/pjw/ESP32/esp-idf/tools Done! You can now compile ESP-IDF projects. Go to the project directory and run:idf.py build發現xtensa-esp32-elf已經下載并且添加到 PATH 了。
查詢 PATH 環境,沒有找到:
解決:
手動添加環境變量
vim ~/.bashrc export PATH=~/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin:$PATH source ~/.bashrc echo $PATH查詢版本驗證:
xtensa-esp32-elf-gcc -v環境添加成功:
Using built-in specs. COLLECT_GCC=xtensa-esp32-elf-gcc COLLECT_LTO_WRAPPER=/home/pjw/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/lto-wrapper Target: xtensa-esp32-elf Configured with: /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf --prefix=/builds/idf/crosstool-NG/builds/xtensa-esp32-elf --with-local-prefix=/builds/idf/crosstool-NG/builds/xtensa-esp32-elf/xtensa-esp32-elf --with-headers=/builds/idf/crosstool-NG/builds/xtensa-esp32-elf/xtensa-esp32-elf/include --with-newlib --enable-threads=no --disable-shared --with-pkgversion='crosstool-NG esp-2020r3' --disable-__cxa_atexit --enable-cxx-flags=-ffunction-sections --disable-libgomp --disable-libmudflap --disable-libmpx --disable-libssp --disable-libquadmath --disable-libquadmath-support --with-gmp=/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/buildtools --with-mpfr=/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/buildtools --with-mpc=/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/buildtools --with-isl=/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/buildtools --enable-lto --enable-target-optspace --without-long-double-128 --disable-nls --enable-multiarch --enable-languages=c,c++ --disable-libstdcxx-verbose --enable-threads=posix --enable-gcov-custom-rtio --enable-libstdcxx-time=yes Thread model: posix gcc version 8.4.0 (crosstool-NG esp-2020r3)再次執行make menuconfig成功:
Toolchain path: /home/pjw/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: esp-2020r3 Compiler version: 8.4.0 Python requirements from /home/pjw/ESP32/esp-idf/requirements.txt are satisfied. MENUCONFIG*** End of the configuration. *** Execute 'make' to start the build or try 'make help'.Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER. App "hello-world" version: 1總結
以上是生活随笔為你收集整理的【问题解决】ESP32报错:make: xtensa-esp32-elf-gcc: Command not found的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 1天熟记----数据库
- 下一篇: 奇迹暖暖登录一直显示服务器满,奇迹暖暖搭