[ESP32-Audio-Kit音频开发板测评]——(1):基于vs code开发环境选择
<div class='showpostmsg'> 本帖最后由 chg0823 于 2021-10-19 17:45 编辑<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">首先感谢</span></span></span><span style="overflow-wrap:break-word"><span style="font-variant-ligatures:normal"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="overflow-wrap:break-word">Eeworld</span></span></span></span></span><span style="overflow-wrap:break-word"><span style="font-variant-ligatures:normal"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="overflow-wrap:break-word">和安信可提供的</span><span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="font-family:"Calibri",sans-serif"><span style="color:#333333">ESP32-Audio-Kit</span></span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">开发板,</span></span></span></span></span></span></span>在进行开发板的学习和测试之前,都需要经历的的就是<span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="font-family:"Calibri",sans-serif"><span style="color:#333333">ESP32-Audio-Kit</span></span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">开发环境的安装。在选择发环境的时候,参考网上的说法(例如:<a href="https://bbs.eeworld.com.cn/thread-1180250-1-1.html" style="color:#0563c1; text-decoration:underline">三、吐槽一下开发环境的安装</a>)以及自身的实际情况,我更倾向于使用VS code 。</span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"> <span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">以下是我开发环境搭建的过程(走到坑里了,浪费的点时间):</span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">1</span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">、安装ESP-IDF</span></span></span></span></span></p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">在乐鑫官网上下载ESP-IDF工具安装器的时候,经常突然中断,然后下载速度就变成0KB/s,之后又重新下载。所以我将下载的上传至了百度云,分享给大家。</span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="color:#333333"><a href="https://docs.espressif.com/projects/esp-idf/zh_CN/release-v4.0/get-started/windows-setup.html#esp-idf" style="color:#0563c1; text-decoration:underline">乐鑫官网</a></span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">的<a href="https://dl.espressif.com/dl/esp-idf/?idf=4.0" style="color:#0563c1; text-decoration:underline">ESP-IDF 工具安装器</a>:<a href="https://dl.espressif.com/dl/esp-idf/?idf=4.0" style="color:#0563c1; text-decoration:underline">https://dl.espressif.com/dl/esp-idf/?idf=4.0</a></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">百度云上的ESP-IDF链接:https://pan.baidu.com/s/1YURSI07yNFGL217AdOXz4A </span></span></span></span></span></p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">提取码:uno5 </span></span></span></span></span></p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">在安装过程中,我发现该软件只提供了2个版本的ESP-IDF供我们选择,如下图所示。而且,切换其他版本的过程好像挺繁琐的,我没有尝试过。(如果有简单的方法大家可以给我分享一下下 ,谢谢)</span></span></span></span></span></p>
<p align="center" style="text-align:center; text-indent:21.0pt"> </p>
<p align="left" style="text-align:left"><span style="font-size:10.5pt"><span style="font-family:等线"><span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">2</span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">、VS code 里安装Espressif IDF以及配置</span></span></span></span></span></p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">参考:<a href="https://bbs.eeworld.com.cn/thread-1178635-1-1.html" style="color:#0563c1; text-decoration:underline">之一:基于vs code的esp-idf及esp-adf开发环境搭建</a> <a href="https://bbs.eeworld.com.cn/thread-1178635-1-1.html" style="color:#0563c1; text-decoration:underline">https://bbs.eeworld.com.cn/thread-1178635-1-1.html</a></span></span></span></span></span></p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">在安装过程中遇到的坑:</span></span></span></span></span></p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">1</span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">)在安装时由于Espressif IDF的依赖项是C/C++的环境,需要安装C/C++的环境,如下图所示;</span></span></span></span></span></p>
<p align="center" style="margin-left:32px; text-align:center; text-indent:0cm"> <span style="font-size:10.5pt"><span style="font-family:等线"> <span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">2</span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">)下图的配置界面的时候,我一开始选择了第三项是本地的存在的开发环境即上述1中的安装的ESP-IDF。这里有个坑,根据ESP-ADF的介绍,ESP-ADF不支持最新的<a name="_Hlk85555790">ESP-IDF开发环境</a>。</span></span></span></span></span></p>
<p align="center" style="text-align:center; text-indent:21.0pt"> </p>
<p align="left" style="text-align:left; text-indent:24.0pt"><span style="font-size:10.5pt"><span style="font-family:等线"><span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">ESP-ADF</span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">支持的ESP-IDF开发环境如下图:</span></span></span></span></span></p>
<p align="center" style="text-align:center"> </p>
<p align="left" style="text-align:left; text-indent:24.0pt"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">因此,上述应选择合适的版本。</span></span></span></span></span></p>
<p align="left" style="text-align:left; text-indent:24.0pt"><span style="font-size:10.5pt"><span style="font-family:等线"><span lang="EN-US" style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">3</span></span></span><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">)配置ESP-ADF时需要在VS code左下角管理中扩展的ESP-IDF进行设置</span></span></span></span></span></p>
<p align="center" style="text-align:center; text-indent:21.0pt"> </p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">在ESP-IDF的settings.json中添加<b>idf.espAdfPath+“ESP-ADF下载路径”</b>和<b>idf.espAdfPathWin+“ESP-ADF下载路径”</b>,然后保存重启VS code,如图所示。</span></span></span></span></span></p>
<p align="center" style="text-align:center"> </p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt"><span style="background:white"><span style="color:#333333">现在选择ESP-ADF库里的音频例程,如图所示。如果ESP-IDF的版本支持ESP-ADF,编译例程应该不会报错了。</span></span></span></span></span></p>
<p align="center" style="text-align:center"> </p>
<p align="center" style="text-align:center"> </p>
<p align="center" style="text-align:center"> </p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
<p style="text-indent:24.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:等线"><span style="font-size:12.0pt">第一次写这种东西,写的不好的地方请大家见谅!!!谢谢!!!</span></span></span></p>
</div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script> <p>Windows + VS code 开发环境搭建,在配置C/C++编译和调试环境。如果不需要用到调试器,可只用code runner运行即可。</p>
<p>第一次做成这样已经很好了,加油呀,下次一定更精彩。</p>
页:
[1]