esp idf 编译报错,提示 MingW 冲突报错,解决思路记录
最早的报错内容:
C:\Users\11349\.espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe c:\Users\11349\esp\v5.4.1\esp-idf\tools\idf_tools.py export --format key-value ERROR: MSys/Mingw is not supported. Please follow the getting started guide of the documentation to set up a supported environment
使用的方式:
1、直接使用 vscode 中的方式,进行 idff 5.4.2 的版本重装是不能够解决问题的。
2、将下载的对应的安装包删除掉
3、其中还报错过一次说虚拟环境安装失败,我也重新将按照网络上的思路:
将 C:\Users\11349\.espressif 目录下的 python_env 重名名为 python_env.bak
4、找到原有环境:C:\Users\11349\esp\v5.4.1\esp-idf ,进入 powershell 环境执行下 .\install.ps1
5、 执行完成之后再执行:.\export.ps1 出现报错信息:
* Identifying shell ... powershell.exe
* Detecting outdated tools in system ... Found tools that are not used by active ESP-IDF version.
For removing old versions of idf-driver use command 'python.exe C:\Users\11349\esp\v5.4.1\esp-idf\tools\idf_tools.py uninstall'
To free up even more space, remove installation packages of those tools.
Use option python.exe C:\Users\11349\esp\v5.4.1\esp-idf\tools\idf_tools.py uninstall --remove-archives.
按照报错信息:执行 :cd .\tools\
再执行:python idf_tools.py uninstall --remove-archives
执行完成之后再进入 vscode 的 esp idf 配置界面
点击: Advanced
然后选择: Configure ESP-IDF Extension

然后选择本地的已有的 esp idf 版本,对应我这边是 5.4.1
执行重装之后:就恢复了正常。
记录一次解决 esp idf 编译报错的问题,此方法对我个人有效,记录一下,以防后续再遇到,也希望能帮上一点忙
浙公网安备 33010602011771号