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.

manual generation for stack thread

Hello,

i'm using TM4C129 with XDCtool xdctools_3_31_02_38_core and TI-RTOS tirtos_tivac_2_14_00_10.

this thread should be related to

such that I'm trying to create the stack thread manually, but my problem is the socket function is always fail and return -1. more debugging, I found that the function

Task_getHookContext is always returning NULL, so the socket function failed.

here is the stack tracing for more description for the function call.

TaskGetEnv(void *, int)() at task.c:390 0x000459BE  
fdint_getfdt(void *)() at file.c:210 0x0006B4D8  
NDK_socket(int, int, int)() at socket.c:1,450 0x000577A0  
socket(int, int, int)() at socket.h:282 0x0006D062  

So why the socket function fail only if I tried to manually create the stack thread while if I tired to generate the stack thread using the GUI, it will work properly?

Thanks,

Mohammed Fawzy

  • Hi Mohammed,

    Have you checked the error code? You can get error code by calling fdError().

    Can you share your manually created stack thread code and the stack thread code created using GUI?

    Vikram
  • HI Vikram,

    Actually i figured out the problem, it seems that due to disabling the Stack generation using the GUI, the call for the
    fdOpenSession(TaskSelf());
    fdCloseSession(TaskSelf());
    had been stopped on the tasks that create, send, receive, so on .
    so once i added them, every thing worked properly.

    Thanks,
    Mohammed Fawzy