Pumpkin, Inc.

Pumpkin User Forums

OSGetStateTask always return OSTCB_TASK_RUNNING

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

OSGetStateTask always return OSTCB_TASK_RUNNING

Postby Darukur » Thu Jul 06, 2006 9:23 am

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).


the one that does not know what looks for does not understand what finds
Darukur
 
Posts: 12
Joined: Sun Jun 25, 2006 11:00 pm
Location: Mar del Plata, Buenos Aires, Argentina

Re: OSGetStateTask always return OSTCB_TASK_RUNNING

Postby Darukur » Thu Jul 06, 2006 10:50 am

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.
the one that does not know what looks for does not understand what finds
Darukur
 
Posts: 12
Joined: Sun Jun 25, 2006 11:00 pm
Location: Mar del Plata, Buenos Aires, Argentina

Re: OSGetStateTask always return OSTCB_TASK_RUNNING

Postby aek » Thu Jul 06, 2006 11:04 am

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.

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 2 guests