栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Ubuntn环境下安装ESP 音频框架时出现Failed to resolve component ‘jsmn‘.问题(已解决)

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Ubuntn环境下安装ESP 音频框架时出现Failed to resolve component ‘jsmn‘.问题(已解决)

前言

提示:这里可以添加本文要记录的大概内容:

使用VMware虚拟机,操作系统为Ubuntu 20.04.4 LTS。已经安装好ESP-idf开发环境,并使用一段时间。在尝试安装esp-adf音频开发框架时,发生错误,以下是问题描述与解决方案。


提示:以下是本篇文章正文内容,下面案例可供参考

一、问题描述

根据乐鑫官方提供的操作方法进行音频开发框架的安装,官方网址如下:

https://docs.espressif.com/projects/esp-adf/zh_CN/latest/get-started/index.html

在进行到第7步进行配置时,出现如下报错信息:

eng-jie@ubuntu:~/esp/play_mp3_control$ idf.py menuconfig
Executing action: menuconfig
Running cmake in directory /home/feng-jie/esp/play_mp3_control/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/feng-jie/esp/play_mp3_control"...
fatal: 不是 git 仓库(或者任何父目录):.git
-- IDF_TARGET not set, using default target: esp32
-- Found Git: /usr/bin/git (found version "2.25.1") 
-- Component directory /home/feng-jie/esp/esp-adf/components/esp-adf-libs does not contain a CMakeLists.txt file. No component will be added
-- Component directory /home/feng-jie/esp/esp-adf/components/esp-sr does not contain a CMakeLists.txt file. No component will be added
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/feng-jie/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/feng-jie/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/feng-jie/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/feng-jie/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/feng-jie/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
CMake Error at /home/feng-jie/esp/esp-idf/tools/cmake/build.cmake:197 (message):
  Failed to resolve component 'jsmn'.
Call Stack (most recent call first):
  /home/feng-jie/esp/esp-idf/tools/cmake/build.cmake:231 (__build_resolve_and_add_req)
  /home/feng-jie/esp/esp-idf/tools/cmake/build.cmake:512 (__build_expand_requirements)
  /home/feng-jie/esp/esp-idf/tools/cmake/project.cmake:422 (idf_build_process)
  CMakeLists.txt:10 (project)


-- Configuring incomplete, errors occurred!
See also "/home/feng-jie/esp/play_mp3_control/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
二、解决方案 1.问题分析

此问题有可能是ESP idf版本过高导致(网上冲浪得知),在乐鑫官网寻找后发现:

我所使用的音频框架为ESP-ADF Master,但是不支持我所使用的 ESP-IDF Master版本,所以需要更换IDF版本。

2.更换 ESP-idf 版本
1.在官网查找后确定,最新的稳定版本为v4.4.1版本

2.在终端中输入以下代码,将版本更换到最新的稳定版本
cd esp/esp-idf
git checkout v4.4.1
更新成功后显示如下:

2重新安装tools工具
cd ~/esp/esp-idf
./install.sh esp32
或使用git进行更新
git submodule update --init --recursive
最后再通过 **idf.py --version** 指令再次查询当前版本信息。

3.最后测试
1.最后再按照开头网址中的步骤重新安装音频框架,成功进入设置界面。


总结

总结:
该问题的出现主要就是ESP idf版本不符,更换版本即可。同时,如果在配置过程中,出现jinja2<3.1的问题(我出现过,但是当时没考虑到是版本问题),也可以直接查看自己的版本是否对应, 若不对应,直接更换版本即可。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/828054.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号