Add retarget.c to RVDS project to ensure semihosting is not used.

This commit is contained in:
Richard Barry 2013-06-20 14:59:11 +00:00
parent 3a507bdc0c
commit 1cfb7b77e5
5 changed files with 152 additions and 8 deletions

View File

@ -27,7 +27,7 @@
<listOptionValue builtIn="false" value="ARM_SIM"/>
</option>
<option id="com.arm.tool.c.compiler.baremetal.exe.debug.option.opt.799477241" name="Optimization level" superClass="com.arm.tool.c.compiler.baremetal.exe.debug.option.opt" value="com.arm.tool.c.compiler.option.optlevel.min" valueType="enumerated"/>
<option id="com.arm.tool.c.compiler.option.optfor.2031421359" name="Optimize for" superClass="com.arm.tool.c.compiler.option.optfor" value="com.arm.tool.c.compiler.option.optfor.size" valueType="enumerated"/>
<option id="com.arm.tool.c.compiler.option.optfor.2031421359" name="Optimize for" superClass="com.arm.tool.c.compiler.option.optfor" value="com.arm.tool.c.compiler.option.optfor.time" valueType="enumerated"/>
<option id="com.arm.tool.c.compiler.option.targetcpu.1542570835" name="Target CPU (--cpu)" superClass="com.arm.tool.c.compiler.option.targetcpu" value="Cortex-A9" valueType="string"/>
<option id="com.arm.tool.c.compiler.option.endian.1071397580" name="Byte order" superClass="com.arm.tool.c.compiler.option.endian" value="com.arm.tool.c.compiler.option.endian.little" valueType="enumerated"/>
<option id="com.arm.tool.c.compiler.option.inst.1331808544" name="Instruction set" superClass="com.arm.tool.c.compiler.option.inst" value="com.arm.tool.c.compiler.option.inst.arm" valueType="enumerated"/>

View File

@ -169,7 +169,7 @@ configINCLUDE_FAT_SL_DEMO to 1 to include the FreeRTOS+FAT SL (and therefore
also FreeRTOS+CLI) demo in the build. Set configINCLUDE_FAT_SL_DEMO to 0 to
include the COM test tasks. The COM test tasks require a loop back connector
to be fitted to the UART port. */
#define mainINCLUDE_FAT_SL_DEMO 0
#define mainINCLUDE_FAT_SL_DEMO 1
/* Priorities for the demo application tasks. */
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1UL )

View File

@ -98,12 +98,6 @@ void $Sub$$main(void)
/* ==== INTC setting ==== */
R_INTC_Init();
/* ==== Cache setting ==== */
// io_init_cache();
/* ==== Writeback Cache ==== */
// io_cache_writeback();
L1CacheInit();
/* ==== Vector base address setting ==== */

View File

@ -0,0 +1,149 @@
/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
/*******************************************************************************
* File Name : retarget.c
* $Rev: $
* $Date:: $
* Device(s) : Aragon
* Tool-Chain : DS-5 Ver 5.13
* : ARM Complier
* OS :
* H/W Platform : Aragon CPU Board
* Description : Aragon Sample Program - Retarget standard I/O
* Operation :
* Limitations :
*******************************************************************************/
#ifdef __STANDALONE__
/******************************************************************************
Includes <System Includes> , "Project Includes"
******************************************************************************/
#include <stdio.h>
#include "r_typedefs.h"
#include "sio_char.h"
#pragma import(__use_no_semihosting)
/******************************************************************************
Typedef definitions
******************************************************************************/
struct __FILE
{
int_t handle;
/* Whatever you require here. If the only file you are using is */
/* standard output using printf() for debugging, no file handling */
/* is required. */
};
/******************************************************************************
Macro definitions
******************************************************************************/
/* File descriptor */
#define STDIN (0)
#define STDOUT (1)
#define STDERR (2)
#define IOSTREAM (1)
#define BUFF_SIZE (256)
#if 0
#define DEFAULT_HANDLE (0x100)
#endif
/******************************************************************************
Imported global variables and functions (from other files)
******************************************************************************/
/******************************************************************************
Exported global variables and functions (to be accessed by other files)
******************************************************************************/
FILE __stdout;
FILE __stdin;
#if 0
FILE __stderr;
#endif
/******************************************************************************
Private global variables and functions
******************************************************************************/
/******************************************************************************
* Function Name: fgetc
* Description :
* Arguments :
* Return Value :
******************************************************************************/
int_t fgetc(FILE * file_p)
{
/* no character to read */
return EOF;
}
/******************************************************************************
* Function Name: fputc
* Description :
* Arguments :
* Return Value :
******************************************************************************/
int_t fputc(int_t channel, FILE * file_p)
{
return channel;
}
/******************************************************************************
* Function Name: ferror
* Description :
* Arguments :
* Return Value :
******************************************************************************/
int_t ferror(FILE * file_p)
{
return 0;
}
int_t __backspace(FILE * file_p)
{
return 0;
}
void _sys_exit(int_t returncode)
{
while (1)
{
/* Do Nothing */
}
}
char_t * _sys_command_string(char_t * cmd, int_t len)
{
return cmd;
}
#endif /* __STANDALONE__ ƒZƒ~ƒzƒXƒeƒBƒ“ƒO³Œø */
/* End of File */

View File

@ -52,3 +52,4 @@ mem set 0xfcfe360c 16 0x0080 # PFCE3
mem set 0xfcfe350c 16 0x0000 # PFC3
mem set 0xfcfe720c 16 0x0080 # PIPC3