Skip to main content
JBerry
Associate II
July 27, 2020
Solved

CubeMX 6.0.0 LwIP generates ethernetif.c that does not compile

  • July 27, 2020
  • 5 replies
  • 2988 views

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?

This topic has been closed for replies.
Best answer by Bino

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

5 replies

Khouloud ZEMMELI
ST Employee
August 6, 2020

Hello @JBerry​ 

could you please share your ioc file?

Thanks

Khouloud

JBerry
JBerryAuthor
Associate II
August 6, 2020

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

Khouloud ZEMMELI
ST Employee
August 7, 2020

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

Best Regards,

Khouloud

ETywo.1
Associate
October 9, 2020

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.

Bino
BinoBest answer
ST Employee
August 24, 2020

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
August 31, 2020

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

Best Regards,

Khouloud

HGumb.1
Associate
September 20, 2020

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

Frak.1
Associate II
October 30, 2020

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,

SHong.5
Associate III
November 6, 2020

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,