1 /***********************************************************************/
\r
3 /* FILE :resetprg.c */
\r
4 /* DATE :Sun, Dec 27, 2009 */
\r
5 /* DESCRIPTION :Reset Program */
\r
6 /* CPU TYPE :Other */
\r
8 /* This file is generated by Renesas Project Generator (Ver.4.16). */
\r
10 /***********************************************************************/
\r
14 #include <machine.h>
\r
15 #include <_h_c_lib.h>
\r
16 //#include <stddef.h> // Remove the comment when you use errno
\r
17 //#include <stdlib.h> // Remove the comment when you use rand()
\r
18 #include "typedefine.h"
\r
19 #include "stacksct.h"
\r
21 #define SR_Init 0x000000F0
\r
22 #ifdef _FPD // when -fpu=double is specified
\r
23 #define FPSCR_Init 0x000C0001
\r
25 #define FPSCR_Init 0x00040001
\r
27 #define INT_OFFSET 0x10
\r
29 extern _UINT INT_Vectors;
\r
34 void PowerON_Reset_PC(void);
\r
35 void Manual_Reset_PC(void);
\r
41 //#ifdef __cplusplus // Enable I/O in the application(both SIM I/O and hardware I/O)
\r
44 //extern void _INIT_IOLIB(void);
\r
45 //extern void _CLOSEALL(void);
\r
46 //#ifdef __cplusplus
\r
50 //extern void srand(_UINT); // Remove the comment when you use rand()
\r
51 //extern _SBYTE *_s1ptr; // Remove the comment when you use strtok()
\r
53 //#ifdef __cplusplus // Use Hardware Setup
\r
56 //extern void HardwareSetup(void);
\r
57 //#ifdef __cplusplus
\r
61 //#ifdef __cplusplus // Remove the comment when you use global class object
\r
62 //extern "C" { // Sections C$INIT and C$END will be generated
\r
64 //extern void _CALL_INIT(void);
\r
65 //extern void _CALL_END(void);
\r
66 //#ifdef __cplusplus
\r
70 #pragma section ResetPRG
\r
72 #pragma entry PowerON_Reset_PC
\r
74 void PowerON_Reset_PC(void)
\r
76 set_vbr((void *)((_UBYTE *)&INT_Vectors - INT_OFFSET));
\r
78 set_fpscr(FPSCR_Init);
\r
82 // _CALL_INIT(); // Remove the comment when you use global class object
\r
84 // _INIT_IOLIB(); // Enable I/O in the application(both SIM I/O and hardware I/O)
\r
86 // errno=0; // Remove the comment when you use errno
\r
87 // srand((_UINT)1); // Remove the comment when you use rand()
\r
88 // _s1ptr=NULL; // Remove the comment when you use strtok()
\r
90 // HardwareSetup(); // Use Hardware Setup
\r
96 // _CLOSEALL(); // Close I/O in the application(both SIM I/O andhardware I/O)
\r
98 // _CALL_END(); // Remove the comment when you use global class object
\r
103 //#pragma entry Manual_Reset_PC // Remove the comment when you use Manual Reset
\r
104 void Manual_Reset_PC(void)
\r