According to the Tornado documentation, if the INCLUDE_SPY macro is
defined, then the spyLib functionality will be available. I've tried
both under the "C/C++ Compiler" tab (by adding: -DINCLUDE_SPY) and
under the "Macros" tab for the Properties:Build Specification. And
when I tried to call any of the spyLib routine (either via the shell,
or from my code), I received the following:
'spy not configured into this system'
Any help would be greatly appreciated.
Thanks,
Christopher Campise
If you are using Tornado 2/vxWorks 5.4, you should be able to
enable the spy utility by making sure your Kernel has it selected
in the vxWorks Project Facility Tab. If you are building from the
command line, you should be able to #define INCLUDE_SPY to your
config.h file, after the #include "configAll.h" statement. Are
you using this version of Tornado? You can also review the on-line
help (are you using Windows or Unix as your Host?) for spy.
spyLibInit( )
NAME
spyLibInit( ) - initialize task cpu utilization tool package
SYNOPSIS
void spyLibInit (void)
DESCRIPTION
This routine initializes the task cpu utilization tool package. If
the configuration macro INCLUDE_SPY is defined, it is called by the root
task, usrRoot( ), in usrConfig.c.
RETURNS
N/A
SEE ALSO
spyLib, usrLib
For the project facility, as long as spyLib.o exists in your
archive libYOURARCHgnuvx.a or whatever it is, the project will
allow you to include this. I thought the High resolution clock
needed to be in your BSP and I always add the AUX clock, but
other than that, I am at a loss. BTW, what is your BSP? Maybe
someone with the same BSP could shed some light on this one.
> I need to include the spyLib utility in order to profile some of my
> application code. Now, being new to Tornado, I was curious as to
> where in my project I add the configuration macro (INCLUDE_SPY)?
The "old" style approach is to add the following line to config.h:
#define INCLUDE_SPY
The "new" approach is to use the project facility. In your
Workspace, select the appropriate project, and click the
VxWorks tab. Then, expand "development tool components"
and select "spy" ... right mouse click, include 'spy,' and
"OK."
Cheers,
Tim.