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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [SuperH_SH7216_Renesas/] [RTOSDemo/] [resetprg.c] - Blame information for rev 585

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 585 jeremybenn
/***********************************************************************/
2
/*                                                                     */
3
/*  FILE        :resetprg.c                                            */
4
/*  DATE        :Sun, Dec 27, 2009                                     */
5
/*  DESCRIPTION :Reset Program                                         */
6
/*  CPU TYPE    :Other                                                 */
7
/*                                                                     */
8
/*  This file is generated by Renesas Project Generator (Ver.4.16).    */
9
/*                                                                     */
10
/***********************************************************************/
11
 
12
 
13
 
14
#include        <machine.h>
15
#include        <_h_c_lib.h>
16
//#include      <stddef.h>                                      // Remove the comment when you use errno
17
//#include      <stdlib.h>                                      // Remove the comment when you use rand()
18
#include        "typedefine.h"
19
#include        "stacksct.h"
20
 
21
#define SR_Init    0x000000F0
22
#ifdef _FPD     // when -fpu=double is specified
23
#define FPSCR_Init 0x000C0001
24
#else
25
#define FPSCR_Init 0x00040001
26
#endif
27
#define INT_OFFSET 0x10
28
 
29
extern _UINT INT_Vectors;
30
 
31
#ifdef __cplusplus
32
extern "C" {
33
#endif
34
void PowerON_Reset_PC(void);
35
void Manual_Reset_PC(void);
36
void main(void);
37
#ifdef __cplusplus
38
}
39
#endif
40
 
41
//#ifdef __cplusplus                            // Enable I/O in the application(both SIM I/O and hardware I/O)
42
//extern "C" {
43
//#endif
44
//extern void _INIT_IOLIB(void);
45
//extern void _CLOSEALL(void);
46
//#ifdef __cplusplus
47
//}
48
//#endif
49
 
50
//extern void srand(_UINT);             // Remove the comment when you use rand()
51
//extern _SBYTE *_s1ptr;                                // Remove the comment when you use strtok()
52
 
53
//#ifdef __cplusplus                            // Use Hardware Setup
54
//extern "C" {
55
//#endif
56
//extern void HardwareSetup(void);
57
//#ifdef __cplusplus
58
//}
59
//#endif
60
 
61
//#ifdef __cplusplus                    // Remove the comment when you use global class object
62
//extern "C" {                                  // Sections C$INIT and C$END will be generated
63
//#endif
64
//extern void _CALL_INIT(void);
65
//extern void _CALL_END(void);
66
//#ifdef __cplusplus
67
//}
68
//#endif
69
 
70
#pragma section ResetPRG
71
 
72
#pragma entry PowerON_Reset_PC
73
 
74
void PowerON_Reset_PC(void)
75
{
76
        set_vbr((void *)((_UBYTE *)&INT_Vectors - INT_OFFSET));
77
 
78
        set_fpscr(FPSCR_Init);
79
 
80
        _INITSCT();
81
 
82
//      _CALL_INIT();                                   // Remove the comment when you use global class object
83
 
84
//      _INIT_IOLIB();                                  // Enable I/O in the application(both SIM I/O and hardware I/O)
85
 
86
//      errno=0;                                                // Remove the comment when you use errno
87
//      srand((_UINT)1);                                        // Remove the comment when you use rand()
88
//      _s1ptr=NULL;                                    // Remove the comment when you use strtok()
89
 
90
//      HardwareSetup();                                // Use Hardware Setup
91
 
92
        set_cr(SR_Init);
93
 
94
        main();
95
 
96
//      _CLOSEALL();                                    // Close I/O in the application(both SIM I/O andhardware I/O)
97
 
98
//      _CALL_END();                                    // Remove the comment when you use global class object
99
 
100
        sleep();
101
}
102
 
103
//#pragma entry Manual_Reset_PC         // Remove the comment when you use Manual Reset
104
void Manual_Reset_PC(void)
105
{
106
}

powered by: WebSVN 2.1.0

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