cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 6.0.0 LwIP generates ethernetif.c that does not compile

JBerry
Associate III

It looks like a simple refactor bug. The ethernet_link_check_state function includes the line:

 struct netif *netif = (struct netif *) argument;

but argument does not exist and netif is the name of the function argument. I assume a previous version had argument passed in as a void*. Deleting the line seems sufficient to fix it. Is there a way I can fix it so that it persists across a regeneration?

1 ACCEPTED SOLUTION

Accepted Solutions
Bino
Senior

You can update the FTL template (ethernetif_h7.ftl for H7) located in your installation folder (ex. C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX<x.y>\db\templates) so that the fix will persist across regeneration.

BR

View solution in original post

10 REPLIES 10
Khouloud ZEMMELI
ST Employee

Hello @JBerry​ 

could you please share your ioc file?

Thanks

Khouloud

JBerry
Associate III

Hi @Khouloud ZEMMELI​ here is an .ioc file that has the problem. Thanks.

Thanks @JBerry​  for the feedback, issue will be fixed.

Best Regards,

Khouloud

Bino
Senior

You can update the FTL template (ethernetif_h7.ftl for H7) located in your installation folder (ex. C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX<x.y>\db\templates) so that the fix will persist across regeneration.

BR

Khouloud ZEMMELI
ST Employee

@JBerry​ , Fix is done, it will be available for the next release.

Best Regards,

Khouloud

HGumb.1
Associate II

I think I have the same problem? My STM32Cube MCU Packgage for STM32H7 Series is 1.8.0

Errors:

'argument' undeclared (first use in this function); did you mean '_reent'?

'netif' redeclared as different kind of symbol

make: *** [LWIP/Target/subdir.mk:18: LWIP/Target/ethernetif.o] Error 1

Soooo how's that fix coming along? It's been two months. Please tell your management that CI is a valuable thing to do and would have caught this before the bug got released. Seriously.

Hi!

I had the same issue. I realized that "netif" variable is passed as parameter to this function and then it is assigne to the 'netif' (redeclaration). So I changed the argument passed to this function from 'netif' to 'argument'

void ethernet_link_check_state( struct netif *arguement)

That at least fixed the compile error and my simple http server started.

Regards,

Hi!

Did you change anything else other than "void ethernet_link_check_state( struct netif *arguement)"?

As I changed *netif to *arguement, initial error is gone, but other issues popped up.

Regards,