Page 1 of 1

OSGetStateTask always return OSTCB_TASK_RUNNING

PostPosted: Thu Jul 06, 2006 9:23 am
by Darukur
Why when I check the state of a task with OSGetStateTask it returns OSTCB_TASK_RUNNING even when the task was never created ? (DESTROYED)
(I´m not using the same OSTCBP for different tasks).



Re: OSGetStateTask always return OSTCB_TASK_RUNNING

PostPosted: Thu Jul 06, 2006 10:50 am
by Darukur
I detected that when I simulate it with MPLAB SIM it return the correct status (OSTCB_DESTROYED)
But when I use the ICD2 it returns OSTCB_TASK_WAITING_TO.

Re: OSGetStateTask always return OSTCB_TASK_RUNNING

PostPosted: Thu Jul 06, 2006 11:04 am
by aek
There are a variety of things you must do for the ICD2 to work correctly -- including setting it up so that it downloads the W register, breaking on real breakpoints, etc.

In general, the ICD2 does not present many problems.

I would suggest setting up a very basic Salvo application (e.g. one task that delays itself for 1s and toggles an LED) and get it to work on both real hardware (via the ICD2) and in the SIM.

------------------