rpcWiFi library multiple definition

#include “rpcWiFi.h”

void setup()
{
Serial.begin(115200);
while (!Serial); // Wait to open Serial Monitor
Serial.printf(“RTL8720 Firmware Version: %s”, rpc_system_version());

}

void loop()
{
}
A lot of linking errors.

`atu_netdb.c.o: In function dns_gethostbyname
atu_netdb.c:14: multiple definition of dns_gethostbyname
dns.c.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\lwip\dns.c:38: first defined here

atu_sockets.c.o: In function atu_htons
atu_sockets.c:602: multiple definition of atu_htons
sockets.c.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\lwip\sockets.c:303: first defined here

atu_sockets.c.o: In function atu_htonl
atu_sockets.c:611: multiple definition of atu_htonl
sockets.c.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\lwip\sockets.c:314: first defined here

esp_hal_log.c.o: In function pathToFileName
esp_hal_log.c:10: multiple definition of pathToFileName
esp_hal_log.c.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\esp\esp_hal_log.c:10: first defined here

esp_hal_log.c.o: In function dump_tasks
esp_hal_log.c:24: multiple definition of dump_tasks
esp_hal_log.c.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\esp\esp_hal_log.c:24: first defined here

esp_hal_log.c.o: In function ntp_conf_time
esp_hal_log.c:32: multiple definition of ntp_conf_time
esp_hal_log.c.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\esp\esp_hal_log.c:70: first defined here

mdns.c.o: In function mdns_init
mdns.c:34: multiple definition of mdns_init
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:34: first defined here

mdns.c.o: In function mdns_free
mdns.c:42: multiple definition of mdns_free
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:43: first defined here

mdns.c.o: In function mdns_hostname_set
mdns.c:54: multiple definition of mdns_hostname_set
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:50: first defined here

mdns.c.o: In function mdns_instance_name_set
mdns.c:89: multiple definition of mdns_instance_name_set
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:59: first defined here

mdns.c.o: In function mdns_service_add
mdns.c:106: multiple definition of mdns_service_add
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:67: first defined here

mdns.c.o: In function mdns_service_remove
mdns.c:136: multiple definition of mdns_service_remove
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:89: first defined here

mdns.c.o: In function mdns_service_instance_name_set
mdns.c:156: multiple definition of mdns_service_instance_name_set
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:105: first defined here

mdns.c.o: In function mdns_service_txt_item_set
mdns.c:179: multiple definition of mdns_service_txt_item_set
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:97: first defined here

mdns.c.o: In function mdns_query_results_free
mdns.c:190: multiple definition of mdns_query_results_free
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:113: first defined here

mdns.c.o: In function mdns_query_ptr
mdns.c:214: multiple definition of mdns_query_ptr
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:147: first defined here

mdns.c.o: In function mdns_query_a
mdns.c:235: multiple definition of mdns_query_a
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:255: first defined here

mdns.c.o: In function mdns_handle_system_event
mdns.c*: (.text.mdns_handle_system_event+0x0): multiple definition of mdns_handle_system_event
rpc_wifi_mdns.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_mdns.cpp:275: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_init
tcpip_adapter.c:50: multiple definition of tcpip_adapter_init
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:592: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_get_ip_info
tcpip_adapter.c:64: multiple definition of tcpip_adapter_get_ip_info
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:663: first defined here

Error linking for board Seeeduino Wio Terminal

Build failed for project ‘Test’
tcpip_adapter.c.o: In function tcpip_adapter_set_ip_info
tcpip_adapter.c:97: multiple definition of tcpip_adapter_set_ip_info
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:690: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_create_ip6_linklocal
tcpip_adapter.c:133: multiple definition of tcpip_adapter_create_ip6_linklocal
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:845: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_get_ip6_linklocal
tcpip_adapter.c:152: multiple definition of tcpip_adapter_get_ip6_linklocal
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:853: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_dhcps_option
tcpip_adapter.c:174: multiple definition of tcpip_adapter_dhcps_option
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:834: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_dhcps_start
tcpip_adapter.c:192: multiple definition of tcpip_adapter_dhcps_start
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:789: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_dhcps_stop
tcpip_adapter.c:218: multiple definition of tcpip_adapter_dhcps_stop
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:795: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_dhcpc_start
tcpip_adapter.c:239: multiple definition of tcpip_adapter_dhcpc_start
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:801: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_dhcpc_stop
tcpip_adapter.c:265: multiple definition of tcpip_adapter_dhcpc_stop
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:807: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_set_hostname
tcpip_adapter.c*: (.text.tcpip_adapter_set_hostname+0x0): multiple definition of tcpip_adapter_set_hostname
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:813: first defined here

tcpip_adapter.c.o: In function tcpip_adapter_get_hostname
tcpip_adapter.c*: (.text.tcpip_adapter_get_hostname+0x0): multiple definition of tcpip_adapter_get_hostname
rpc_wifi_api_hal.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\rtl_wifi\rpc_wifi_api_hal.cpp:822: first defined here

esp_ll_arduino.cpp.o: In function _wrap_body()
esp_ll_arduino.cpp:306: multiple definition of _wrap_body()
erpc_Unified_init.cpp.o: D:\Arduino\Proj\libraries\Seeed_Arduino_rpcUnified\src\erpc_Unified_init.cpp:139: first defined here

collect2.exe*: error: ld returned 1 exit status
`

I see you mentioned this on Github as well. Any more questions ?

I see you mentioned this on Github as well. Any more questions ?

Definitelly!
After I eliminated librarys conflicts and reflash eRPC FW. I tryed to run any examples , but with no success. Any example halts on any rpc call, e.g.:
Serial.printf(“RTL8720 Firmware Version: %s”, rpc_system_version());
So, the question is: Did FW flashed successfuly?
I made some reverse-engineering.
In burn mode, when transparent communication with RTL chip established, I could talk directly with RTL command shell after sending escape char. E.g. I could get a help by sending “?” and so on.
The main question: using this command shell, how can I verify that exactly eRPC FW I have. Could I get version or other important evidences? And how can I verify that FW works correctly?

Thanks in advance,
Vladimir

I’m so worried because initially I put these 3 binary files in the same folder with ambd_flash_tool.
But in case of erase or flash fail this SW rewrites these files with 0xFF content. And in subsequent use it ofcourse will flash all content to RTL chip. I remember that I made path error on first use and then made seweral erase/flash cycles. So, maybe important settings were lost and now the FW works not as expected.

Just in case I deleted firmware folder from ambd_flash_tool folder and made one more attempt.
Now it works!

Thanks a lot for attention.

1 Like