[已解决] 编译错误报 FAILED:led_strip.elf

lynber
Posts: 7
Joined: Mon Feb 28, 2022 7:41 am

[已解决] 编译错误报 FAILED:led_strip.elf

Postby lynber » Mon Feb 28, 2022 8:23 am

背景环境:
led_strip 例程,即led_pixel_esp32s3_a_v2.4
按README.md说明windows上依次执行
idf.py --preview set-target esp32c3
idf.py flash -b 2000000 monitor -p COM8 或 idp.py build

问题:
具体见附件,主要错误摘要如下
FAILED: led_strip.elf
riscv32-esp-elf/bin/ld.exe: skipping incompatible D:/Espressif/frameworks/esp-idf-v4.4/examples/led_pixel_esp32s3_a_v2.4/components/led_strip/lib\libled_strip.a when searching for -lled_strip
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch2-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: cannot find -lled_strip
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Attachments
编译过程.txt
(22.6 KiB) Downloaded 535 times

lynber
Posts: 7
Joined: Mon Feb 28, 2022 7:41 am

Re: 编译错误报 FAILED:led_strip.elf

Postby lynber » Wed Mar 02, 2022 6:38 am

有人帮忙看下吗 ?为什么会跳过libled_strip.a啊?

lynber
Posts: 7
Joined: Mon Feb 28, 2022 7:41 am

Re: 编译错误报 FAILED:led_strip.elf

Postby lynber » Thu Mar 03, 2022 6:12 am

有没有大佬帮忙看看,项目比较急,非常感谢!!

这个链接过程中说libled_strip.a 不符合,我之前遇到的类似问题, 一般都是因为目标平台为不同cpu(比如ARM x86)导致的;
这个应该也是编译工具链哪里配置导致的把? 我是在windows平台下编译链接的

ESP_ICY
Posts: 404
Joined: Mon Aug 23, 2021 11:10 am

Re: 编译错误报 FAILED:led_strip.elf

Postby ESP_ICY » Thu Mar 03, 2022 11:15 am

你这边编译的IDF版本是多少?看你log 里打印的目录,是4.4吗?然后那个程序是你自己复制出来的吗, led_stripe 的例程的路径我看是 examples/peripherals/rmt 里

lynber
Posts: 7
Joined: Mon Feb 28, 2022 7:41 am

Re: 编译错误报 FAILED:led_strip.elf

Postby lynber » Fri Mar 04, 2022 2:01 am

idf确实是4.4的

环境:
1、使用espressif-ide-setup-espressif-ide-2.4.0-with-esp-idf-4.4.exe进行安装的(里面包含了所有所需要的)
2、安装完成后 hello例程正常编译及烧录成功
3、使用官方邮件发给的led_pixel_esp32s3_a_v2.4例程(音乐节奏智能律动灯),我把它复制到了examples目录下


问题
链接过程报led_strip.a(也是官方同时发我的库)文件格式相关不对
Attachments
CatchA146(03-04-09-59-55).jpg
CatchA146(03-04-09-59-55).jpg (477.16 KiB) Viewed 9538 times

lynber
Posts: 7
Joined: Mon Feb 28, 2022 7:41 am

Re: 编译错误报 FAILED:led_strip.elf

Postby lynber » Fri Mar 04, 2022 5:40 am

发给我的led_strip.a是由3个文件组成的 led_strip_rmt_ws2812.c , led_display.c, led_show.c,后两个文件git上是没有的,如果能独立发我下,我也就可以自己编译出来了,不用led_strip.a

具体文件及错误见附件。
Attachments
链接报错.txt
(7.41 KiB) Downloaded 432 times
led_strip库组成.png
led_strip库组成.png (52.28 KiB) Viewed 9519 times

lynber
Posts: 7
Joined: Mon Feb 28, 2022 7:41 am

Re: 编译错误报 FAILED:led_strip.elf

Postby lynber » Mon Mar 07, 2022 8:44 am

这个现象跟环境都是比较清晰的,有人帮看下吗 ?

lynber
Posts: 7
Joined: Mon Feb 28, 2022 7:41 am

Re: 编译错误报 FAILED:led_strip.elf

Postby lynber » Tue Mar 08, 2022 11:46 am

该问题已解决,用了s3平台的库,却选择了C3平台的编译方式,导致链接过程出问题

opgnyy
Posts: 2
Joined: Thu Apr 07, 2022 6:03 am

Re: [已解决] 编译错误报 FAILED:led_strip.elf

Postby opgnyy » Thu Apr 07, 2022 7:45 am

楼主给份音乐律动的代码加好友1251372182 :D

Who is online

Users browsing this forum: No registered users and 119 guests