1 /******************************************************************************
\r
2 * File Name : compiler.h
\r
4 * Device(s) : Renesas
\r
5 * Tool-Chain : Renesas SH2A V9+
\r
7 * H/W Platform : SH2A
\r
8 * Description : Compiler specific defines for abstraction
\r
9 *******************************************************************************
\r
10 * History : DD.MM.YYYY Ver. Description
\r
11 * : 01.08.2009 1.00 MAB First Release
\r
12 ******************************************************************************/
\r
14 /******************************************************************************
\r
16 * This software is supplied by Renesas Technology Corp. and is only
\r
17 * intended for use with Renesas products. No other uses are authorized.
\r
18 * This software is owned by Renesas Technology Corp. and is protected under
\r
19 * all applicable laws, including copyright laws.
\r
20 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES
\r
21 * REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY,
\r
22 * INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
\r
23 * PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY
\r
25 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
\r
26 * TECHNOLOGY CORP. NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
\r
27 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
\r
28 * FOR ANY REASON RELATED TO THE THIS SOFTWARE, EVEN IF RENESAS OR ITS
\r
29 * AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
\r
30 * Renesas reserves the right, without notice, to make changes to this
\r
31 * software and to discontinue the availability of this software.
\r
32 * By using this software, you agree to the additional terms and
\r
33 * conditions found by accessing the following link:
\r
34 * http://www.renesas.com/disclaimer
\r
35 ******************************************************************************/
\r
36 /* Copyright (C) 2008. Renesas Technology Corp., All Rights Reserved. */
\r
37 /* Copyright (C) 2009. Renesas Technology Europe Ltd., All Rights Reserved. */
\r
38 /*****************************************************************************/
\r
40 #ifndef COMPILER_H_INCLUDED
\r
41 #define COMPILER_H_INCLUDED
\r
43 /******************************************************************************
\r
45 ******************************************************************************/
\r
47 /* Embedded CPU data type definitions */
\r
49 /* Set a few #defines for potential compilers used */
\r
50 #define MCS 0 /* Hitachi */
\r
51 #define GNU 1 /* Hitachi + many other devices */
\r
52 #define IAR 2 /* Hitachi + some other devices */
\r
53 #define MSV 3 /* Microsoft Visual C */
\r
55 /* Test the compiler intrinisic defs */
\r
56 #ifdef __GNUC__ /* GNU compiler - C mode */
\r
57 #define COMPILER GNU
\r
59 #elif defined(__GNUG__) /* GNU compiler - C++ mode */
\r
60 #define COMPILER GNU
\r
62 #elif defined __IAR_SYSTEMS_ICC /* IAR compiler */
\r
63 #define COMPILER IAR
\r
65 #elif defined _MSC_VER /* Microsoft c compiler */
\r
66 #define COMPILER MSV
\r
69 #define COMPILER MCS /* MCS compiler */
\r
70 /* MCS compiler has MSB first even in little
\r
71 endian mode unless #pragma or command
\r
72 line switch used to change it */
\r
73 #define _BITFIELDS_MSB_FIRST_
\r
76 /******************************************************************************
\r
78 ******************************************************************************/
\r
81 #define PACK1 pack(1)
\r
82 #define UNPACK pack()
\r
84 /* MCS SH & H8S series recently got unified
\r
86 #define PACK1 # ## pragma pack 1
\r
87 #define UNPACK # ## pragma unpack
\r
90 #endif /* COMPILER_H_INCLUDED */
\r
92 /******************************************************************************
\r
94 ******************************************************************************/
\r