Page 1 of 1

Espressif won't Compile Example Project in VSCode

Posted: Sat Mar 06, 2021 8:41 am
by matanl
Hello,

I checked out my new ESP32-WROOM yesterday and it didn't go smooth.
I installed VSCode Espressif IDF extension and properly set it up with ESP-IDF V4.2, Python 3.9, git, cmake. but things didn't work for me out of the box since I got the compilation error:

Code: Select all

xtensa-esp32-elf-gcc.exe: error: <my_project_path>/blink/build/bootloader/bootloader.map: No such file or directory
I believed it's something with my environment, so I went to this forum and checked out the posts.
I tried walking through the video someone posted in this forum: https://www.youtube.com/watch?v=5IuZ-E8 ... nnel=YuriR, it worked when using ESP-IDF command prompt, the "blink" example project compiled properly. However, when I created the "blink" project from "ESP-IDF: Show Example Projects" and creating a new "blink" project through it, when compiling, I still get the same error I got at the first place in VSCode:

Code: Select all

xtensa-esp32-elf-gcc.exe: error: Drive/Hobbies/Embedded/ESP32/blink/build/bootloader/bootloader.map: No such file or directory
ninja: build stopped: subcommand failed.
which caused the build to fail.

Do you have any idea what went wrong with VSCode?

Thank you,
Matan

Re: Espressif won't Compile Example Project in VSCode

Posted: Mon Mar 08, 2021 7:30 am
by ESP_bignacio
Hey Matan. Can you provide the steps you used to get this error?

Did you make sure to build the project after creating the project with ESP-IDF: Build your project.

Maybe you are trying to build from a container folder instead of the project folder itself ? In Visual Studio Code, open <my_project_path>/blink instead of <my_project_path> ?

Re: Espressif won't Compile Example Project in VSCode

Posted: Mon Mar 08, 2021 7:40 am
by matanl
Hi, I did use the espressif extension build action. As can be seen in the compiler error it builds from inside the project folder rather than its container:

Code: Select all

Drive/Hobbies/Embedded/ESP32/blink/build/bootloader/bootloader.map
I believe it has to do with the paths visual studio code uses. However, I changed the workspace according to the instructions in the mentioned video, and I saw it changing since the VSCode console changed from powershell to cmd running the exports.bat script.

I figured out the problem was that the path was C:\...\Google Drive which has a space, the Espressif extension has a bug in which a space in the project dir won't be parsed correctly. Moved it to a dir with no space and it was solved.

Re: Espressif won't Compile Example Project in VSCode

Posted: Fri Aug 06, 2021 7:13 pm
by booleanBoy
Thanks Matani! I was having the same problem and there was indeed a space in my path that was causing my trouble...