-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spaces in path causes esp32-s2 build to fail with error referencing bootloader.elf (IDFGH-3641) #5576
Comments
Hi, can you make sure that your copy of |
not sure how to do that - but I just installed it yesterday following these instructions |
It is possible you did try to build with other esp-idf version on location. Try this: |
idf.py fullclean However, I notice in the error message it says It should say, I would think and as such I'm wondering if the space in my account name, Rob Latour, is causing a problem. Also, of note, there is no file called on my system the time of the error. |
Hi @roblatour,
You are correct. At the moment all paths used in the ESP-IDF build system (path containing ESP-IDF, path containing the project, path containing any other IDF components in the build) must not contain spaces. We're working on fixing this, or at minimum producing a clearer error to avoid the hard-to-debug errors which this currently produces. Sorry for the inconvenience. Will keep this issue open until we have either fixed this or fixed the error which is produced. |
thank you |
Is this mentioned somewhere ? |
It's mentioned in the getting started section, https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#step-1-install-prerequisites (regarding spaces in ESP-IDF path) and https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#step-5-start-a-project (regarding spaces in project path). |
This issue seems to be already resolved. I have verified that it's possible to build with spaces in a path. |
This Bug has not been resolved as of: 5.1.2 Work around is deleting the .platformio folder in the user directory resetting it to C:/ location. (restart of VS required) |
This issue still isn't resolved; it should not be closed. @zikalino what led you to believe it is resolved?
EDIT: This seems to in fact be caused by a feature in esp-idf-sys (https://github.com/esp-rs/esp-idf-sys/blob/8d0c991e0e3c9846c635956467e64fb35b7c7bdf/BUILD-OPTIONS.md?plain=1#L293) as referenced in esp-rs/esp-idf-sys#252 which is intended to detect and avoid this error by bailing before it happens, except that the error is partially or completely resolved in esp-idf now, so it errors erroneously 🤦 |
Currently we do have some test coverage for building with paths with spaces (in tools/test_build_system/test_spaces.py). The issue was closed because these tests got added and the issues found by these tests got resolved. There might still be issues we haven't found — we would appreciate issue reports! If anyone stumbles upon an issue with paths-with-spaces in ESP-IDF v5.2 or later, please do open a new issue, we will try to solve it. |
Environment
Problem Description
following the instruction here:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html#get-started-get-prerequisites
Got to Step 8
ran the command
idf.py build
got the following error message:
[102/103] Linking C executable bootloader.elf
FAILED: bootloader.elf
cmd.exe /C "cd . && C:\esp\tools.espressif\tools\xtensa-esp32s2-elf\esp-2020r2-8.2.0\xtensa-esp32s2-elf\bin\xtensa-esp32s2-elf-gcc.exe -mlongcalls CMakeFiles/bootloader.elf.dir/project_elf_src.c.obj -o bootloader.elf esp-idf/soc/libsoc.a esp-idf/esp_rom/libesp_rom.a esp-idf/log/liblog.a esp-idf/micro-ecc/libmicro-ecc.a esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/main/libmain.a -Wl,--cref -Wl,--Map=C:/Users/Rob Latour/Documents/esp/hello_world/build/bootloader/bootloader.map -fno-rtti -fno-lto esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/micro-ecc/libmicro-ecc.a esp-idf/soc/libsoc.a esp-idf/esp_rom/libesp_rom.a esp-idf/log/liblog.a esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a esp-idf/soc/libsoc.a esp-idf/esp_rom/libesp_rom.a esp-idf/log/liblog.a esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a -L C:/esp/esp-idf/components/esp32s2/ld -T esp32s2.peripherals.ld -Wl,--gc-sections -L C:/esp/esp-idf/components/esp_rom/esp32s2/ld -T esp32s2.rom.api.ld -T esp32s2.rom.ld -T esp32s2.rom.newlib-funcs.ld -T esp32s2.rom.libgcc.ld -T esp32s2.rom.spiflash.ld -L C:/esp/esp-idf/components/bootloader/subproject/main/ld/esp32s2 -T bootloader.ld -T bootloader.rom.ld && cd ."
xtensa-esp32s2-elf-gcc.exe: error: Latour/Documents/esp/hello_world/build/bootloader/bootloader.map: No such file or directory
ninja: build stopped: subcommand failed.
[589/925] Linking CXX static library esp-idf\tcpip_adapter\libtcpip_adapter.a
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Expected Behavior
build should work
Actual Behavior
build fails
Steps to reproduce
follow instructions at
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html#get-started-get-prerequisites
Code to reproduce this issue
/* Hello World Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_spi_flash.h"
void app_main(void)
{
printf("Hello world!\n");
}
Debug Logs
Other items if possible
CMakeLists.txt
The text was updated successfully, but these errors were encountered: