STM32CubeMX 6.13 upgrade causes LWIP + RTOS to hang on MX_LWIP_Init()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-23 6:44 AM
All my apps LWIP/RTOS based bugged after STM32CubeMX migration to 6.13 (from 12.1).
Went back to 12.1 to solve the issue.
- Labels:
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-23 7:07 AM
Did you do a diff to see what changed?
Did you use the debugger to see where, exactly, MX_LWIP_Init was hanging?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-23 8:12 AM
No obvious diff... blaming stmcubeMX update was a my finding after days of regression investigations. We settled 'downgrade to 6.12' as an acceptable solution.
Just signaling the issue to help others who might wondering what's suddenly is going wrong...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-24 7:35 AM - edited ‎2024-12-24 7:38 AM
Hello @ldelaprade
First let me thank you for posting.
It would be helpful if you could share your IOC with me so that I can investigate further the issue.
I will be waiting for your feedback.
THX
Ghofrane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-24 8:13 AM
This is the working one (MxCube.Version=6.12.1), opening it with 6.13 cubeMX will migrated it and then break LWIP.
in lwip.c I add this to trace DHCP success:
/* USER CODE BEGIN 2 */
// DHCP callback function, returns 1 when there's an address
int8_t dhcp_status_trace(void)
{
if (gnetif.ip_addr.addr != 0)
{
// IP address is assigned
char ip_addr_str[16];
ip4addr_ntoa_r(&gnetif.ip_addr, ip_addr_str, sizeof(ip_addr_str));
printf("\n!!! IP address assigned: %s !!!\n", ip_addr_str);
return 1;
}
return 0;
}
/* USER CODE END 2 */
then in main.c I can delay my private thread operations using:
/* USER CODE END Header_StartDoipTask */
void StartDoipTask(void *argument)
{
/* USER CODE BEGIN StartDoipTask */
printf("StartDoipTask Starting.................\n");
char IP_dhcp_obtained = 0;
while (!IP_dhcp_obtained)
{
printf(".");
IP_dhcp_obtained = dhcp_status_trace();
osDelay(1);
}
printf("................\n");
// DoIT diag services (TCP)
start_doip_server();
// DoIT discovery service (UDP)
start_udp_discovery();
/* Infinite loop */
for (;;)
{
osDelay(1);
}
/* USER CODE END StartDoipTask */
}
I can then also track IP assignment visualy (VSCode serial monitoring of ttyACM0 @9600 bauds) :
STM32 with RTOS Starting.................
StartDefaultTask Starting..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
!!! IP address assigned: 192.168.1.40 !!!
................
