2019-12-13 09:06 AM
I created a simple program for STM32f407 discovery that has FreeRTOS (10.0.1) and LWIP (2.0.3) in STM32CubeIDE 1.1.0. It uses a task to start LWIP and dhcp and kills the task. It has a software timer that blinks an LED and printf a counter. I implemented _write to redirect to TIM. That's it. In debug I have SWV. data trace timeline and fault analyzer. I kept the host PC run all the time without going to sleep. The board worked for hours (>6) and the LED doesn't blink any more. Pinging from host PC has no response. No fault was captured.
When I tried to restart debugging, hit the run nothing happened. I had to cycle the board power.
Before this I tried many times using FreeRTOS with LWIP, the board always dies in a couple of hours.
Any thoughts on the combination of FreeRTOS and LWIP and how to improve debugging?
Thanks.
2019-12-13 10:26 AM
I put the project here: https://github.com/xmkllc/FreeRTOS_LWIP_Auto_Reconnect
Last run died in about 2 hours.
2019-12-13 12:38 PM
2019-12-13 03:34 PM
Thanks. I will take a look.
2019-12-13 08:04 PM
After 12 hours the program eventually hung and this was captured by the debugger:
2019-12-13 08:35 PM
2019-12-13 08:46 PM
2019-12-14 03:48 AM
Those images doesn't help much... Call stack could provide something useful, but there is no sense in spending time on such debugging until the fundamental bugs are fixed.
All of this and more is described in my topic... Additionally your code uses CMSIS-RTOS mixed with FreeRTOS native API, which can easily break things.