Espressif won't Compile Example Project in VSCode

matanl
Posts: 2
Joined: Fri Mar 05, 2021 11:49 pm

Espressif won't Compile Example Project in VSCode

Postby matanl » Sat Mar 06, 2021 8:41 am

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

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

Re: Espressif won't Compile Example Project in VSCode

Postby ESP_bignacio » Mon Mar 08, 2021 7:30 am

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> ?

matanl
Posts: 2
Joined: Fri Mar 05, 2021 11:49 pm

Re: Espressif won't Compile Example Project in VSCode

Postby matanl » Mon Mar 08, 2021 7:40 am

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.

booleanBoy
Posts: 1
Joined: Fri Aug 06, 2021 7:10 pm

Re: Espressif won't Compile Example Project in VSCode

Postby booleanBoy » Fri Aug 06, 2021 7:13 pm

Thanks Matani! I was having the same problem and there was indeed a space in my path that was causing my trouble...

Who is online

Users browsing this forum: No registered users and 14 guests