请教:vscode+ESP-IDF编译“blink”工程出错

sdlqzql
Posts: 2
Joined: Thu Jun 29, 2023 7:01 am

请教:vscode+ESP-IDF编译“blink”工程出错

Postby sdlqzql » Thu Jun 29, 2023 7:50 am

我是从vscode端,导入本地的例程,然后编译,就会卡在图片的位置,不知道为什么。

微信截图_20230629144533.png
微信截图_20230629144533.png (30.71 KiB) Viewed 1208 times

Code: Select all

[102/103] Generating binary image from built executable
esptool.py v4.6.2
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Generated C:/Espressif/demoTest/blink/build/bootloader/bootloader.bin
[103/103] cmd.exe /C "cd /D C:\Espressif\demoTest\blink\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.8_env\Scripts\python.exe C:/Espressif/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Espressif/demoTest/blink/build/bootloader/bootloader.bin"
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[887/889] Linking CXX executable blink.elf
FAILED: blink.elf 
cmd.exe /C "cd . && C:\Espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32=0 -Wl,--Map=C:/Espressif/demoTest/blink/build/blink.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\blink.elf.rsp -o blink.elf  && cd ."
c:/espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-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.

 *  终端进程“C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja ”已终止,退出代码: 1。 

ESP_Penguin_Helper
Posts: 156
Joined: Tue Jul 11, 2023 6:55 am

Re: 请教:vscode+ESP-IDF编译“blink”工程出错

Postby ESP_Penguin_Helper » Tue Jul 18, 2023 9:45 am

你好,找不到 peripherals 说明 IDF 外设的部分有问题。你可以先检查一下 VSCode 中 IDF 和工具链的 PATH 是否正确。如果 PATH 正确的话,可以尝试一下 HelloWorld 是否可以正常编译?如果也不行的话可以检查一下虚拟Python的环境是否配置正确。不过建议按照官方文档重装最新版本的 IDF,并重新配置 VSCode,这样大概率可以最快解决问题。

Who is online

Users browsing this forum: No registered users and 94 guests