关于使用vscode新建编译环境的问题

xuyin_he
Posts: 9
Joined: Sat May 22, 2021 2:35 am

关于使用vscode新建编译环境的问题

Postby xuyin_he » Sat May 22, 2021 3:14 am

各位大佬求助一下。新人小白刚接触。
1.本人参照官网教程快速入门走了一遍,确实可以使用终端可以把ESP32_S2的helloworld和blink编译,烧录进。
2.然后按照bilibili上的视频,按照vscode编译环境。首先发现视频上的插件版本和 当前的使用的插件版本是有点区别。
3.本人先使用esp-idf-tools-setup-offline-2.8.exe 已安装的情况进行VSCODE配置。拷贝例程直接就报 “头文件”的问题,然后转变方向。
4.先再卸载之前安装的esp-idf-tools,删除之前的idf文件夹和tools文件夹,恢复到原来的状态。
5.先安装Git-2.31.1-64-bit.exe、python-3.9.5-amd64.exe默认安装,VSCODE插件选择在线高级安装,等待下载安装,期间出现几次错误,重新继续安装得到安装完成。
6.拷贝例程进行编译。再次报错。如下:
Executing task: cmake -G Ninja .. <

-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
The following Python requirements are not satisfied:
pyserial>=3.0
cryptography>=2.1.4
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
gdbgui==0.13.2.0
reedsolo>=1.5.3,<=1.5.4
bitstring>=3.1.6
ecdsa>=0.16.0
esp-windows-curses; sys_platform == 'win32'
To install the missing packages, please run "c:\Users\Administrator\esp\esp-idf\install.bat"
Diagnostic information:
IDF_PYTHON_ENV_PATH: c:\Users\Administrator\.espressif\python_env\idf4.2_py3.9_env
Python interpreter used: c:\Users\Administrator\.espressif\python_env\idf4.2_py3.9_env\Scripts\python.exe
CMake Error at C:/Users/Administrator/esp/esp-idf/tools/cmake/build.cmake:271 (message):
Some Python dependencies must be installed. Check above message for
details.
Call Stack (most recent call first):
C:/Users/Administrator/esp/esp-idf/tools/cmake/build.cmake:397 (__build_check_python)
C:/Users/Administrator/esp/esp-idf/tools/cmake/project.cmake:395 (idf_build_process)
CMakeLists.txt:6 (project)

请问大佬问题出在哪里?搞了3天了,头有点大了。然后又去使用esp-idf-tools-setup-online-2.8.exe在线重新安装了tools,使用终端调用vscode创建的例程是可以编译的。但是vscode就是不行。 :oops: :oops:


-- Configuring incomplete, errors occurred!
See also "C:/Users/Administrator/esp/esp-idf/blink/build/CMakeFiles/CMakeOutput.log".
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command cmake -G Ninja .." terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

xuyin_he
Posts: 9
Joined: Sat May 22, 2021 2:35 am

Re: 关于使用vscode新建编译环境的问题

Postby xuyin_he » Sat May 22, 2021 1:26 pm

此贴暂时终结。
不要使用3.9.5的python!!!
不要使用3.9.5的python!!!
不要使用3.9.5的python!!!
目前使用了3.7.9 编译通过了。但是出现另外问题。另开贴。

bulazhang
Posts: 16
Joined: Wed Mar 25, 2020 2:31 pm

Re: 关于使用vscode新建编译环境的问题

Postby bulazhang » Mon May 24, 2021 2:33 am

我发现,Python安装时(我用的是3.9.2),不能用默认方式,会受Windows权限的约束,ESP-IDF中一些.py执行时有问题
超喜欢嵌入式的70后老猿人

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

Re: 关于使用vscode新建编译环境的问题

Postby ESP_Gargamel » Mon May 24, 2021 2:36 am

在使用 python 3.9 时,你在 VSC 下 Ctrl + Shift + P 进入命令面板,选择 ESP-IDF: Install ESP-IDF extension Python Packages 重新装下 python 包呢?

xuyin_he
Posts: 9
Joined: Sat May 22, 2021 2:35 am

Re: 关于使用vscode新建编译环境的问题

Postby xuyin_he » Mon May 24, 2021 5:07 am

是的,之前反复安装,命令面板调出重新执行3.9.5也是不行的。3.7.9或者3.8.10都是没问题。

xuyin_he
Posts: 9
Joined: Sat May 22, 2021 2:35 am

Re: 关于使用vscode新建编译环境的问题

Postby xuyin_he » Mon May 24, 2021 5:09 am

ESP_Gargamel wrote:
Mon May 24, 2021 2:36 am
在使用 python 3.9 时,你在 VSC 下 Ctrl + Shift + P 进入命令面板,选择 ESP-IDF: Install ESP-IDF extension Python Packages 重新装下 python 包呢?
是的,之前反复安装,命令面板调出重新执行3.9.5也是不行的。或是Install ESP-IDF extension Python Packages 都一样的。
3.7.9或者3.8.10都是没问题。

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

Re: 关于使用vscode新建编译环境的问题

Postby ESP_Gargamel » Mon May 24, 2021 12:19 pm

使用 3.9.5 是有问题,会让内部看一下,请先使用 3.8.10。


xuyin_he
Posts: 9
Joined: Sat May 22, 2021 2:35 am

Re: 关于使用vscode新建编译环境的问题

Postby xuyin_he » Tue May 25, 2021 7:30 am

手动配置么IDF_TOOLS_PATH和 JSON么?这个倒是并没有,不管针对3.8.10还是 3.9.5。

ming191
Posts: 46
Joined: Mon May 31, 2021 6:27 am

Re: 关于使用vscode新建编译环境的问题

Postby ming191 » Mon May 31, 2021 6:29 am

你好,我也想学学如何搭建这个环境,能否加加你的微信,共同进步一下。

Who is online

Users browsing this forum: Google [Bot] and 87 guests