乐鑫技术交流
直播中

杨雪

7年用户 1103经验值
私信 关注
[问答]

idf.py set-target esp32c3设置芯片型号失败怎么处理?

按照教程,https://docs.espressif.com/projects/esp ... .html#id27
在 第七步 配置中,

cd %userprofile%esphello_world
idf.py set-target esp32c3
idf.py menuconfig

ESP-IDF 4.2 power shell
代码 中 的idf.py set-target esp32c3 运行错误,运行结果是
PS C:Usersdelleclipse-workspacehello_world> idf.py set-target esp32c3
Usage: C:esp-idftoolsidf.py set-target [OPtiONS] [esp32|esp32s2]
Try 'C:esp-idftoolsidf.py set-target --help' for help.
Error: Invalid value for '[esp32|esp32s2]': invalid choice: esp32c3. (choose from esp32, esp32s2)

提示的是esp-idf没有找到esp32c3这个器件,不知道该怎么处理。明天继续折腾下。
有大佬知道的,请指点下。
                                                                                                                                                                                                                        
               

回帖(1)

贾大林

2024-6-22 15:22:45
根据您提供的错误信息,看起来您在运行 `idf.py set-target esp32c3` 命令时遇到了问题。请按照以下步骤进行故障排除:

1. 确保您已经正确安装了 ESP-IDF。请参考官方文档:https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/getting-started/index.html#step-by-step-installation-guide

2. 确保您的环境变量设置正确。在 Windows 系统上,您需要将 ESP-IDF 的安装路径添加到系统环境变量 `PATH` 中。例如,如果 ESP-IDF 安装在 `C:Usersdelleesp-idf`,那么将此路径添加到 `PATH`。

3. 打开一个新的 PowerShell 窗口,以确保环境变量设置生效。

4. 确保您在项目的根目录下运行命令。在您的示例中,项目名为 `hello_world`,所以您需要先切换到该目录:
   ```
   cd C:Usersdelleeclipse-workspacehello_world
   ```

5. 再次尝试运行 `idf.py set-target esp32c3` 命令:
   ```
   idf.py set-target esp32c3
   ```

6. 如果仍然遇到问题,请尝试更新 ESP-IDF 到最新版本。在项目的根目录下运行以下命令:
   ```
   . $PSScriptRoot/esp-idf/tools/idf_tools.py update
   ```

7. 更新完成后,再次尝试设置目标芯片型号。

如果按照以上步骤仍然无法解决问题,请提供更多详细信息,例如 ESP-IDF 的安装路径、操作系统版本等,以便我们更好地帮助您。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分