Interfaces Target


In each IDE project which results in an application, there are some extra target dependant files which you use. These usually come with an evaluation board. The startup file can be generated / copied from a template by IDE when you create a new project. 
The example which is part of your product release is suitable for a TQ Systems Evaluation Board.
To interface with an ? target, the files WSTTarget.h and WSTTarget.c have been implemented as follows:

Files Description
WSTTarget.h This file defines the following constant if the constant WST_RTOS_NONE is set, 
  • RIC_MS_PER_TICK
This constant defaults to 10.
Please refer to a section on Porting to a Target to see if this value is correct for your hardware or details on your Board Support Package, if any.


This file defines prototypes for the following functions:
  • WSTTarget_Init
Its prototype is:

void     WSTTarget_Init( void );
  • WSTTarget_Cleanup
Its prototype is:

void     WSTTarget_Cleanup( void );

This file defines prototypes for the following functions if the constant WST_RTOS_NONE is set:
  • WSTTarget_enterCriticalRegion
This function is implemented as:
  • for the Keil C166 as _atomic_( 0 )
  • for the Tasking C166 compilers, its prototype is defined as:
               void    WSTTarget_enterCriticalRegion( void );
  
  • WSTTarget_exitCriticalRegion
This function is implemented as:
  • for the Keil C166 as _endatomic_()
  • for the Tasking C166 compilers, its prototype is defined as:
               void    WSTTarget_exitCriticalRegion( void );
  • WSTTarget_timerInterrupt
This function is added as wrapper to WSTRTOS_incrementRxfTicks()

Its prototype is for the Tasking C166 V8.7 toolchain:

interrupt (0x20) void  WSTTarget_timerInterrupt( void );

 
Its prototype is for the Keil C166 and the Tasking C166 VX toolchain:

void  WSTTarget_timerInterrupt( void );
WSTTarget.c This file implements the following functions:
  • WSTTarget_Init
If  WST_RTOS_NONE is set, this function initializes the Timer 0 and enables all interrupts.
  • WSTTarget_Cleanup
This function is left empty.


This file also implements the following functions if the constant WST_RTOS_NONE is set:
  • WSTTarget_enterCriticalRegion
This function is implemented as:
  • for the Keil C166 this is a macro, see WSTTarget.h
  • for the Tasking C166 compilers, it is implemented as disable all  interrupts
  • WSTTarget_exitCriticalRegion
This function is implemented as:
  • for the Keil C166 this is a macro, see WSTTarget.h
  • for the Tasking C166 compilers, it is implemented as enable all interrupts
  • WSTTarget_timerInterrupt
This function serves as wrapper to WSTRTOS_incrementRxfTicks() 



Copyright (c) Willert Software Tools GmbH. All rights reserved.