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.

VStartSimpleLinkSpawnTask function stuck



Hi!

I'm trying to port the udp socket example into a freeRTOS environment and my code won't get through the VStartSimpleLinkSpawnTask function call, it never returns. My initialisation goes here:

int slconnect_init(void) {
    long lRetVal = -1;

    lRetVal = VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY);

    if(lRetVal < 0)
    {
        uartstdio_if_printf("Failed to spawn task. \n\r");
        return (int) lRetVal;
    }
    uartstdio_if_printf("Success spawning task. \n\r");

    //
    // Start the WlanStationMode task
    //
    lRetVal = osi_TaskCreate( WlanStationMode, \
                                (const signed char*)"Wlan Station Task", \
                                OSI_STACK_SIZE, NULL, 1, NULL );
    if(lRetVal < 0)
    {
        uartstdio_if_printf("Failed to create task. \n\r");
        return (int) lRetVal;
    }

    uartstdio_if_printf("Device is configured in default state \n\r");
    return 0;
}

My main function calls some other functions which create other tasks and finally, the main starts the task scheduler. My code stuck at vApplicationMallocFailedHook, indicating memory allocation problems. I've tried to change heap_1 to heap_others but no success. Maybe I'm overlooking something so any help would be great!