Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: tasks don't start

$
0
0

I define a task in a tconf file as follows:

    var pTask = bios.TSK.create("pTask");

    pTask.priority = 2;

    pTask["fxn"] = prog.extern("printTask");

The task itself starts this way:

   Void printTask()

   {
      // here we go, wait for some stuff and then print it.
      log [6] = 135;
      SEM_pendBinary(monitorSem, SYS_FOREVER); // entering monitor
      log [0] = 134;
      log [1] = SEM_count(writeSem);
      log [2] = SEM_count(monitorSem);
     log [4] = SEM_count(readSem);
     log [5] = 0

I run this code in the simulator. After the return from main nothing happens. The values in the log array are all zero. 

RTOS object view shows two tasks, one the idle task and the other pTask. Both are in state ready.

Why is the task not running?


Viewing all articles
Browse latest Browse all 25965

Trending Articles