I’ve noticed an “interesting” issue that I am simply unable to trackdown/resolve.
I am working on ST’s example LwIP_UDPTCP_Echo_Server_Netconn_RTOS.
If I compile it using IAR 7.40 everything works fine YET when I compile the same code using IAR 6.50 I get an HardFault.
Using LR (from the stack on HardFault) I’ve been able to track down the problem to a macro in FreeRTOS\tasks.c (which seems to run from memory, hence the address).
Since I can put a breakpoint I added a debug variable to find the problematic line.
If I try to debug further (adding more debug code) the location of the hard-fault changes…
Can’t figure out how to track it down, in the vast RTOS/LwIp code…
Also worth mentioning, the error occurs when I plug the ethernet cable and LwIP low_level_input is constantly being called.
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopReadyPriority ] ) );
(Can’t figure out how to insert code! )
[Hard fault handler]
R0 = 20008a8a
R1 = fffffff1
R2 = 20000000
R3 = 20009f68
R12 = 1b8049
LR = 20009f70
PC = 1400
PSR = 8004337
BFAR = 1b804d
CFSR = 8200
HFSR = 40000000
DFSR = b
AFSR = 0