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