Page 1 of 1

Listing 26: Multitasking With an Event

PostPosted: Sat Mar 11, 2006 3:24 am
by Milind

Hi,

I am using an RTOS for the first time.
I have started by following the examples
given in the SalvoUserManual.pdf
"Chapter 4: Tutorial"

I am using Salvolite for Microchip C18
compiler & MPLAB 7.10 IDE.

While compiling a program that is given
in the SalvoUserManual.pdf.
(Listing 26: Multitasking With an Event)
the compiler gives following error
message:
Error [1105] symbol 'OSecbArea' has not been
defined
----------------------------------------

The following line in the program is causing
this error:
OSCreateBinSem (BINSEM_UPDATE_P , 0 ) ;

I wish to know the reason for this error
message and the solution. Please help.

Regards,
Milind



Re: Listing 26: Multitasking With an Event

PostPosted: Mon Mar 13, 2006 9:45 am
by aek
What is the salvocfg.h for the project you're building?

i suspect you are linking to a Salvo library that does not have events enabled -- hence the linker cannot find Salvo's event objects, which are in OSecbArea[].

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


Re: Listing 26: Multitasking With an Event

PostPosted: Fri Mar 17, 2006 3:27 am
by Milind

I have modified the #define OSEVENTS
in the salvocfg.h file from 0 to 1.
The section of salvocfg.h is as below:-

#define OSUSE_LIBRARY TRUE
#define OSLIBRARY_TYPE OSF
#define OSLIBRARY_GLOBALS OSF
#define OSLIBRARY_CONFIG OSM
#define OSEVENTS 1 /* 0 for multitasking */
#define OSEVENT_FLAGS 0
#define OSMESSAGE_QUEUES 0
#define OSTASKS 2

This resulted in following error message:-

salvolib.h: Library incompatible with 1 > 0 -- aborting.

So I modified the salvolib.h file
as follows:-

#if !defined(OSEVENTS)
#define OSEVENTS 1 /* 0 MODIFICATION*/
#elif OSEVENTS > 1 /* 0 MODIFICATION*/
#error salvolib.h: Library incompatible with OSEVENTS > 0 -- aborting.
#endif

But still the following error messags occurs:-

Error [1105] symbol 'OSecbArea' has not been defined


Re: Listing 26: Multitasking With an Event

PostPosted: Fri Mar 17, 2006 11:49 am
by aek
quote:
So I modified the salvolib.h file
as follows:-
No. Please remove and re-install salvo so that the original salvolib.h is restored.

Your problem is that you have specified a multitasking-only library (OSLIBRARY_CONFIG = OSM) yet you want to use events.

Change to

#define OSLIBRARY_CONFIG OST

and link in a salvo library that has timeouts enabled (which also includes events) -- i.e. the letter code in the library name is 't' and not 'm'.

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

[This message has been edited by aek (edited March 17, 2006).]