我是靠谱客的博主 漂亮黄豆,最近开发中收集的这篇文章主要介绍【问题解决】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
环境,没有找到:
echo $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问题:分析:解决:的全部内容,希望文章能够帮你解决【问题解决】ESP32报错:make: xtensa-esp32-elf-gcc: Command not found问题:分析:解决:所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复