For information on configuring timestamp drivers into VxWorks, see the Tornado User's Guide: Projects. The configuration macro for this facility is INCLUDE_TIMESTAMP; selecting it makes the timestamp timer routines available to instrumentation logging routines with wvTmrRegister( ).1 This enables the code in usrRoot( ) (in installDir/target/config/all/usrConfig.c) that connects the timestamp driver to the VxWorks kernel instrumentation package.
If you use the standard routine names (described in G.3 Timestamp Driver Interface), no other changes are necessary. However, you can also create routines with custom names. This is necessary if a VxWorks timestamp driver is already available for a particular target board, and an alternate driver is to be connected. If this is the case, define INCLUDE_USER_TIMESTAMP as well as INCLUDE_TIMESTAMP, to connect the routines named by the USER_TIMExxx macros instead of the default timestamp routines. This does not change in any way the functionality required for any of the routines. It merely provides the ability to connect routines with different names. The connected routines must still adhere to the requirements and functionality specified in G.3 Timestamp Driver Interface.
The kernel instrumentation expects each rollover event to trigger a call to the timestamp callback routine (saved in the variable sysTimestampRoutine). As described in section Using the VxWorks System Clock Timer, the timestamp driver may use the VxWorks system clock facility. If sysTimestampConnect( ) returns ERROR, the VxWorks kernel instrumentation assumes the system clock is used, and relies on the system clock tick to signal a timestamp timer rollover event.
1: See the VxWorks Reference Manual or the reference entry online for information about wvTmrRegister( ).