ESP8266 Developer Zone The Official ESP8266 Forum 2015-08-03T06:50:50+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=486 2015-08-03T06:50:50+08:00 2015-08-03T06:50:50+08:00 https://bbs.espressif.com:443/viewtopic.php?t=486&p=3013#p3013 <![CDATA[Re: sdk_v1.1.0_15_05_22 : undefined ref user_rf_pre_init]]>
Espressif_Faye wrote:
Users need to add void user_rf_pre_init(void) in user_main.c , refer to IOT_Demo (user_main.c).
I realize that this is a thread from several months ago but it has been bugging me since the requirement was introduced. The "proper" way to handle something like this is to define a do-nothing stub with the name user_rf_pre_init() as a weak symbol in the module that calls user_rf_pre_init(). Then, if an application author wants to perform such pre-initialization they would just define the function normally (i.e., not weak) and it will automatically replace the weak stub.

https://en.wikipedia.org/wiki/Weak_symbol

The advantage to doing it the "right" way is that it has no effect on anyone who has no interest in using the feature *and* it doesn't break existing code.

Statistics: Posted by dkinzer — Mon Aug 03, 2015 6:50 am


]]>
2015-05-27T21:16:09+08:00 2015-05-27T21:16:09+08:00 https://bbs.espressif.com:443/viewtopic.php?t=486&p=1927#p1927 <![CDATA[Re: sdk_v1.1.0_15_05_22 : undefined ref user_rf_pre_init]]>
Espressif_Faye wrote:
Hi,

Since SDK_v1.1.0 , user_rf_pre_init is added for user-define RF initialization.

Users need to add void user_rf_pre_init(void) in user_main.c , refer to IOT_Demo (user_main.c)

So sorry for the inconvenience.



rudi wrote:
..
makes fail without a define

void user_rf_pre_init(void);

at begin in user_main.c



yes you are right ;)


;-)

Statistics: Posted by rudi — Wed May 27, 2015 9:16 pm


]]>
2015-05-27T01:11:36+08:00 2015-05-27T01:11:36+08:00 https://bbs.espressif.com:443/viewtopic.php?t=486&p=1899#p1899 <![CDATA[Re: sdk_v1.1.0_15_05_22 : undefined ref user_rf_pre_init]]> Statistics: Posted by harrys — Wed May 27, 2015 1:11 am


]]>
2015-05-26T19:33:31+08:00 2015-05-26T19:33:31+08:00 https://bbs.espressif.com:443/viewtopic.php?t=486&p=1895#p1895 <![CDATA[Re: sdk_v1.1.0_15_05_22 : undefined ref user_rf_pre_init]]> Statistics: Posted by hdrut — Tue May 26, 2015 7:33 pm


]]>
2015-05-26T11:05:54+08:00 2015-05-26T11:05:54+08:00 https://bbs.espressif.com:443/viewtopic.php?t=486&p=1861#p1861 <![CDATA[Re: sdk_v1.1.0_15_05_22 : undefined ref user_rf_pre_init]]>
Since SDK_v1.1.0 , user_rf_pre_init is added for user-define RF initialization.

Users need to add void user_rf_pre_init(void) in user_main.c , refer to IOT_Demo (user_main.c)

So sorry for the inconvenience.

Statistics: Posted by ESP_Faye — Tue May 26, 2015 11:05 am


]]>
2015-05-25T23:37:44+08:00 2015-05-25T23:37:44+08:00 https://bbs.espressif.com:443/viewtopic.php?t=486&p=1854#p1854 <![CDATA[Re: sdk_v1.1.0_15_05_22 : undefined ref user_rf_pre_init]]>

/home/esp8266/Projects/esp_iot_sdk_v1.1.0/lib/libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x34c): undefined reference to `user_rf_pre_init'


Any fix for this??

thks ,rgds

Statistics: Posted by hdrut — Mon May 25, 2015 11:37 pm


]]>
2015-05-25T15:23:10+08:00 2015-05-25T15:23:10+08:00 https://bbs.espressif.com:443/viewtopic.php?t=486&p=1850#p1850 <![CDATA[Re: sdk_v1.1.0_15_05_22 : undefined ref user_rf_pre_init]]>
/opt/Espressif/ESP8266_SDK_1.1.0/lib/libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x34c): undefined reference to `user_rf_pre_init'
/opt/Espressif/ESP8266_SDK_1.1.0/lib/libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x474): undefined reference to `user_rf_pre_init'
collect2: error: ld returned 1 exit status
make: *** [build/test.out] Error 1

code compiles ok with SDK 1.0.1

Regards, Harry

Statistics: Posted by harrys — Mon May 25, 2015 3:23 pm


]]>
2015-05-24T19:51:20+08:00 2015-05-24T19:51:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=486&p=1840#p1840 <![CDATA[sdk_v1.1.0_15_05_22 : undefined ref user_rf_pre_init]]>
the compiler breaks with undefined reference to 'user_rf_pre_init' in the at app example.

think,
the funcion in user_main.c

void user_rf_pre_init(void) {
}

makes fail without a define

void user_rf_pre_init(void);

at begin in user_main.c



hint: libmain.a
function: user_uart_wait_tx_fifo_empty



best wishes
rudi ;-)

Statistics: Posted by rudi — Sun May 24, 2015 7:51 pm


]]>