vscode安装esp-adf后voip例子编译失败

liugyer
Posts: 11
Joined: Mon Oct 18, 2021 3:23 am

vscode安装esp-adf后voip例子编译失败

Postby liugyer » Mon Oct 18, 2021 3:36 am

使用vscode 安装了esp-idf 和 esp-adf, esp-idf的hello_world是正常的,但是esp-adf的例程无法正常编译。报错如下:
[1107/1108] Linking CXX executable voip_app.elf
FAILED: voip_app.elf
cmd.exe /C "cd . && D:\work\esp32_idf_lib\.espressif\tools\xtensa-esp32-elf\esp-2021r1-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address @CMakeFiles\voip_app.elf.rsp -o voip_app.elf && cd ."
d:/work/esp32_idf_lib/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/work/esp32_idf_lib/esp-adf/esp-adf/components/esp-adf-libs/esp_sip/lib/esp32/libesp_sip-v4x.a(esp_sip_auth.c.obj):(.literal.md5_printf+0x1c): undefined reference to `MD5Init'
d:/work/esp32_idf_lib/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/work/esp32_idf_lib/esp-adf/esp-adf/components/esp-adf-libs/esp_sip/lib/esp32/libesp_sip-v4x.a(esp_sip_auth.c.obj):(.literal.md5_printf+0x20): undefined reference to `MD5Update'
d:/work/esp32_idf_lib/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/work/esp32_idf_lib/esp-adf/esp-adf/components/esp-adf-libs/esp_sip/lib/esp32/libesp_sip-v4x.a(esp_sip_auth.c.obj):(.literal.md5_printf+0x24): undefined reference to `MD5Final'
d:/work/esp32_idf_lib/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:/work/esp32_idf_lib/esp-adf/esp-adf/components/esp-adf-libs/esp_sip/lib/esp32/libesp_sip-v4x.a(esp_sip_auth.c.obj): in function `md5_printf':
/home/michael/work/esp/esp-adf-internal/components/esp_sip/lib/esp_sip_auth.c:52: undefined reference to `MD5Init'
d:/work/esp32_idf_lib/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/michael/work/esp/esp-adf-internal/components/esp_sip/lib/esp_sip_auth.c:53: undefined reference to `MD5Update'
d:/work/esp32_idf_lib/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/michael/work/esp/esp-adf-internal/components/esp_sip/lib/esp_sip_auth.c:54: undefined reference to `MD5Final'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

开发环境是win10,esp-idf v4.3

ESP_HengYC
Posts: 184
Joined: Fri Dec 15, 2017 2:45 am

Re: vscode安装esp-adf后voip例子编译失败

Postby ESP_HengYC » Mon Oct 18, 2021 9:08 am

你好奥,

你可以在 ADF 的文件夹下面, 使用命令 git submodule update --init --recursive 来拉取全部的 submodules, 然后再尝试编译。

liugyer
Posts: 11
Joined: Mon Oct 18, 2021 3:23 am

Re: vscode安装esp-adf后voip例子编译失败

Postby liugyer » Thu Oct 21, 2021 3:48 am

你好

我执行了命令后,并没有解决这个问题。
我将idf改成v4.1版本后,是可以编译的。是否可以直接使用v4.1进行编译呢?

另外,我的开发板是lyrat mini v1.2, 所以我在Audio HAL中选择了 mini v1.1, 并且使用v4.1编译的VoIP例程。
这个bin文件有两个问题:
1、没有像例程中所说的播放声音
2、无法连接SIP服务器

所以,请问是否Audio HAL配置选择错误?

Thanks

ESP_HengYC
Posts: 184
Joined: Fri Dec 15, 2017 2:45 am

Re: vscode安装esp-adf后voip例子编译失败

Postby ESP_HengYC » Thu Oct 21, 2021 10:00 am

liugyer wrote:
Thu Oct 21, 2021 3:48 am
你好

我执行了命令后,并没有解决这个问题。
我将idf改成v4.1版本后,是可以编译的。是否可以直接使用v4.1进行编译呢?

另外,我的开发板是lyrat mini v1.2, 所以我在Audio HAL中选择了 mini v1.1, 并且使用v4.1编译的VoIP例程。
这个bin文件有两个问题:
1、没有像例程中所说的播放声音
2、无法连接SIP服务器

所以,请问是否Audio HAL配置选择错误?

Thanks
你好,

1. 请参考 VOIP 的文档 https://github.com/espressif/esp-adf/bl ... ADME_CN.md
2. SIP 的服务器是需要用户自行搭建的,建议按照文档操作哈

liugyer
Posts: 11
Joined: Mon Oct 18, 2021 3:23 am

Re: vscode安装esp-adf后voip例子编译失败

Postby liugyer » Fri Oct 22, 2021 9:23 am

Hi

SIP服务器是正常的,并且MicroSIP也能连接上,但是使用该例程的esp32却无法连接。
新的case已经提交到 viewtopic.php?f=28&t=23951

能否帮忙看看呢?

Thanks

05760576
Posts: 1
Joined: Mon Mar 21, 2022 8:03 am

Re: vscode安装esp-adf后voip例子编译失败

Postby 05760576 » Mon Mar 21, 2022 8:07 am

我在我的程序中加入audio_board_init();这个函数的时候,也出现了这样的问题,在使用了上面请解决办法之后也是有这样的上面说的这样的错误产生。
Executing action: all (aliases: build)
Running ninja in directory d:\working_file\diguangyi\project\dgyv8.0.1\build
Executing "ninja all"...
[16/501] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D D:\Working_file\DiGuangYi\Project\DGYv8.0.1\build\bootloader\esp-idf\esptool_py && D:\esp\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe D:/esp/Espressif/frameworks/esp-idf-v4.4/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 D:/Working_file/DiGuangYi/Project/DGYv8.0.1/build/bootloader/bootloader.bin"
Bootloader binary size 0x62b0 bytes. 0xd50 bytes (12%) free.
[445/499] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/audio_out.c.obj
../main/audio_out.c:96:13: warning: 'audio_stop' defined but not used [-Wunused-function]
static void audio_stop(void)
^~~~~~~~~~
[497/499] Linking CXX executable DGYv8.0.1.elf
FAILED: DGYv8.0.1.elf
cmd.exe /C "cd . && D:\esp\Espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address @CMakeFiles\DGYv8.0.1.elf.rsp -o DGYv8.0.1.elf && cd ."
d:/esp/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: DGYv8.0.1.elf section `.iram0.text' will not fit in region `iram0_0_seg'
d:/esp/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: IRAM0 segment data does not fit.
d:/esp/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `iram0_0_seg' overflowed by 4196 bytes
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

求助一下我这应该怎么去解决

ESP_HengYC
Posts: 184
Joined: Fri Dec 15, 2017 2:45 am

Re: vscode安装esp-adf后voip例子编译失败

Postby ESP_HengYC » Fri Mar 25, 2022 8:48 am

你好,

``iram0_0_seg' overflowed by 4196 byte` 这个问题是说明 IRAM 的占用已经溢出了,请关闭一些IRAM 使用

18437950826
Posts: 2
Joined: Tue Jan 09, 2024 6:22 am

能否帮忙看一下我这个同样的错误

Postby 18437950826 » Wed Jan 10, 2024 2:01 am

[2/4] Linking CXX executable espiot.elf
FAILED: espiot.elf
cmd.exe /C "cd . && C:\Users\lufei\.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=D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/build/espiot.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\espiot.elf.rsp -o espiot.elf && cd ."
c:/users/lufei/.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: esp-idf/user/libuser.a(mass_algorith.c.obj):D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/user/mass_detect/include/mass_calbication.h:35: multiple definition of `calibrate_data'; esp-idf/user/libuser.a(mass_detect.c.obj):D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/user/mass_detect/include/mass_calbication.h:35: first defined here
c:/users/lufei/.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: esp-idf/user/libuser.a(mass_calbication.c.obj):D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/user/mass_detect/include/mass_calbication.h:35: multiple definition of `calibrate_data'; esp-idf/user/libuser.a(mass_detect.c.obj):D:/BaiduNetdiskWorkspace/WORK/smart_sell/zhican_lijin/user/mass_detect/include/mass_calbication.h:35: first defined here
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

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

Who is online

Users browsing this forum: No registered users and 44 guests