1 /***********************************************************************************************************************
\r
3 * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
\r
4 * No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
\r
5 * applicable laws, including copyright laws.
\r
6 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
\r
7 * OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
8 * NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
\r
9 * LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
\r
10 * INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
\r
11 * ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
\r
12 * Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
\r
13 * of this software. By using this software, you agree to the additional terms and conditions found by accessing the
\r
15 * http://www.renesas.com/disclaimer
\r
17 * Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
\r
18 ***********************************************************************************************************************/
\r
20 /***********************************************************************************************************************
\r
21 * File Name : r_cg_resetprg.c
\r
22 * Version : Code Generator for RX231 V1.00.00.03 [10 Jul 2015]
\r
23 * Device(s) : R5F52318AxFP
\r
25 * Description : Reset program.
\r
26 * Creation Date: 23/09/2015
\r
27 ***********************************************************************************************************************/
\r
29 /***********************************************************************************************************************
\r
31 ***********************************************************************************************************************/
\r
32 /* Start user code for pragma. Do not edit comment generated here */
\r
33 /* End user code. Do not edit comment generated here */
\r
35 /***********************************************************************************************************************
\r
37 ***********************************************************************************************************************/
\r
38 #include "r_cg_macrodriver.h"
\r
39 #include <machine.h>
\r
40 #include <_h_c_lib.h>
\r
41 //#include <stddef.h> // Remove the comment when you use errno
\r
42 //#include <stdlib.h> // Remove the comment when you use rand()
\r
43 #include "r_cg_stacksct.h"
\r
44 #include "r_cg_userdefine.h"
\r
46 /***********************************************************************************************************************
\r
47 Global variables and functions
\r
48 ***********************************************************************************************************************/
\r
53 void PowerON_Reset_PC(void);
\r
59 #define PSW_init 0x00010000 /* PSW bit pattern */
\r
60 #define FPSW_init 0x00000000 /* FPSW bit base pattern */
\r
62 #pragma section ResetPRG /* output PowerON_Reset_PC to PResetPRG section */
\r
64 #pragma entry PowerON_Reset_PC
\r
66 void PowerON_Reset_PC(void)
\r
69 set_extb(__sectop("EXCEPTVECT"));
\r
71 set_intb(__sectop("C$VECT"));
\r
73 #ifdef __ROZ /* Initialize FPSW */
\r
74 #define _ROUND 0x00000001 /* Let FPSW RMbits=01 (round to zero) */
\r
76 #define _ROUND 0x00000000 /* Let FPSW RMbits=00 (round to nearest) */
\r
79 #define _DENOM 0x00000100 /* Let FPSW DNbit=1 (denormal as zero) */
\r
81 #define _DENOM 0x00000000 /* Let FPSW DNbit=0 (denormal as is) */
\r
84 set_fpsw(FPSW_init | _ROUND | _DENOM);
\r
86 _INITSCT(); /* Initialize Sections */
\r
87 HardwareSetup(); /* Use Hardware Setup */
\r
89 set_psw(PSW_init); /* Set Ubit & Ibit for PSW */
\r
93 /* Start user code for adding. Do not edit comment generated here */
\r
94 /* End user code. Do not edit comment generated here */
\r