Espressif IDE don't work in VSCode

BergLoewe
Posts: 17
Joined: Wed Mar 18, 2020 10:34 am

Espressif IDE don't work in VSCode

Postby BergLoewe » Sun Jan 17, 2021 10:46 am

Hello,

I watched the video. But I've many problems with the installation.
The first diffenrence to my trys is, that in the video has an chart "IDF Onboarding". That I can't find. ""Extension ESP-IDF only". I don't know if that has any meaning.
I did play trought the installation nevertheless.

When I build the "hello_world" the VSC hangs up with

Code: Select all

ESP-IDF Custom Terminal
$ cmake
********"******************************o-idf\partition_table && C:\ESP32\.espressif\tools\cmake\3.13.4\bin\cmake.exe -E echo "Partition table binary generated. Contents:" && C:\ESP32\.espressif
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
onfigure step for 'bootloader'
FAILED: bootloader-prefix/src/bootloader-stamp/bootloader-configure 
cmd.exe /C "cd /D C:\Daten\ESP_VSC\hello_world\build\bootloader && C:\ESP32\.espressif\tools\cmake\3.13.4\bin\cmake.exe -DSDKCONFIG=C:/Daten/ESP_VSC/hello_world/sdkconfig -DIDF_PATH=C:/ESP32/esp-idf-v4.1-rc -DIDF_TARGET=esp32 -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\ESP32\.espressif\python_env\idf4.1_py3.8_env\Scripts\python.exe -DEXTRA_COMPONENT_DIRS=C:/ESP32/esp-idf-v4.1-rc/components/bootloader -DLEGACY_INCLUDE_COMMON_HEADERS= -GNinja C:/ESP32/esp-idf-v4.1-rc/components/bootloader/subproject && C:\ESP32\.espressif\tools\cmake\3.13.4\bin\cmake.exe -E touch C:/Daten/ESP_VSC/hello_world/build/bootloader-prefix/src/bootloader-stamp/bootloader-configure"
CMake Error: The source "C:/ESP32/esp-idf-v4.1-rc/components/bootloader/subproject/CMakeLists.txt" does not match the source "C:/Users/User/esp/esp-idf/components/bootloader/subproject/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
ect esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/api/err.c.obj
ject esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/core/def.c.obj
[5/676] Building C object esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/api/netifapi.c.obj
[6/676] Building C object esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/core/mem.c.obj
bject esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/core/ip.c.obj
_idf_lwip.dir/lwip/src/core/inet_chksum.c.objiles/_
.objp/src/apps/netbiosns/netbiosns.c/__idf_lwip.dir
[10/676] Building C object esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/api/netdb.c.obj
[11/676] Building C object esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/api/tcpip.c.obj
ct esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/apps/sntp/sntp.c.obj
object esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/core/init.c.obj
/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/core/dns.c.obj
t esp-idf/lwip/CMakeFiles/__idf_lwip.dir/lwip/src/api/sockets.c.obj
d stopped: subcommand failed.
$ 

Can anyone help with a tip?

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: Espressif IDE don't work in VSCode

Postby ESP_bignacio » Thu Jan 21, 2021 9:13 am

In the extension repository readme.md there are several links to help you:

extension setup documentation

You can just use the ESP-IDF: Configure ESP-IDF extension command to configure the extension.

BergLoewe
Posts: 17
Joined: Wed Mar 18, 2020 10:34 am

Re: Espressif IDE don't work in VSCode

Postby BergLoewe » Thu Jan 21, 2021 5:23 pm

Thank you very much!

I know your Site. But I don't coming forward. I install via express or via advanced, with ESP-IDF from download( I'm afraid, I've 50x downloads of the same) or with ESP-IDF from HDD - every time the same result. See picture1. This is german and says that the VSC can't resolve the Path to the xtensa-esp32-elf-gdb.exe. I think, the VCD needs that to compile. When I try to build then I've the result in the picture2.

This is the content of settings.json

Code: Select all

{
    "idf.espIdfPathWin": "C:\\Users\\User\\esp\\esp-idf",
    "idf.pythonBinPathWin": "C:\\ESP32\\.espressif\\python_env\\idf4.1_py3.9_env\\Scripts\\python.exe",
    "idf.customExtraPaths": "C:\\ESP32\\.espressif\\tools\\xtensa-esp32-elf\\esp-2020r2-8.2.0\\xtensa-esp32-elf\\bin;C:\\ESP32\\.espressif\\tools\\xtensa-esp32s2-elf\\esp-2020r2-8.2.0\\xtensa-esp32s2-elf\\bin;C:\\ESP32\\.espressif\\tools\\esp32ulp-elf\\2.28.51-esp-20191205\\esp32ulp-elf-binutils\\bin;C:\\ESP32\\.espressif\\tools\\esp32s2ulp-elf\\2.28.51-esp-20191205\\esp32s2ulp-elf-binutils\\bin;C:\\ESP32\\.espressif\\tools\\cmake\\3.13.4\\bin;C:\\ESP32\\.espressif\\tools\\openocd-esp32\\v0.10.0-esp32-20191114\\openocd-esp32\\bin;C:\\ESP32\\.espressif\\tools\\ninja\\1.9.0;C:\\ESP32\\.espressif\\tools\\idf-exe\\1.0.1;C:\\ESP32\\.espressif\\tools\\ccache\\3.7",
    "idf.customExtraVars": "{\"OPENOCD_SCRIPTS\":\"C:\\\\ESP32\\\\.espressif\\\\tools\\\\openocd-esp32\\\\v0.10.0-esp32-20191114/openocd-esp32/share/openocd/scripts\",\"IDF_CCACHE_ENABLE\":\"1\"}",
    "terminal.integrated.enableBell": true
}
Attachments
2.png
2.png (195.13 KiB) Viewed 8241 times
1.png
1.png (64.39 KiB) Viewed 8241 times

markjuggles
Posts: 16
Joined: Thu Dec 31, 2020 3:34 am

Re: Espressif IDE don't work in VSCode

Postby markjuggles » Sat Jan 23, 2021 10:40 pm

I couldn't get the Espressif instructions for VS Code to work either but found that Yuri R's instructions do work. Even with his instructions the build in the VS Code terminal is not 100% reliable. The feature that I really want is quick navigation to header files, #define values, and function declarations and that is all working. There are no squiggles under any include. So I just build in a CMD window.

Here is a link to Yuri R's "ESP32 - Getting Started with ESP-IDF using Visual Studio Code [Easiest Method]":

https://www.youtube.com/watch?v=5IuZ-E8Tmhg

kc0skm
Posts: 3
Joined: Thu Dec 17, 2020 6:56 pm

Re: Espressif IDE don't work in VSCode

Postby kc0skm » Thu Feb 11, 2021 5:06 pm

you can try this

You can just use the ESP-IDF: Configure ESP-IDF extension command to configure the extension

from the F2 in Visual code

else this

https://github.com/espressif/vscode-esp ... /issues/27

I struggle with this also -- if you solve it post

It does not affect the build but your right it makes the editor less useful...

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: Espressif IDE don't work in VSCode

Postby ESP_bignacio » Wed Mar 03, 2021 9:51 am

@BergLoewe the error you have is because you have a cache copy of previous build which used a different ESP-IDF directory based on your build output.

Please delete the build folder from this project (or use the extension full clean command) and try to build again.

Who is online

Users browsing this forum: No registered users and 31 guests