Finally I'm interested in ESP32-IDF, with Visual Studio Code extension

User avatar
jgustavoam
Posts: 134
Joined: Thu Feb 01, 2018 2:43 pm
Location: Belo Horizonte , Brazil
Contact:

Finally I'm interested in ESP32-IDF, with Visual Studio Code extension

Postby jgustavoam » Wed Jun 24, 2020 12:13 pm

In 2018, I made an tutorial - how to use ESP32-IDF (in portuguese). And I was very disappointed.
https://jgamblog.wordpress.com/2018/02/ ... esp-idf-4/

Today makers don't want to use line commands, many complex tools with dozen of parameters.
He wants a fast, efficient and simple to use IDE. Arduino IDE is very popular worldwide, because of that.

I recently decided to find out if there is anything new with the IDF. And I found the Visual Studio Code IDF framework!
Pretty visual indeed. And yesterday I decided to try it out.

Where's the simple tutorial for implementing IDF with VS Code? I did not find. I found in Visual Studio Code, installing the ESPRESSIF IDF extension.

So I compiled an example and it works! Slowly to compile yet, but it is acceptable. :D

Congratullations ESPRESSIF!

ESP-IDF Visual Studio Code Extension at GitHub
https://github.com/espressif/vscode-esp-idf-extension

ESP-IDF Visual Studio Code Extension
https://marketplace.visualstudio.com/it ... -extension
Retired IBM Brasil
Electronic hobbyist since 1976.

User avatar
jgustavoam
Posts: 134
Joined: Thu Feb 01, 2018 2:43 pm
Location: Belo Horizonte , Brazil
Contact:

Re: Finally I'm interested in ESP32-IDF, with Visual Studio Code extension

Postby jgustavoam » Fri Jul 10, 2020 12:47 am

I can not believe!
I can't compile anymore. After several reinstallations of the Espressif IDF extensions in Visual Studio Code.
Many errors and errors and errors.
I fix an error and try to compile. And new error occurs.

For example :

Code: Select all

-- The C compiler identification is Clang 9.0.0
CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:802 (message):
  The Clang compiler tool

    "C:/Program Files/LLVM/bin/clang.exe"

  targets the MSVC ABI but has a GNU-like command-line interface.  This is
  not supported.  Use 'clang-cl' instead, e.g.  by setting 'CC=clang-cl' in
  the environment.  Furthermore, use the MSVC command-line environment.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:113 (CMAKE_DIAGNOSE_UNSUPPORTED_CLANG)
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "C:/Users/jgust/esp-idf/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/jgust/esp-idf/build/CMakeFiles/CMakeError.log".
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.
CRAZY !! CMakeError.log

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files/LLVM/bin/clang.exe
Build flags:
Id flags:

The output was:
1
clang: warning: unable to find a Visual Studio installation; try running Clang from a developer command prompt [-Wmsvc-not-found]
clang: error: unable to execute command: program not executable
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Retired IBM Brasil
Electronic hobbyist since 1976.

User avatar
jgustavoam
Posts: 134
Joined: Thu Feb 01, 2018 2:43 pm
Location: Belo Horizonte , Brazil
Contact:

Re: Finally I'm interested in ESP32-IDF, with Visual Studio Code extension

Postby jgustavoam » Fri Jul 10, 2020 1:26 am

Trying to fix
https://github.com/espressif/vscode-esp-idf-extension

Uninstalling the plugin
In Visual Studio Code, go to the Extensions tab.
Click on the EspressifIDF extension lower right icon.
Click Uninstall.
Go to your ${VSCODE_EXTENSION_DIR} and make sure to delete the Espressif IDF plugin folder.

C:\Users\jgust\.vscode\extensions

I deleted everything and did the instalallation again!
Now running again.
I hope this " strange thing" does not happen again.
Retired IBM Brasil
Electronic hobbyist since 1976.

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

Re: Finally I'm interested in ESP32-IDF, with Visual Studio Code extension

Postby ESP_bignacio » Fri Jul 10, 2020 2:22 am

Olá @jgustavoam !

What seems to be the issue with ESP-IDF extension for Visual Studio Code? The extension needs to be configured as shown in https://github.com/espressif/vscode-esp ... how-to-use to set ESP-IDF and required ESP-IDF Tools such as the Xtensa ESP32 Toolchain (which is used for build along with CMake) and others.

You seem to be using Clang compiler but we want it to use the Xtensa's GDB for this. Maybe another build cache or some cmake variables to prefer Clang?

Did you have trouble setting the extension ? If so please share your extension log located in
- Windows: `%USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log`
- Linux & MacOSX: `$HOME/.vscode/extensions/espressif.esp-idf-extension-VERSION/esp_idf_vsc_ext.log`
or any output in the Output tabs in the terminal window.

You can also post an issue in the GitHub repository or in the Spectrum chat https://spectrum.chat/espidf-vsc?tab=posts if you need to chat with one of the team.

Please let us know how it goes and how can we help.

Note: Liked your blog, Portuguese is not my mother tongue but very close to Spanish so still understood some :D .

User avatar
jgustavoam
Posts: 134
Joined: Thu Feb 01, 2018 2:43 pm
Location: Belo Horizonte , Brazil
Contact:

Re: Finally I'm interested in ESP32-IDF, with Visual Studio Code extension

Postby jgustavoam » Fri Jul 10, 2020 12:25 pm

Hi Esp_Bignacio,

Thanks for your attention.
I spent some time trying to understand what happened to the IDF in Visual Studio Code.
I found it easier to deleted everything and do the instalallation again!
Makers don't like to spend time on tools.
Thanks for praising my blog.

More Blogs:
https://blog.eletrogate.com/esp32/
https://blog.eletrogate.com/esp12/
http://labdegaragem.com/forum/topics/co ... -o-esp8266
Retired IBM Brasil
Electronic hobbyist since 1976.

Who is online

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