Undefined reference to `user_init' after sdk update to 1.2

Patriko
Posts: 4
Joined: Sun Jul 12, 2015 9:09 pm

Undefined reference to `user_init' after sdk update to 1.2

Postby Patriko » Sun Jul 12, 2015 9:10 pm

Hi!

After updating SDK from 1.0 to 1.2 I got:

Code: Select all

c:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc  -L../lib -nostdlib -T../ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -lwpa -llwip -lmain -ljson  -o .output/eagle/debug/image/eagle.app.v6.out
../lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x324): undefined reference to `user_rf_pre_init'
../lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x344): undefined reference to `user_init'
../lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x447): undefined reference to `user_rf_pre_init'
../lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x4fb): undefined reference to `user_init'
collect2.exe: error: ld returned 1 exit status
../Makefile:206: recipe for target '.output/eagle/debug/image/eagle.app.v6.out' failed
mingw32-make[1]: *** [.output/eagle/debug/image/eagle.app.v6.out] Error 1



The user_main.c file is still at the same place as before and both function are there:

Code: Select all

void user_rf_pre_init(void)
{
}
/******************************************************************************
 * FunctionName : user_init
 * Description  : entry of user application, init user function here
 * Parameters   : none
 * Returns      : none
*******************************************************************************/
extern void user_init(void)
{   


    uart_init(BIT_RATE_115200,BIT_RATE_115200);

    //wifi_status_led_uninstall ();

    NODE_DBG("User Init");
(...)

}


what can be wrong?

Thanks!!:)

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: Undefined reference to `user_init' after sdk update to 1

Postby ESP_Faye » Mon Jul 13, 2015 9:59 am

Hi,

Since esp_iot_sdk_v1.1.0, user_rf_pre_init is added for user to initialize RF, change list can be found in "release_note.txt", more details about APIs are in documentation "2C-ESP8266__SDK__Programming Guide"

Please add code below in user_main.c

Code: Select all

void user_rf_pre_init(void)
{
}


If your problem is still unsolved, please zip your user_main.c and upload it here, we will have a try.

Thanks for your interest in Espressif Systems and ESP8266 !

Patriko
Posts: 4
Joined: Sun Jul 12, 2015 9:09 pm

Re: Undefined reference to `user_init' after sdk update to 1

Postby Patriko » Mon Jul 13, 2015 3:09 pm

Thanks!

The problem is solved now. There was a mistake with an Makefile (additional "#"). Now there is another problem, but I think it's for a new topic.

Kind regards,
Patriko

Who is online

Users browsing this forum: No registered users and 88 guests