Pumpkin, Inc.

Pumpkin User Forums

OSENABLE_EVENT_READING

For issues specific to ARM7 and ARM9 targets, including compilers (e.g. Keil's RealView MDK) and IDEs (e.g. IAR's C-SPY).

OSENABLE_EVENT_READING

Postby Bummibaer » Mon Nov 12, 2007 7:47 am


Hello,

I've the problem, that the Compiler
throws warnings, when I compile
with OSENABLE_EVENT_READING, but without
OSENABLE_EVENT_TRYING. According to the
documantation, I think, the ladder is
a superset of _READING. Is this wrong?

Steffen

Bummibaer
 
Posts: 15
Joined: Thu Sep 13, 2007 11:00 pm
Location: Dresden,Germany

Re: OSENABLE_EVENT_READING

Postby aek » Tue Nov 27, 2007 10:52 am

Hi Steffen.

Which target? Which compiler? Which Salvo distribution? And what exactly is the Salvo warning?

I tried it with a couple of Salvo 4 builds and got no warnings ... Remember, it's only valid for source-code builds (not library builds).

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

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

Re: OSENABLE_EVENT_READING

Postby Bummibaer » Wed Nov 28, 2007 1:55 am

I've found one Bug:
In salvofpt.h is the the following declaration:

OStypeMsgP OSReturnMsgQ ( OStypeEcbP ecbP,
OStypeBoolean tryMsgQ )

In salvompt.h
#define OSReadMsgQ(ecbP)
OSReturnMsgQ(ecbP)
#endif

and in salvomsgq2.c:
OStypeMsgP OSReturnMsgQ( OStypeEcbP ecbP )

You are seeing the point?

In your 3.x documentation, it is described about count of entries.
How does this belongs together?

Thanks,

Steffen

Bummibaer
 
Posts: 15
Joined: Thu Sep 13, 2007 11:00 pm
Location: Dresden,Germany

Re: OSENABLE_EVENT_READING

Postby aek » Wed Nov 28, 2007 2:11 am

It looks like once upon a time OSReadMsgQ() was intended to have two arguments, the second being a pass-by-pointer argument to a size variable. This apparently was not implemented, despite the text in the user manual.

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

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

Re: OSENABLE_EVENT_READING

Postby aek » Wed Nov 28, 2007 8:23 am

No, because there's another declaration a little ways down that is correct ... it's all based on the value of OSENABLE_EVENT_TRYING. This configuration option controls the argument list to OSReturnMsgQ().

So that is not a bug.

However, this one:

code:
OStypeMsgP  OSReturnMsgQ     ( OStypeEcbP      ecbP,
OStypeMsgQSizeP countP )

in salvofpt.h is wrong -- I'll fix it.

What is the warning message?

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

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

Re: OSENABLE_EVENT_READING

Postby aek » Wed Nov 28, 2007 8:25 am

quote:
In your 3.x documentation, it is described about count of entries.
How does this belongs together?
That looks like out-of-date information. The count argument is no longer used -- I'll fix that.

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

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

Re: OSENABLE_EVENT_READING

Postby Gerald » Mon May 19, 2008 5:25 am

in the ISR i want to know: is the message full (Message already sent, but not OS_Wait is called) or empty (no Message sent)
i am checking this by using OSTryMsg, is that fine with OSTryMsg OSDelay?

ISR(SIG_OUTPUT_COMPARE1A)
{
//....
/* get message pointer (may be 0). */
while((msgP = OSTryMsg(MSG_STEPPER_DRIVER)) != NULL)
{
OS_Delay(1);
}

Global_Struct_Buffer.steps_done = step_pos;
Global_Struct_Buffer.msg_source_stepper_driver = Stepper_ISR_Message;
err = OSSignalMsg(MSG_STEPPER_DRIVER, (OStypeMsgP) &Global_Struct_Buffer); // send to function logic

//...
}

Gerald
 
Posts: 24
Joined: Tue Mar 11, 2008 11:00 pm


Return to ARM (ARM7 & ARM9)

Who is online

Users browsing this forum: No registered users and 0 guests

cron