1 /******************************************************************************
2 *
3 * @brief provide header files to be included by all project files.
4 *
5 *******************************************************************************/
6 
7 
8 #ifndef _COMMON_H_
9 #define _COMMON_H_
10 
11 #define swap_bytes(ptrWord)   *ptrWord = (*ptrWord >>8) | (*ptrWord<<8)
12 typedef unsigned long   dword;
13 typedef unsigned short  word;
14 
15 /********************************************************************/
16 
17 /*
18  * Debug prints ON (#define) or OFF (#undef)
19  */
20 
21 #define DEBUG
22 #define DEBUG_PRINT
23 
24 /*
25  * Include the generic CPU header file
26  */
27 #include "arm_cm0.h"
28 
29 /*
30  * Include the platform specific header file
31  */
32 #if (defined(NV32))
33  #include  "NV32_config.h"
34 #elif (defined(FRDM_NV32M3))
35  #include  "NV32M3_config.h"
36 #elif (defined(FRDM_NV32M4))
37  #include  "NV32M4_config.h"
38 #else
39   #error "No valid board defined"
40 #endif
41 
42 /*
43  * Include the cpu specific header file
44 */
45 #if (defined(CPU_NV32))
46  #include "NV32.h"
47 #elif (defined(CPU_NV32M3))
48  #include "NV32M3.h"
49 #elif (defined(CPU_NV32M4))
50  #include "NV32M4.h"
51 #else
52   #error "No valid CPU defined"
53 #endif
54 
55 
56 /*
57  * Include any toolchain specfic header files
58  */
59 #if (defined(__MWERKS__))
60   #include "mwerks.h"
61 #elif (defined(__DCC__))
62   #include "build/wrs/diab.h"
63 #elif (defined(__ghs__))
64   #include "build/ghs/ghs.h"
65 #elif (defined(__GNUC__))
66   #if (defined(IAR))
67     #include "build/gnu/gnu.h"
68   #endif
69 #elif (defined(IAR))
70   #include "iar.h"
71 #elif (defined(KEIL))
72 
73 #else
74 #warning "No toolchain specific header included"
75 #endif
76 
77 /*
78  * Include common utilities
79  */
80 
81 #define ASSERT(x)
82 
83 #if (defined(IAR))
84 #include "intrinsics.h"
85 #endif
86 /********************************************************************/
87 
88 #endif /* _COMMON_H_ */
89