日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【问题解决】ESP32报错:make: xtensa-esp32-elf-gcc: Command not found

發布時間:2024/3/12 编程问答 72 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【问题解决】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的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。