This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432E401Y: Having difficulty making a struct not NULL in udpecho w/FreeRTOS example

Part Number: MSP432E401Y

Hello All,

I'm not really sure what to make of the code above. It seems that the contents of ifNode are set to NULL, then the program asks if the top level of the struct ifNode is NULL?
I need ifNode to not be NULL when reaching this line, because if it is then the function simply returns a NULL struct, no interface is created for my socket, then my socket fails to be created. Problem is, I have no idea how to make it such that ifNode isn't NULL.
I've tried cheating and simply forcing the while loop to run by changing its conditions, at which point the function completes just fine but causes a fault later during socket creation. 
I believe that the part I've circled up above in the debugger screenshot is what's being checked as NULL and causing the problem. How do I set it to not be NULL? There also do not appear to be any functions that must be called prior to this one in order to set this up properly, that was my first thought.


  • I'm not familiar with the TI Net library, but I suspect that SlNetIf_listHead points to a chain of network interfaces (the Ethernet would be one of them), and no interface has been added to the list yet. In some networking implementations, the IF isn't added until it's "ready" in some sense.

    You could start by searching for that name and looking for assignments, to see what event(s) causes something to be added to the list.

  • I tried something like that perfore to no success. I tried with greater fervor following your response. The best I can find is a function in the same library called SlNetIf_add(...). See Screenshot.

    I've been trying but I can't seem to get past the first if statement returning an error code that I have given an invalid input. Here are some things I have tried, one of which includes using the SlNetIf_add( ) function.

    If I call the SlNetIf_add function, I always receive an error because ifID always has 2 bits set rather than 1.

    If I try ti edit SlNetIf_listHead directly, I receive a processor fault and my program is thrown into the ISR fault infinite while loop.

    I am testing primarily from within the SlNetSock_create function.

  • UPDATE: It seems I failed to read the documentation in the SlNetIf.h library, only observing the code itself written in SlNetIf.c

    I am nearly through with using the SlNetIf_add(...) function but I am having difficulty etnering a suitable const SlNetIf_Config_t *ifConf argument int the function. You have helped me greatly get to this point though, and I feel how to properly use this is something that I should post in a seperate question after working on it more.

    Thank you so much for your help Mr. Mckenney.

    For anyone who finds this in the future, here is a screenshot of the relevant commentation I used to solve my issue.

**Attention** This is a public forum