Page 1 of 1

Can't generate code for expression...compiler response

PostPosted: Mon Nov 10, 2003 4:02 am
by din
Hi,

In the file msg.c, the expression

code:

OSMsg("OSWaitMsg",
OSMakeStr("task %d acquired message %d (now %d).", OStID(OScTcbP), OSeID(ecbP), ecbP->event.msgP));

returns an error with my ht-pic v8.01 compiler.

quote:
Can't generate code for expression...

The expression may be simplified.


Re: Can't generate code for expression...compiler response

PostPosted: Mon Nov 10, 2003 5:21 am
by aek
Again, need more info.

The various problems you're having seem to suggest a more serious problem -- with a current Salvo release and an up-to-date version of PICC, you shouldn't be having these problems.

Plus, all of the code you've listed is "active" in the various Salvo Pro tutorial builds, which build fine (e.g. salvo ut u6sysa u6pro.mcp, which has to build msg.c).

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


Re: Can't generate code for expression...compiler response

PostPosted: Mon Nov 17, 2003 5:30 am
by din
Here are details:
I am using the release 3.2.3 for PIC MCU's that is available via ftp.

My compiler: ht-pic 8.01 PL1.

OSLOGGING is set to TRUE.

This can be a compiler limitation. The user manual tells that I may simplify the expression and/or pass through a temporary variable.

To be totally honest, I wrote my own OSMakeStr function cause the standard io library - supplied with the compiler - does not know the function called 'vsprintf'.


Re: Can't generate code for expression...compiler response

PostPosted: Mon Nov 17, 2003 12:03 pm
by aek
I suspect one of the major reasons why you're seeing this sort of problem is that most of the logging features in Salvo are expected to be used when Salvo is running on an x86, and not the intended embedded target.

For example, we develop in CodeWarrior x86, which has far fewer limitations on complex expressions, etc. than do the embedded compilers we suppprt.

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