Hi all.
I installed Python/Vscode/Espressif IDF, and all automatically to end, and I can run 'idf.py build' in CMD window, but got error when run it terminal, how to fix?
Thanks
Adam
idf.py not recognized
-
- Posts: 52
- Joined: Thu Jun 22, 2023 12:50 pm
Re: idf.py not recognized
Hello.
If you installed ESP-IDF via VSCode plugin and want to use it from a normal CMD window, you will need to export environment variables first. You need to change directory to the IDF installation folder and run export.bat file, then idf.py will be available for your current terminal session. You can find more info in the links below.
Windows: https://docs.espressif.com/projects/esp ... and-prompt
Linux and MacOS: https://docs.espressif.com/projects/esp ... -variables
If you installed ESP-IDF via VSCode plugin and want to use it from a normal CMD window, you will need to export environment variables first. You need to change directory to the IDF installation folder and run export.bat file, then idf.py will be available for your current terminal session. You can find more info in the links below.
Windows: https://docs.espressif.com/projects/esp ... and-prompt
Linux and MacOS: https://docs.espressif.com/projects/esp ... -variables
Re: idf.py not recognized
yes.
I did what you mentioned and idf.py build works well now.
I got errors when build:
1. cc1.exe error: too many filename given; solved by: idf.py --no-ccache build
2. failed: hello_world.elf can't find solution; tried blink got same error, mean that the error not from project folders?
/../../../../xtensa-esp-elf/bin/ld.exe what this mean?
I have long path name enabled.
do you have clue on second one?
Thanks.
I did what you mentioned and idf.py build works well now.
I got errors when build:
1. cc1.exe error: too many filename given; solved by: idf.py --no-ccache build
2. failed: hello_world.elf can't find solution; tried blink got same error, mean that the error not from project folders?
Code: Select all
[916/918] Linking CXX executable hello_world.elf
FAILED: hello_world.elf
cmd.exe /C "cd . && C:\Espressif\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32=0 -Wl,--Map=C:/Users/XZY/esp/hello_world/build/hello_world.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32.peripherals.ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-funcs.ld -T memory.ld -T sections.ld @CMakeFiles\hello_world.elf.rsp -o hello_world.elf && cd ."
C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: cannot open linker script file esp32.peripherals.ld: No such file or directory
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
I have long path name enabled.
do you have clue on second one?
Thanks.
-
- Posts: 52
- Joined: Thu Jun 22, 2023 12:50 pm
Re: idf.py not recognized
Hello again. Sorry for the late reply. I found similar issue opened on GitHub https://github.com/espressif/esp-idf/issues/13795 and it seems it was opened by you and you figured out your issue. I am just pinning it here so we know it is solved.
Who is online
Users browsing this forum: No registered users and 165 guests