OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ColdFire_MCF52259_CodeWarrior/] [Freescale_Headers/] [common.h] - Blame information for rev 578

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 jeremybenn
/*
2
 * File:                common.h
3
 * Purpose:             File to be included by all project files
4
 *
5
 * Notes:
6
 *
7
 * License:     All software covered by license agreement in -
8
 *              docs/Freescale_Software_License.pdf
9
 */
10
 
11
#ifndef _COMMON_H_
12
#define _COMMON_H_
13
 
14
/********************************************************************/
15
 
16
/*
17
 * Debug prints ON (#define) or OFF (#undef)
18
 */
19
#undef DEBUG_PRINT 
20
#undef DEBUG_PRINT_D0D1 
21
 
22
/*
23
 * Include the generic CPU header file
24
 */
25
#include "mcf5xxx.h"
26
 
27
/*
28
 * Include the specific CPU header file
29
 */
30
#include "mcf5225x.h"
31
 
32
#include "mcf5225x_evb.h"
33
 
34
/*
35
 * MetroWerks looks for an underscore prepended to C function names
36
 */
37
#define _UNDERSCORE_
38
 
39
/*
40
 * The source uses __interrupt__ to identify a function as
41
 * an interrupt or exception handler.  Codewarrior uses
42
 * __declspec(interrupt), so we are appeasing it like this.
43
 */
44
#define __interrupt__   __declspec(interrupt)
45
 
46
/*
47
 * Force functions to return values in D0
48
 */
49
#pragma pointers_in_D0
50
 
51
/*
52
 * Provide a few assembly instructions for C level routines
53
 */
54
#define halt()      asm( halt)
55
#define nop()       asm( nop)
56
#define tpf()       asm( tpf)
57
#define stop_2700() asm( stop #0x2700)
58
#define stop_2600() asm( stop #0x2600)
59
#define stop_2500() asm( stop #0x2500)
60
#define stop_2400() asm( stop #0x2400)
61
#define stop_2300() asm( stop #0x2300)
62
#define stop_2200() asm( stop #0x2200)
63
#define stop_2100() asm( stop #0x2100)
64
#define stop_2000() asm( stop #0x2000)
65
 
66
/*
67
 * Define custom sections for relocating code, data, and constants
68
 */
69
#pragma define_section relocate_code ".relocate_code" far_absolute RX
70
#pragma define_section relocate_data ".relocate_data" far_absolute RW
71
#pragma define_section relocate_const ".relocate_const" far_absolute R
72
#define __relocate_code__   __declspec(relocate_code)
73
#define __relocate_data__   __declspec(relocate_data)
74
#define __relocate_const__  __declspec(relocate_const)
75
 
76
/*
77
 * Include common utilities
78
 */
79
void assert_failed(char *, int);
80
 
81
#ifdef DEBUG_PRINT
82
#define ASSERT(expr) \
83
        if (!(expr)) \
84
                assert_failed(__FILE__, __LINE__)
85
#else
86
#define ASSERT(expr)
87
#endif
88
 
89
//#include "assert.h"
90
//#include "io.h"
91
//#include "stdlib.h"
92
 
93
 
94
/********************************************************************/
95
 
96
#endif /* _COMMON_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.