Interfaces Compiler

gcc

The GNU gcc is available for many platforms and targets. In the section below we concentrate on the compiler bridge for a PowerPC.

PowerPC


Files Description
WSTCompiler.h This file defines the following types:
  • RiCBoolean
myboolean (see note below)
  • timeUnit
unint32
  • RiCHandle
sint8
  • gen_ptr
void *
  • eventID_t
sint16
This file defines the following macros:
  • WST_TM_OVERFLOW
INT_MAX
  • MALLOC_ARGUMENT_TYPE
size_t
  • MALLOC_RETURN_TYPE
void *
  • FREE_ARGUMENT_TYPE
void *
  • FREE_RETURN_TYPE
void
  • TRUE
1
  • FALSE
0
  • WST_NEARD

  • WST_FARD

  • WST_NEARC

  • WST_FARC

  • WST_NEARD_ADDRESS_SIZE1
32
  • WST_FARD_ADDRESS_SIZE1
32
  • WST_NEARC_ADDRESS_SIZE1
32
  • WST_FARC_ADDRESS_SIZE1
32
  • WST_TIMEUNIT_ADDRESS_SIZE1
32
  • RIC_OS_TOLOWER_DEFINED_IN_CTYPE

  • RiC_UINT64
unsigned long
  • RiC_INT32_MIN
(sint32) INT_MIN
  • RiC_INT32_MAX
(sint32) INT_MAX
  • RhpPositive_MAX
(uint32) UINT_MAX

1 ANSI-C does not allow for use of the sizeof operator in preprocessor statements, which is why we use these _ADDRESS_SIZE macros. These macros are used for Memory Section Management.
         
WSTCompiler.c
  • WSTCompiler_Init()
This function calls init_mempool() or xinit_mempool() using a constant INIT_MEMPOOL.

WSTCompilerTypes.h This file may be part of a Board Support Package installation, and its types may be visible inside a Rhapsody project.
 
This file defines the following types:
  • sint8
signed char
  • uint8
unsigned char
  • sint16
signed short
  • uint16
unsigned short
  • sint32
signed int
  • uint32
unsigned int
  • myboolean  (see note below)
int
  • char_t
char
  • int_t
int
  • struct_t
unsigned int

Note    The type myboolean is used instead of boolean. This has to do with the fact that in Microsoft and Cygwin environments, the type boolean is already known. The file WSTCompilerTypes.h may be overwritten by Rhapsody generated one for example when using own defined data types in Rhapsody models. A generated WSTCompilerTypes.h may not define the type boolean and to be compatible we define myboolean in the Compiler Bridge file as well as the example Rhapsody project WSTCompilerTypes.




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