cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 5.6 bugs: LWIP static IP address missing in lwip.c, generated function calls ranking not working correctly

PTiha
Senior

Hi!

I tried to set peripheral initialization order in Project Manager->Advanced Settings.

After I finished sorting the list and saved the project, the function list mixed.

The problem is reproducable. When you save the project, the function list gets a random order.

It would be good if somebody has a solution to this problem.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

​Issue appears with the Board , for the moment you can use the MCU F429ZITx (not the Board), it's the same thing , or click on Clear Pinouts under Pinout then configure your project and code will be fine.

Otherwise, issue will be fixed in the next release.

Thanks @PTiha​  for your feedback,

Best Regards,

Khouloud

View solution in original post

15 REPLIES 15
Khouloud ZEMMELI
ST Employee

​Hello @PTiha​ ,

With which part number ?

Thanks

Khouloud

PTiha
Senior

Hello,

STM32F429ZI

Simple STM32CubeIDE project for NUCLEO-F429ZI board.

The firmware package version is 1.25.0

Thanks!

Khouloud ZEMMELI
ST Employee

​We are deeply sorry for any inconvenience this may have caused!

This's a regression, it will be fixed in the next release.

Sorry again,

Best Regards,

Khouloud

PTiha
Senior

Thank you!

Another issue with CubeMX is that when I create a project that uses a LWIP stack with a fixed IP address, the IP address is empty in lwip.c:

void MX_LWIP_Init(void)
{
  /* IP addresses initialization */
  /* Initilialize the LwIP stack without RTOS */
 lwip_init();
 
  /* IP addresses initialization without DHCP (IPv4) */
  IP4_ADDR(&ipaddr, IP_ADDRESS[0], IP_ADDRESS[1], IP_ADDRESS[2], IP_ADDRESS[3]);
  IP4_ADDR(&netmask, NETMASK_ADDRESS[0], NETMASK_ADDRESS[1] , NETMASK_ADDRESS[2], NETMASK_ADDRESS[3]);
  IP4_ADDR(&gw, GATEWAY_ADDRESS[0], GATEWAY_ADDRESS[1], GATEWAY_ADDRESS[2], GATEWAY_ADDRESS[3]);
...
...
}

In CubeMX LWIP configuration DHCP is disabled; IP address settings are correct.

I have to add the missing code by hand, but unfortunately the next code generation delete it:

void MX_LWIP_Init(void)
{
  /* IP addresses initialization */
	IP_ADDRESS[0] = 192;
	IP_ADDRESS[1] = 168;
	IP_ADDRESS[2] = 0;
	IP_ADDRESS[3] = 5;
	NETMASK_ADDRESS[0] = 255;
	NETMASK_ADDRESS[1] = 255;
	NETMASK_ADDRESS[2] = 255;
	NETMASK_ADDRESS[3] = 0;
	GATEWAY_ADDRESS[0] = 192;
	GATEWAY_ADDRESS[1] = 168;
	GATEWAY_ADDRESS[2] = 0;
	GATEWAY_ADDRESS[3] = 1;
  /* Initilialize the LwIP stack without RTOS */
  lwip_init();
 
  /* IP addresses initialization without DHCP (IPv4) */
  IP4_ADDR(&ipaddr, IP_ADDRESS[0], IP_ADDRESS[1], IP_ADDRESS[2], IP_ADDRESS[3]);
  IP4_ADDR(&netmask, NETMASK_ADDRESS[0], NETMASK_ADDRESS[1] , NETMASK_ADDRESS[2], NETMASK_ADDRESS[3]);
  IP4_ADDR(&gw, GATEWAY_ADDRESS[0], GATEWAY_ADDRESS[1], GATEWAY_ADDRESS[2], GATEWAY_ADDRESS[3]);
...
...
}

Start a new topic for the problem?

Thank you!

​Hello @PTiha​ did you reproduce the problem with 5.6.0 version ?

Please share the ioc where the problem exist to check it,

Thanks,

Khouloud

PTiha
Senior

I met the problem first in 5.5.0, but in 5.6.0 still exists.

This is my .ioc file:

nucleo-f429zi_lwip-problem.ioc

Thank you very much!

​Issue appears with the Board , for the moment you can use the MCU F429ZITx (not the Board), it's the same thing , or click on Clear Pinouts under Pinout then configure your project and code will be fine.

Otherwise, issue will be fixed in the next release.

Thanks @PTiha​  for your feedback,

Best Regards,

Khouloud

PTiha
Senior

It works now!

You helped a lot! Thank you very much!

Nukat
Associate II

Hello,

I have the same problem - after project generation the IP addresses don't appear in MX_LWIP_Init() function. I tried creating new project for MCU F429ZITx (not the Board) and clearing pinouts but it didn't work.

I've got the STM32CubeIDE (version 1.3.0) for Linux with CubeMX (version 5.6.0) and fimware package STM32_FW_F4 (version 1.25.0).

I attached my .ioc file.

Thank you for any help!