Pumpkin, Inc.

Pumpkin User Forums

configuring to supress OSIdlingHook

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

configuring to supress OSIdlingHook

Postby cstone » Wed Jul 09, 2003 5:53 am

Hello Forum People,

I'm a definite Salvo newbie, so here goes ..

I just fought a little skirmish
with my MPLab v6.3 MCC18 compiler
project using the slc18sft.lib library
and these lines (among others) in my salvocfg.h

#define OSUSE_LIBRARY TRUE
#define OSLIBRARY_TYPE OSL
#define OSLIBRARY_GLOBALS OSF
#define OSLIBRARY_CONFIG OST
#define OSLIBRARY_VARIANT OSNONE

/* #define OSENABLE_IDLING_HOOK TRUE */


I also tried defining OSENABLE_IDLING_HOOK
= TRUE and also tried = FALSE

The linker error informed that the OSIdlingHook function was not defined.

salvo.h declared it:
void OSIdlingHook ( void );

So, I DEFINED it in my application file:
This WORKED, so I'm calling it a WIN !

QUESTION: Is this what is supposed to be done, or is there a way to use OSENABLE_IDLING_HOOK or some other means to
supress it ??


Thanks in advance,

cstone

cstone
 
Posts: 6
Joined: Tue Jul 08, 2003 11:00 pm
Location: Eugene, Oregon, USA

Re: configuring to supress OSIdlingHook

Postby aek » Wed Jul 09, 2003 6:12 am

Hi Crosby.

Take a peek in the Salvo User Manual, Chapter 5 * Configuration. Keep the Bookmarks tab open in Acrobat.

See how OSENABLE_IDLING_HOOK is in the "Configuration Options for Source COde Distributions" section? This means that it has no effect on a library build (what you're doing) -- it only affects projects that are build wholly from the Salvo source code. So, you should NOT have #define OSENABLE_IDLING_HOOK in your salvocfg.h. Also see the examples in the Salvo Compiler Reference Manual for MPLAB-C18 -- the salvocfg.h's for library builds are really that short!

Now, as to your specific problem. You're using pre-release v3.2 code. In v3.2, a default OSIdlingHook() has been defined in each library where it's appropriate (e.g. in the library you're using). So, you don't have to define any OSIdlingHook(). See the tutorial examples -- they don't define one, either.

We did this for v3.2 so that people don't have to define OSIdlingHook() if the don't need a non-default/dummy one.

If you want your own OSIdlingHook(), then define one somewher, and the linker will use it instead of the dummy function that's in the library.

Regards,

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

-------
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 3 guests

cron