idf.py set-target esp32c3 设置芯片型号失败

lpxvcl
Posts: 11
Joined: Mon Jun 07, 2021 12:59 pm

idf.py set-target esp32c3 设置芯片型号失败

Postby lpxvcl » Mon Jun 07, 2021 1:06 pm

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

cd %userprofile%\esp\hello_world
idf.py set-target esp32c3
idf.py menuconfig

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

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

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: idf.py set-target esp32c3 设置芯片型号失败

Postby ESP_Gargamel » Tue Jun 08, 2021 6:14 am

IDF 在 v4.3 之后才支持 C3,请使用 release/v4.3 分支。另外,v4.3 release 版本,预计本周发布,建议使用。

axellin
Posts: 199
Joined: Mon Sep 17, 2018 9:09 am

Re: idf.py set-target esp32c3 设置芯片型号失败

Postby axellin » Tue Jun 08, 2021 6:24 am

ESP_Gargamel wrote:
Tue Jun 08, 2021 6:14 am
IDF 在 v4.3 之后才支持 C3,请使用 release/v4.3 分支。另外,v4.3 release 版本,预计本周发布,建议使用。
Once espressif-bot closed the issues, I have no way to trace if a commit will apply to the impacted branches.
I'm worry some of the trivial fixes missed the v4.3 release.

https://github.com/espressif/esp-idf/co ... 130252e1e2
https://github.com/espressif/esp-idf/co ... c47545c9f2
https://github.com/espressif/esp-idf/co ... ad35807d77

Any chance to check it?
Thanks.

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: idf.py set-target esp32c3 设置芯片型号失败

Postby ESP_Gargamel » Tue Jun 08, 2021 6:45 am

axellin wrote:
Tue Jun 08, 2021 6:24 am
ESP_Gargamel wrote:
Tue Jun 08, 2021 6:14 am
IDF 在 v4.3 之后才支持 C3,请使用 release/v4.3 分支。另外,v4.3 release 版本,预计本周发布,建议使用。
Once espressif-bot closed the issues, I have no way to trace if a commit will apply to the impacted branches.
I'm worry some of the trivial fixes missed the v4.3 release.

https://github.com/espressif/esp-idf/co ... 130252e1e2
https://github.com/espressif/esp-idf/co ... c47545c9f2
https://github.com/espressif/esp-idf/co ... ad35807d77

Any chance to check it?
Thanks.
It's a good point, normally we fix the issues in the master branch firstly, then backport to other release branches, maybe we can let the bot update the status if the backport is done. Will check internally. Thanks.

lpxvcl
Posts: 11
Joined: Mon Jun 07, 2021 12:59 pm

Re: idf.py set-target esp32c3 设置芯片型号失败

Postby lpxvcl » Tue Jun 08, 2021 12:39 pm

下载了4.3版本的分支,使用powershell运行,还是不能更改设备型号。好像就是idf.py这个文件跑不起来,
有没有大佬能指导一下。

PS D:\> cd .\esp-workspace\
PS D:\esp-workspace> cd .\hello_world\
PS D:\esp-workspace\hello_world> ls


目录: D:\esp-workspace\hello_world


Mode LastWriteTime Length Name
---- ------------- ------ ----
da---- 2021/6/8 17:12 main
-a---- 2021/6/8 16:04 241 CMakeLists.txt
-a---- 2021/6/8 16:04 683 example_test.py
-a---- 2021/6/8 16:04 190 Makefile
-a---- 2021/6/8 16:04 2387 README.md


PS D:\esp-workspace\hello_world> idf.py set-target eap32c3
Traceback (most recent call last):
File "D:\esp-idf\tools\idf.py", line 47, in <module>
from idf_py_actions.tools import executable_exists, idf_version, merge_action_lists, realpath # noqa: E402
File "D:\esp-idf\tools\idf_py_actions\tools.py", line 7, in <module>
import click
ModuleNotFoundError: No module named 'click'

PS D:\esp-workspace\hello_world> idf.py menuconfig
Traceback (most recent call last):
File "D:\esp-idf\tools\idf.py", line 47, in <module>
from idf_py_actions.tools import executable_exists, idf_version, merge_action_lists, realpath # noqa: E402
File "D:\esp-idf\tools\idf_py_actions\tools.py", line 7, in <module>
import click
ModuleNotFoundError: No module named 'click'
PS D:\esp-workspace\hello_world>

lpxvcl
Posts: 11
Joined: Mon Jun 07, 2021 12:59 pm

Re: idf.py set-target esp32c3 设置芯片型号失败

Postby lpxvcl » Tue Jun 08, 2021 1:03 pm

补充下环境变量设置是成功的

