cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Cube bug - ethernetif_notify_conn_changed() not generated

rgledhill
Associate II
Posted on March 20, 2014 at 12:48

Hi,

I've created the attached .ioc file for my modified ST3240G dev kit; when I generate the code and build it, I get the following:

Error: L6218E: Undefined symbol ethernetif_notify_conn_changed (referred from ethernetif.o).

I think this is probably a function that needs to be created by the user but it should at least generate an empty function to allow the project to link.

Thanks

Richard

#stm32cube
7 REPLIES 7
Bino
Senior
Posted on March 20, 2014 at 16:21

Hello,

Waiting for final solution, you can comment as followed the line in ethernetif.c:

 // ethernetif_notify_conn_changed(netif);

so that this empty function will not be called.

If you intend to use it, you have to implement the function core and you will need the fix to use it.

/Eric A.

rgledhill
Associate II
Posted on March 20, 2014 at 17:05

Hi,

Thanks - in fact the function that calls this is itself not called anywhere!  I think there is a chunk of code missing in the generated software to actually bring the TCP/IP link up.  In any case the MX_LWIP_Init() function hangs, so a bit more work is required here by ST to make this a success 🙂

Thanks

Richard

Bino
Senior
Posted on March 21, 2014 at 10:06

Hi,

The ethernetif_update_config function can be called as argument of netif_set_link_callback init function if LWIP_NETIF_LINK_CALLBACK is set to 1.

So far the call of netif_set_link_callback function is not yet implemented in MX_LWIP_Init() but you should not impacted since you have not set LWIP_NETIF_LINK_CALLBACK.

Regarding the abnormal link error message (L6218E), the ethernetif_notify_conn_changed function declaration can be preceded by __weak in ethernetif.h:

__weak void ethernetif_notify_conn_changed(struct netif *netif);

Regarding missing code for your TCP/IP link up, once identified, either the code if generic enough will be added to improve the MX_LWIP_Init function or the code will be considered as application code.

BR

/Eric A.

rgledhill
Associate II
Posted on March 21, 2014 at 17:11

Hi Eric,

Many thanks for the tips.  I think most people would consider it to be a basic driver/lwIP middleware function to at least bring the link up, otherwise everyone who has to use the Cube software with lwIP will need to implement this missing layer.  It would be great to have it so that with a correctly-configured lwIP, the link comes up and gets an IP address (or uses its static one), ready for action.

Kind regards

Richard

Bino
Senior
Posted on March 27, 2014 at 15:16

To complete the answer, the intialization part will be slighly improved on next version but to help more implementing missing part you can also have a look on our examples located in our FW package: C:\Users\<user_id>\STM32Cube\<user_dir>\STM32Cube_FW_F4_V1.1.0\Projects\STM324x9I_EVAL\Applications\LwIP

BR

/Eric A.

rgledhill
Associate II
Posted on March 27, 2014 at 17:20

Hi Eric,

I shall do so, thank you!

Kind regards

Richard

wangzhaofeng
Associate II
Posted on April 12, 2014 at 05:34

Hi

Does your STM32F4 Cube ethernet with FreeROTS  works well on STM open407 or open429? I have created a project ETH and FreeROTS use STM32F4 Cube,and then comment //ethernetif_notify_conn_changed(netif);

but it does not work