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.

use the sys/bios task demo issue



I am a sys bios beginner.when I create a  project use the task demo in ccsv4.step into Task_sleep(10) function is not return . program is dead.

i cannot find the issue.

/*
* ======== main.c ========
*/

#include <xdc/std.h>

#include <xdc/runtime/Error.h>
#include <xdc/runtime/System.h>

#include <ti/sysbios/BIOS.h>

#include <ti/sysbios/knl/Task.h>

/*
* ======== taskFxn ========
*/
Void taskFxn(UArg a0, UArg a1)
{
System_printf("enter taskFxn()\n");

Task_sleep(10);

System_printf("exit taskFxn()\n");
}

/*
* ======== main ========
*/
Void main()
{
Task_Handle task;
Error_Block eb;

System_printf("enter main()\n");

Error_init(&eb);
task = Task_create(taskFxn, NULL, &eb);
if (task == NULL) {
System_printf("Task_create() failed!\n");
BIOS_exit(0);
}

BIOS_start(); /* enable interrupts and start SYS/BIOS */
}