3 * Purpose: File to be included by all project files
\r
7 * License: All software covered by license agreement in -
\r
8 * docs/Freescale_Software_License.pdf
\r
14 /********************************************************************/
\r
17 * Debug prints ON (#define) or OFF (#undef)
\r
20 #undef DEBUG_PRINT_D0D1
\r
23 * Include the generic CPU header file
\r
25 #include "mcf5xxx.h"
\r
28 * Include the specific CPU header file
\r
30 #include "mcf5225x.h"
\r
32 #include "mcf5225x_evb.h"
\r
35 * MetroWerks looks for an underscore prepended to C function names
\r
37 #define _UNDERSCORE_
\r
40 * The source uses __interrupt__ to identify a function as
\r
41 * an interrupt or exception handler. Codewarrior uses
\r
42 * __declspec(interrupt), so we are appeasing it like this.
\r
44 #define __interrupt__ __declspec(interrupt)
\r
47 * Force functions to return values in D0
\r
49 #pragma pointers_in_D0
\r
52 * Provide a few assembly instructions for C level routines
\r
54 #define halt() asm( halt)
\r
55 #define nop() asm( nop)
\r
56 #define tpf() asm( tpf)
\r
57 #define stop_2700() asm( stop #0x2700)
\r
58 #define stop_2600() asm( stop #0x2600)
\r
59 #define stop_2500() asm( stop #0x2500)
\r
60 #define stop_2400() asm( stop #0x2400)
\r
61 #define stop_2300() asm( stop #0x2300)
\r
62 #define stop_2200() asm( stop #0x2200)
\r
63 #define stop_2100() asm( stop #0x2100)
\r
64 #define stop_2000() asm( stop #0x2000)
\r
67 * Define custom sections for relocating code, data, and constants
\r
69 #pragma define_section relocate_code ".relocate_code" far_absolute RX
\r
70 #pragma define_section relocate_data ".relocate_data" far_absolute RW
\r
71 #pragma define_section relocate_const ".relocate_const" far_absolute R
\r
72 #define __relocate_code__ __declspec(relocate_code)
\r
73 #define __relocate_data__ __declspec(relocate_data)
\r
74 #define __relocate_const__ __declspec(relocate_const)
\r
77 * Include common utilities
\r
79 void assert_failed(char *, int);
\r
82 #define ASSERT(expr) \
\r
84 assert_failed(__FILE__, __LINE__)
\r
86 #define ASSERT(expr)
\r
89 //#include "assert.h"
\r
91 //#include "stdlib.h"
\r
94 /********************************************************************/
\r
96 #endif /* _COMMON_H_ */
\r