PS C:\esp-idf> ./install.ps1
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, riscv32-esp-elf, esp32ulp-elf, esp32s2ulp-elf, cmake, openocd-esp32, ninja, idf-exe, ccache, dfu-util, idf-python-wheels
Skipping xtensa-esp32-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2020r3-8.4.0 (already installed)
Skipping riscv32-esp-elf@1.24.0.123_64eb9ff-8.4.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping cmake@3.16.4 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20210401 (already installed)
Skipping ninja@1.10.2 (already installed)
Skipping idf-exe@1.0.1 (already installed)
Skipping ccache@3.7 (already installed)
Skipping dfu-util@0.9 (already installed)
Skipping idf-python-wheels@idf4.3_py3.9_2021-01-07 (already installed)
PS C:\esp-idf> ./export.ps1
Setting IDF_PATH: C:\esp-idf
Adding ESP-IDF tools to PATH...
fatal: No names found, cannot describe anything.
WARNING: Git describe was unsuccessul: Command '['git', 'describe']' returned non-zero exit status 128.

Name Value
---- -----
OPENOCD_SCRIPTS C:\Users\dell\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\sha...
IDF_CCACHE_ENABLE 1
IDF_PYTHON_ENV_PATH C:\Users\dell\.espressif\python_env\idf4.3_py3.7_env

Added to PATH
-------------
C:\esp-idf\components\esptool_py\esptool
C:\esp-idf\components\app_update
C:\esp-idf\components\espcoredump
C:\esp-idf\components\partition_table
C:\Users\dell\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin
C:\Users\dell\.espressif\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin
C:\Users\dell\.espressif\tools\xtensa-esp32s3-elf\esp-2020r3-8.4.0\xtensa-esp32s3-elf\bin
C:\Users\dell\.espressif\tools\riscv32-esp-elf\1.24.0.123_64eb9ff-8.4.0\riscv32-esp-elf\bin
C:\Users\dell\.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin
C:\Users\dell\.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin
C:\Users\dell\.espressif\tools\cmake\3.16.4\bin
C:\Users\dell\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\bin
C:\Users\dell\.espressif\tools\ninja\1.10.2\
C:\Users\dell\.espressif\tools\idf-exe\1.0.1\
C:\Users\dell\.espressif\tools\ccache\3.7\
C:\Users\dell\.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64
C:\Users\dell\.espressif\python_env\idf4.3_py3.7_env\Scripts
C:\esp-idf\tools
%PATH%
Checking if Python packages are up to date...
The following Python requirements are not satisfied:
click>=7.0
pyserial>=3.0
future>=0.15.2
cryptography>=2.1.4
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
gdbgui==0.13.2.0
pygdbmi<=0.9.0.2
python-socketio<5
kconfiglib==13.7.1
reedsolo>=1.5.3,<=1.5.4
bitstring>=3.1.6
ecdsa>=0.16.0
construct==2.10.54
esp-windows-curses; sys_platform == 'win32'
To install the missing packages, please run "C:\esp-idf\install.bat"
Diagnostic information:
IDF_PYTHON_ENV_PATH: C:\Users\dell\.espressif\python_env\idf4.3_py3.7_env
Python interpreter used: C:\Users\dell\.espressif\python_env\idf4.3_py3.7_env\Scripts\python.exe

Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: idf.py set-target esp32c3 设置芯片型号失败

Postby ESP_Gargamel » Wed Jun 09, 2021 1:51 am

你再执行一下 ./install.ps1,似乎 python 的依赖没有装好,在 ./export.ps1 时有报错。

lpxvcl
Posts: 11
Joined: Mon Jun 07, 2021 12:59 pm

Re: idf.py set-target esp32c3 设置芯片型号失败

Postby lpxvcl » Wed Jun 09, 2021 3:40 am

尝试重新执行export.ps1,还是问题依旧。你说的报错是什么报错,具体是哪里有问题呢,请指点下。

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: idf.py set-target esp32c3 设置芯片型号失败

Postby ESP_Gargamel » Wed Jun 09, 2021 5:18 am

Code: Select all

The following Python requirements are not satisfied:
click>=7.0
pyserial>=3.0
future>=0.15.2
cryptography>=2.1.4
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
gdbgui==0.13.2.0
pygdbmi<=0.9.0.2
python-socketio<5
kconfiglib==13.7.1
reedsolo>=1.5.3,<=1.5.4
bitstring>=3.1.6
ecdsa>=0.16.0
construct==2.10.54
esp-windows-curses; sys_platform == 'win32'
To install the missing packages, please run "C:\esp-idf\install.bat"
export 的时候会去 check python packages,这里有些不满足,所以你重新执行下 ./install.ps1,再 ./export.ps1。
重新提供下 ./install.ps1 时的输出信息。

另外,你环境是如何搭建的?可以使用 https://dl.espressif.com/dl/esp-idf/ 来搭建,esp-idf 使用 existing ESP-IDF directory 来指定你本地的 esp-idf 路径,这样可以使用 release/v4.3 分支。

Who is online

Users browsing this forum: No registered users and 192 guests