rtel wrote on Thursday, January 10, 2019:
Looking at the FreeRTOS_socket() function (which you have the source
code for, and can step through in the debugger), it seems like the only
reasons FREERTOS_INVALID_SOCKET would get returned are:
-
prvDetermineSocketSize() fails. You can look through this function
to see the reasons this could fail - basically network is not ready or
an input parameter is wrong. -
The socket structure cannot be created (is pvPortMallocSocket() just
mapped to pvPortMalloc(), which is the default? If so, which memory
allocater are you using? Heap_1, heap_2, etc.) -
xEventGroupCreate() fails, which again is just a memory allocation,
so same as #2.