idf.py not recognized

lladam
Posts: 44
Joined: Tue Jul 20, 2021 12:14 am

idf.py not recognized

Postby lladam » Sat May 11, 2024 12:14 am

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

ESP_adokitkat
Posts: 50
Joined: Thu Jun 22, 2023 12:50 pm

Re: idf.py not recognized

Postby ESP_adokitkat » Sun May 12, 2024 9:33 pm

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

lladam
Posts: 44
Joined: Tue Jul 20, 2021 12:14 am

Re: idf.py not recognized

Postby lladam » Tue May 14, 2024 2:26 pm

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?

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.

/../../../../xtensa-esp-elf/bin/ld.exe what this mean?

I have long path name enabled.

do you have clue on second one?
Thanks.

ESP_adokitkat
Posts: 50
Joined: Thu Jun 22, 2023 12:50 pm

Re: idf.py not recognized

Postby ESP_adokitkat » Thu May 23, 2024 1:51 pm

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: akasaka_spk and 72 guests