esp-idf安装过程中遇到的一些问题

安装过程中遇到了一些问题,最主要是走一步一个error,从下载到powershell都出现了错误
错误如下:

2021-03-21 20:41:53.108   CreateShellLink Destination=C:\Users\52632\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ESP-IDF\ESP-IDF Command Prompt (cmd.exe).lnk Description=Open ESP-IDF Command Prompt (cmd.exe) Command=/k ""D:\D\soft\esp-idf\.espressif\idf_cmd_init.bat" "C:\Users\52632\anaconda3\" "C:\Program Files\Git\cmd\""
2021-03-21 20:41:53.111   CreateShellLink Destination=C:\Users\52632\Desktop\ESP-IDF Command Prompt (cmd.exe).lnk Description=Open ESP-IDF Command Prompt (cmd.exe) Command=/k ""D:\D\soft\esp-idf\.espressif\idf_cmd_init.bat" "C:\Users\52632\anaconda3\" "C:\Program Files\Git\cmd\""
2021-03-21 20:41:53.112   Registering IDF Tools executables in Windows Defender: powershell -ExecutionPolicy ByPass -File "D:\D\soft\esp-idf\.espressif\dist\tools_WD_excl.ps1" -AddExclPath "D:\D\soft\esp-idf\.espressif\*.exe"
2021-03-21 20:41:53.136   ProcStart failed
2021-03-21 20:41:53.136   Done, exit code=-2
2021-03-21 20:41:53.136   --------
2021-03-21 20:41:53.136   Running command: powershell -ExecutionPolicy ByPass -File "D:\D\soft\esp-idf\.espressif\dist\tools_WD_excl.ps1" -AddExclPath "D:\D\soft\esp-idf\.espressif\*.exe"

或者是

 WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
                          Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
                          Traceback (most recent call last):
                            File "C:\Users\52632\anaconda3\lib\runpy.py", line 185, in _run_module_as_main
                              mod_name, mod_spec, code = _get_module_details(mod_name, _Error)

这些主要是环境变量没设置好的问题
需要添加很多环境变量
python的下载
pip的安装
还有powershell
如下:

C:\Users\52632\anaconda3
C:\Users\52632\anaconda3\Library\bin
C:\Users\52632\anaconda3\Scripts
%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

其中的52632是用户名,需要看你的anaconda安装在哪里
解决了环境变量的问题,然后重复安装几次就可以解决总是报错的问题了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在Linux上安装ESP-IDF,您可以按照以下步骤进行操作: 1. 首先,确保您的系统已联网。如果未联网,您可以按照以下步骤设置网络连接: - 编辑->虚拟网络编辑器->更改设置->桥接模式(桥接至电脑IP描述)->应用->确定。 2. 下载Python软件包。您可以使用以下命令安装所需的软件包: ``` sudo apt-get install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 ``` 3. 安装git工具: ``` sudo apt install git ``` 4. 获取ESP-IDF。您可以使用终端命令创建一个新的工程文件夹,然后克隆ESP-IDF仓库: ``` mkdir esp_4.1 cd esp_4.1 git clone -b v4.1 --recursive https://github.com.cnpmjs.org/espressif/esp-idf.git ``` 如果在下载过程遇到错误,您可以在esp-idf目录下执行以下命令来完成初始化: ``` git submodule update --init --recursive ``` 5. 安装其他所需工具。除了ESP-IDF本身,您还需要安装其他工具,如编译器、调试器、Python包等。 6. 将hello_world示例拷贝到esp_4.1文件夹下: ``` cp esp-idf/examples/get-started/hello_world/ ./ -r ``` 7. 进入hello_world示例并编译代码: ``` cd hello_world idf.py build ``` 8. 使用USB线将ESP32模组连接到电脑。您可以使用以下命令查看下载端口: ``` ls /dev/tty* ``` 您可以找到一个类似于`/dev/ttyUSB0`的端口,这就是下载端口号。 9. 最后,将esp-idf环境加入环境变量。您可以将以下命令复制并粘贴到shell配置文件(如.profile、.bashrc、.zprofile等): ``` alias get_idf='. $HOME/esp_4.1/esp-idf/export.sh' ``` 确保文件路径正确。保存并关闭文件后,重启虚拟机或使用以下命令刷新配置文件: ``` source .profile ``` 现在,您已经成功安装并配置了ESP-IDF环境。您可以运行示例代码并开始开发ESP32应用程序了。<span class="em">1</span><span class="em">2</span><span class="em">3</span><span class="em">4</span>

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值