最近在做华为hilink 的项目, 需要用到esp8266 sdk 的2.0版本,然后就从官方的sdk clone 了下来。切换到2.0版本, 在没有修改过任何值的情况下,重新编译了lwip静态库 【 sh make_lib.sh lwip】 操作。
然后就提示各种缺乏函数的声明, 尝试用grep 指令对该函数进行全局搜索,但是搜索不到该函数的声明。
下面是log
xtensa-lx106-elf-ar: creating .output/eagle/debug/lib/liblwipipv6.a
make[2]: Leaving directory '/home/hesson/esp8266/ESP8266_RTOS_SDK/third_party/lwip/core/ipv6'
xtensa-lx106-elf-gcc -fno-aggressive-loop-optimizations -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -fno-jump-tables -D_POSIX_SOURCE -DLWIP_OPEN_SRC -DPBUF_RSV_FOR_WLAN -DEBUF_LWIP -DMEMLEAK_DEBUG -I include -I ./ -I ../include -I ./ -I ../../include -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include -I /home/hesson/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/hesson/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/json -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/openssl -I /home/hesson/esp8266/ESP8266_RTOS_SDK/include/mqtt -o .output/eagle/debug/obj/dhcp.o -c dhcp.c
dhcp.c: In function 'dhcp_bind':
dhcp.c:1135:3: error: implicit declaration of function 'system_station_got_ip_set' [-Werror=implicit-function-declaration]
system_station_got_ip_set(&ip, &mask, &gw);
^
cc1: all warnings being treated as errors
make[1]: *** [/home/hesson/esp8266/ESP8266_RTOS_SDK/Makefile:351: .output/eagle/debug/obj/dhcp.o] Error 1
make[1]: Leaving directory '/home/hesson/esp8266/ESP8266_RTOS_SDK/third_party/lwip/core'
make: *** [/home/hesson/esp8266/ESP8266_RTOS_SDK/Makefile:336: .subdirs] Error 2
hesson@DESKTOP-UR7VT96:~/esp8266/ESP8266_RTOS_SDK/third_party$ grep -r "system_station_got_ip_set" ../
../.vscode-ctags:system_station_got_ip_set third_party/lwip/core/dhcp.c /^ void system_station_got_ip_set(ip_addr_t* ip, ip_addr_t* mask, ip_addr_t* gw){}$/;" f typeref:typename:void
../build/eagle.dump:40222268 g F .irom0.text 00000100 system_station_got_ip_set
../build/eagle.S:40222268 <system_station_got_ip_set>:
../build/eagle.S:40222291: 040c16 beqz a12, 402222d5 <system_station_got_ip_set+0x6d>
../build/eagle.S:40222299: 82bc beqz.n a2, 402222d5 <system_station_got_ip_set+0x6d>
../build/eagle.S:402222a3: 099367 bne a3, a6, 402222b0 <system_station_got_ip_set+0x48>
../build/eagle.S:402222a8: 049357 bne a3, a5, 402222b0 <system_station_got_ip_set+0x48>
../build/eagle.S:402222ad: 241327 beq a3, a2, 402222d5 <system_station_got_ip_set+0x6d>
../build/eagle.S:402222c9: 081226 beqi a2, 1, 402222d5 <system_station_got_ip_set+0x6d>
../build/eagle.S:4022232c: 1c9327 bne a3, a2, 4022234c <system_station_got_ip_set+0xe4>
../build/eagle.S:40222390: fff861 l32r a6, 40222370 <system_station_got_ip_set+0x108>
../build/eagle.S:40222393: fff651 l32r a5, 4022236c <system_station_got_ip_set+0x104>
../build/eagle.S:40222396: fff421 l32r a2, 40222368 <system_station_got_ip_set+0x100>
../build/eagle.S:402223ac: fff461 l32r a6, 4022237c <system_station_got_ip_set+0x114>
../build/eagle.S:402223af: fff251 l32r a5, 40222378 <system_station_got_ip_set+0x110>
../build/eagle.S:402223b2: fff021 l32r a2, 40222374 <system_station_got_ip_set+0x10c>
../build/eagle.S:402223ca: ffed21 l32r a2, 40222380 <system_station_got_ip_set+0x118>
../build/eagle.S:402223dc: ffeb51 l32r a5, 40222388 <system_station_got_ip_set+0x120>
../build/eagle.S:402223df: ffeb61 l32r a6, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:402223e2: ffe821 l32r a2, 40222384 <system_station_got_ip_set+0x11c>
../build/eagle.S:40222f3c: fd1431 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:402295e1: e36a31 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:40229863: e2ca21 l32r a2, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:40229ca8: e1b951 l32r a5, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4022a6e3: df2a21 l32r a2, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4022a855: decd21 l32r a2, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4022aa10: de5f21 l32r a2, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4022ae56: dd4d41 l32r a4, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4022f6a9: cb3821 l32r a2, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4022fe4c: c95001 l32r a0, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:40236632: af56a1 l32r a10, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:402397d3: a2ee31 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4023a93b: 9e9431 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4023a979: 9e8431 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4023a9cb: 9e7031 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4023aab7: 9e3531 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4023aaef: 9e2731 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4023c503: 97a221 l32r a2, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:40240a49: 865031 l32r a3, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:40244087: 78c141 l32r a4, 4022238c <system_station_got_ip_set+0x124>
../build/eagle.S:4024d899: d49cc5 call0 40222268 <system_station_got_ip_set>
../build/eagle.S:40250f16: d13505 call0 40222268 <system_station_got_ip_set>
../build/eagle.S:40257dc8: 297131 l32r a3, 4022238c <system_station_got_ip_set+0x124>
Binary file ../lib/liblwip.a matches
Binary file ../lib/libmain.a matches
Binary file ../lib/libwpa.a matches
../third_party/lwip/core/dhcp.c: system_station_got_ip_set(&ip, &mask, &gw);
关于esp8266 v2.0编译静态库问题
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: 关于esp8266 v2.0编译静态库问题
< 3.0 的 SDK 需要用 4.8.5 的编译器,https://github.com/espressif/ESP8266_RT ... -toolchain
Who is online
Users browsing this forum: No registered users and 61 guests