[ESP8266_NONOS_SDK-2.2.1] undefined reference to `__wrap_system_restart_local'

sedlacek.david
Posts: 10
Joined: Thu Jul 12, 2018 2:06 pm

[ESP8266_NONOS_SDK-2.2.1] undefined reference to `__wrap_system_restart_local'

Postby sedlacek.david » Thu Jul 12, 2018 2:11 pm

Hi, I'm porting my project to the ESP8266 platform. Everything seems to be fine, except that during linking the linker can't find these functions:

Code: Select all

__wrap_register_chipv6_phy
__wrap_system_restart_local



Am I missing some libraries? The complete error output is below.

Thank you very much, David.


C:/ESP8266/ESP8266_NONOS_SDK-2.2.1/lib\libmain.a(app_main.o): In function `uart_div_modify':
(.irom0.text+0x5c): undefined reference to `__wrap_register_chipv6_phy'
C:/ESP8266/ESP8266_NONOS_SDK-2.2.1/lib\libmain.a(app_main.o): In function `uart_div_modify':
(.irom0.text+0x75): undefined reference to `__wrap_register_chipv6_phy'
C:/ESP8266/ESP8266_NONOS_SDK-2.2.1/lib\libmain.a(app_main.o): In function `wdt_init':
(.irom0.text+0x3a4): undefined reference to `__wrap_system_restart_local'
C:/ESP8266/ESP8266_NONOS_SDK-2.2.1/lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x485): undefined reference to `__wrap_system_restart_local'
C:/ESP8266/ESP8266_NONOS_SDK-2.2.1/lib\libmain.a(app_main.o): In function `flash_data_check':
(.irom0.text+0x927): undefined reference to `__wrap_system_restart_local'
C:/ESP8266/ESP8266_NONOS_SDK-2.2.1/lib\libphy.a(phy_sleep.o): In function `pm_wakeup_init':
(.irom0.text+0xb37): undefined reference to `__wrap_register_chipv6_phy'
C:/ESP8266/ESP8266_NONOS_SDK-2.2.1/lib\libpp.a(pp.o):(.text+0x30): undefined reference to `__wrap_system_restart_local'
C:/ESP8266/ESP8266_NONOS_SDK-2.2.1/lib\libpp.a(pp.o): In function `pp_soft_wdt_feed_local':
(.text+0x8c): undefined reference to `__wrap_system_restart_local'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [bin/esp8266_mstp] Error 1
make[1]: *** [CMakeFiles/esp8266_mstp.dir/all] Error 2
make: *** [all] Error 2

sedlacek.david
Posts: 10
Joined: Thu Jul 12, 2018 2:06 pm

Re: [ESP8266_NONOS_SDK-2.2.1] undefined reference to `__wrap_system_restart_local'

Postby sedlacek.david » Sun Jul 22, 2018 1:48 am

Just in case someone would be interested in the future. The problem was that I copied someone's C flags and among the others there were the two missing functions!!! Omg. I spent five days scrutinising what is wrong. Yep. Five days gone.

Now everything works fine!!

-Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy

Who is online

Users browsing this forum: mars_hu and 5 guests