atuconf.h

Target Deployment Technology

Original Location: lib folder

Template: templatec.xdp

The following list is not exhaustive but it contains most of the typical TDP settings found in earlier Target Deployment Port releases.  All TDP Editor references are located in the Library Settings section.

 

Old TDP Settings

New Customization Points

#define ANSI_C

Target Compiler Specifics

Linkage Directives

RTRT_KR

 

The default value is unselected. Keep this setting unselected if ANSI_C is defined.

#define USE_OLD 1

Environmental Constraints

sprintf function avaliability

RTRT_SPRINTF

 

If USE_OLD is set to 1, select RTRT_SPRINTF.

#define ATTOL_HEADER_MAIN int main(void) {

empty_func();

}

For Test RealTime Testing Features

Test program entry point prototype and termination instruction

RTRT_MAIN_HEADER

 

RTRT_MAIN_HEADER equals ATTOL_HEADER_MAIN.

 

Note   empty_func() was a function used to initialize a set of unused variables. This function is no longer needed. As a result, it is not necessary to redefine main() unless 'main' is not the name of the entry function.

Copy #define ATTOL_RETURN_MAIN return (0);

For Test RealTime Testing Features

Test program entry point prototype and termination instruction

RTRT_MAIN_RETURN

 

RTRT_MAIN_RETURN equals the value of ATTOL_RETURN_MAIN.

#define USE_STRING 0

For Test RealTime Testing Features

String support

RTRT_STRING

 

If USE_STRING is set to 0, deselect RTRT_STRING.

#define USE_FLOAT 0

For Test RealTime Testing Features

Floating-point number support

RTRT_FLOAT

 

If USE_FLOAT was set to 0, deselect RTRT_FLOAT.

Either of the following statements:

a. #define ATL_EXIT exit(0)

b. #define ATL_EXIT

c. #define ATL_EXIT my_exit

Environmental Constraints

exit function availability

RTRT_EXIT

 

Set RTRT_EXIT to RTRT_STD if ATL_EXIT is set to exit(0).

Set RTRT_EXIT to RTRT_NONE if ATL_EXIT is undefined.

Set RTRT_EXIT to RTRT_USR if ATL_EXIT was defined to a user-defined function, and copy the code from this function to the usr_exit section.

Either of the following statements:

a. #define STD_TIME_FUNC

b. #define USR_TIME_FUNC

   int usr_time() {

   /* Return current clock value*/ return(-1);

   }

c. No clock interface defined.

Clock Interface

RTRT_CLOCK

 

If STD_TIME_FUNC is defined, set RTRT_CLOCK to RTRT_STD.

If USR_TIME_FUNC is defined, set RTRT_CLOCK to RTRT_USR and copy the code from usr_time to the usr_clock section.

If no clock interface was defined, set RTRT_CLOCK equal to RTRT_NONE.

Either of the following statements:

 #define STD_DATE_FUNC

b. #define USR_DATE_FUNC

   void usr_date(char *s) {

   /* Sets s to the current date */ s[0]=0;

  }

c. Nothing date interface defined

 

No longer needed; dates are supplied by the host.

Either of the following statements:

a. #define STD_IO_FUNC

b. #define USR_IO_FUNC

   typedef int usr_file;

   usr_file usr_open(char *name) {

   /* Open the file named name */

   usr_file x=1;

   return(x);

   }

   void usr_writeln(usr_file file,char *str) {

   /* Print str into file and add \n */

   printf("%s",str);

   }

   void usr_close(usr_file file) {

   /* Close the file */

   }

c. Nothing defined for IO

Data Retrieval and Error Output

Test and runtime analysis results output

RTRT_IO

 

If STD_IO_FUNC is defined, set RTRT_IO to the RTRT_STD value.

If USR_IO_FUNC is defined, set RTRT_IO to RTRT_USR, set RTRT_FILE_TYPE to the usr_file type, and write code for the functions usr_open, usr_writeln and usr_close into the corresponding usr_open, usr_writeln and usr_close sections.

If no data retrieval function was defined, set RTRT_IO to RTRT_NONE.

#define BUFFERED_IO

 

No longer necessary; this is the default mode.

 

 

Old TDP Settings

New Customization Points

#define ANSI_C

Target Compiler Specifics

Linkage Directives

RTRT_KR

 

The default value is unselected. Keep this setting unselected if ANSI_C is defined.

#define USE_OLD 1

Environmental Constraints

sprintf function avaliability

RTRT_SPRINTF

 

If USE_OLD is set to 1, select RTRT_SPRINTF.

Either of the following statements:

a. #define ATL_EXIT exit(0)

b. #define ATL_EXIT

c. #define ATL_EXIT my_exit

Environmental Constraints

exit function availability

RTRT_EXIT

 

Set RTRT_EXIT to RTRT_STD if ATL_EXIT is set to exit(0).

Set RTRT_EXIT to RTRT_NONE if ATL_EXIT is undefined.

Set RTRT_EXIT to RTRT_USR if ATL_EXIT was defined to a user-defined function, and copy the code from this function to the usr_exit section.

Either of the following statements:

a. #define STD_TIME_FUNC

b. #define USR_TIME_FUNC

   int usr_time() {

   /* Return current clock value*/ return(-1);

   }

c. No clock interface defined.

Clock Interface

RTRT_CLOCK

 

If STD_TIME_FUNC is defined, set RTRT_CLOCK to RTRT_STD.

If USR_TIME_FUNC is defined, set RTRT_CLOCK to RTRT_USR and copy the code from usr_time to the usr_clock section.

If no clock interface was defined, set RTRT_CLOCK equal to RTRT_NONE.

Either of the following statements:

 #define STD_DATE_FUNC

b. #define USR_DATE_FUNC

   void usr_date(char *s) {

   /* Sets s to the current date */ s[0]=0;

  }

c. Nothing date interface defined

 

No longer needed; dates are supplied by the host.

Either of the following statements:

a. #define STD_IO_FUNC

b. #define USR_IO_FUNC

   typedef int usr_file;

   usr_file usr_open(char *name) {

   /* Open the file named name */

   usr_file x=1;

   return(x);

   }

   void usr_writeln(usr_file file,char *str) {

   /* Print str into file and add \n */

   printf("%s",str);

   }

   void usr_close(usr_file file) {

   /* Close the file */

   }

c. Nothing defined for IO

Data Retrieval and Error Output

Test and runtime analysis results output

RTRT_IO

 

If STD_IO_FUNC is defined, set RTRT_IO to the RTRT_STD value.

If USR_IO_FUNC is defined, set RTRT_IO to RTRT_USR, set RTRT_FILE_TYPE to the usr_file type, and write code for the functions usr_open, usr_writeln and usr_close into the corresponding usr_open, usr_writeln and usr_close sections.

If no data retrieval function was defined, set RTRT_IO to RTRT_NONE.

#define BUFFERED_IO

 

No longer necessary; this is the default mode.