]> git.sur5r.net Git - freertos/blob - Demo/SuperH_SH7216_Renesas/RTOSDemo/RenesasCode/compiler.h
Start to re-arrange files to include FreeRTOS+ in main download.
[freertos] / Demo / SuperH_SH7216_Renesas / RTOSDemo / RenesasCode / compiler.h
1 /******************************************************************************\r
2 * File Name    : compiler.h\r
3 * Version      : 1.0\r
4 * Device(s)    : Renesas\r
5 * Tool-Chain   : Renesas SH2A V9+\r
6 * OS           : None\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
13 \r
14 /******************************************************************************\r
15 * DISCLAIMER\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
24 * DISCLAIMED.\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
39 \r
40 #ifndef COMPILER_H_INCLUDED\r
41 #define COMPILER_H_INCLUDED\r
42 \r
43 /******************************************************************************\r
44 Defines\r
45 ******************************************************************************/\r
46 \r
47 /* Embedded CPU data type definitions */\r
48 \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
54 \r
55 /* Test the compiler intrinisic defs */\r
56 #ifdef __GNUC__                     /* GNU compiler - C mode   */\r
57 #define COMPILER    GNU\r
58 \r
59 #elif defined(__GNUG__)             /* GNU compiler - C++ mode */\r
60 #define COMPILER    GNU\r
61 \r
62 #elif defined __IAR_SYSTEMS_ICC     /* IAR compiler */\r
63 #define COMPILER    IAR\r
64 \r
65 #elif defined _MSC_VER              /* Microsoft c compiler */\r
66 #define COMPILER    MSV\r
67 #else\r
68                                     \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
74 #endif\r
75 \r
76 /******************************************************************************\r
77 Pragma macros\r
78 ******************************************************************************/\r
79                                     /* Visual Cpp */\r
80 #if COMPILER == MSV\r
81 #define PACK1                       pack(1)\r
82 #define UNPACK                      pack()\r
83 #else\r
84                                     /* MCS SH & H8S series recently got unified\r
85                                        pragma syntax */\r
86 #define PACK1                       # ## pragma pack 1\r
87 #define UNPACK                      # ## pragma unpack\r
88 #endif\r
89 \r
90 #endif /* COMPILER_H_INCLUDED */\r
91 \r
92 /******************************************************************************\r
93 End  Of File\r
94 ******************************************************************************/\r