我正在尝试将idf.py作为CMD命令运行我设置了我的env变量,但它仍然无法识别

问题描述

我已设置环境变量以使用esp32工具链。核心功能之一是idf.py,需要从终端进行访问。

如果我尝试使用VS Code访问它

idf.py : The term 'idf.py' is not recognized as the name of a cmdlet,function,script file,oroperable program. Check the spelling of the 
name,or if a path was included,verify that the path is correct and try again.
At line:1 char:1
+ idf.py
+ ~~~~~~
+ CategoryInfo          : ObjectNotFound: (idf.py:String) [],CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Here是我的 echo%path%的图片,您可以看到我明确声明idf.py.exe是路径。不幸的是,我很困,不确定下一步是什么。

解决方法

有同样的问题。通过确保我的 idf.espIdfPath(转到文件,然后是首选项,然后是设置,然后搜索“idf.espIdfPath”)指向正确的环境变量(我的指向系统环境变量中的 IDF_TOOLS,但应该是指向 IDF_TOOLS_PATH)。修复了这个问题,然后通过键入“code”从 ESP-IDF 终端重新启动 vscode。从项目目录。这似乎奏效了。最坏的情况,我承认这不是理想的选择,也许重新安装 vscode 和所有需要的扩展?

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...