AnsweredAssumed Answered

lwIP stuck in FreeRTOS list.c line 150

Question asked by Will Schmid on Jul 6, 2019
Latest reply on Jul 16, 2019 by Victor Jimenez

I am using IAR 8.x with i.MX RT1020 and a modified lwip_examples\lwip_httpsrv project. I have swapped out the server with my own server, but everything else is as it was originally set up.


The code gets stuck in FreeRTOS list.c at line 150. I have looked at all the recommendations provided in the comments at this code location. Macro  configASSERT()  was already set in this project. I have added stack check.


I have attached the stack trace. Function HttpSocket_netconnCB is my own netconn callback, e.g.
netconn_new_with_callback(NETCONN_TCP, HttpSocket_netconnCB)


This is an accept as you can see from the stack trace.


Code line 150:

        /* *** NOTE ***********************************************************
        If you find your application is crashing here then likely causes are
        listed below.  In addition see for
        more tips, and ensure configASSERT() is defined!

            1) Stack overflow -
            2) Incorrect interrupt priority assignment, especially on Cortex-M
               parts where numerically high priority values denote low actual
               interrupt priorities, which can seem counter intuitive.  See
      and the definition
               of configMAX_SYSCALL_INTERRUPT_PRIORITY on
            3) Calling an API function from within a critical section or when
               the scheduler is suspended, or calling an API function that does
               not end in "FromISR" from an interrupt.
            4) Using a queue or semaphore before it has been initialised or
               before the scheduler has been started (are interrupts firing
               before vTaskStartScheduler() has been called?).

        for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) ;