RL78 R5F100FE .XCL文件。含仿真,EEPROM等设置
是iar 下的。xcl文件。希望大家有用。//=================================================================================================
// Project = Data Flash Library, MF3 single voltage flash
// Module = fdl_sample_linker_file.xcl
// Device: = RL78
// Version = V1.04
// Date = 13.04.2012
//=================================================================================================
// COPYRIGHT
//=================================================================================================
// Copyright (c) 2011-2012 by Renesas Electronics Europe GmbH, a company of the Renesas Electronics
// Corporation. All rights reserved.
//=================================================================================================
// Purpose:
// linker sample file
//
//=================================================================================================
//
// Warranty Disclaimer
//
// Because the Product(s) is licensed free of charge, there is no warranty of any kind whatsoever
// and expressly disclaimed and excluded by Renesas, either expressed or implied, including but
// not limited to those for non-infringement of intellectual property, merchantability and/or
// fitness for the particular purpose.
// Renesas shall not have any obligation to maintain, service or provide bug fixes for the
// supplied Product(s) and/or the Application.
//
// Each User is solely responsible for determining the appropriateness of using the Product(s)
// and assumes all risks associated with its exercise of rights under this Agreement, including,
// but not limited to the risks and costs of program errors, compliance with applicable laws,
// damage to or loss of data, programs or equipment, and unavailability or interruption of
// operations.
//
// Limitation of Liability
//
// In no event shall Renesas be liable to the User for any incidental, consequential, indirect,
// or punitive damage (including but not limited to lost profits) regardless of whether such
// liability is based on breach of contract, tort, strict liability, breach of warranties,
// failure of essential purpose or otherwise and even if advised of the possibility of such
// damages. Renesas shall not be liable for any services or products provided by third party
// vendors, developers or consultants identified or referred to the User by Renesas in
// connection with the Product(s) and/or the Application.
//
//=================================================================================================
//
// Environment= IAR environment for RL78 (version V1.xx)
//
//=================================================================================================
//-------------------------------------------------------------------------
// The following segments are defined in this template link file:
//
// INTVEC -- Interrupt vectors.
// CLTVEC -- Calltable vectors.
// RCODE -- Code used by C/C++ startup and run-time library.
// CODE -- Code used by __near_func, __interrupt and __callt functions.
// XCODE -- Code used by __far_func functions.
// NEAR_CONST_ -- Constants used by __near const.
// FAR_CONST -- Constants used by __far const.
// HUGE_CONST-- Constants used by __huge const.
// SADDR_x -- Variables used by __saddr.
// NEAR_x -- Variables used by __near.
// FAR_x -- Variables used by __far.
// HUGE_x -- Variables used by __huge.
// NEAR_HEAP -- The heap used by near data model.
// FAR_HEAP -- The heap used by far data model.
// HUGE_HEAP -- The heap used by __huge objects.
// SWITCH -- Switch tables used by near code model.
// FSWITCH -- Switch tables used by far code model.
// DIFUNCT -- Dynamic initialization vector used by C++
//
// Where _x could be one of:
//
// _Z -- Initialized data (initvalue = 0 or without init value).
// _I -- Initialized data (initvalue != 0).
// _ID -- The initial values of _I.
// _N -- Uninitialized data, used by __no_init.
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Define CPU
//-------------------------------------------------------------------------
-cRL78
//-------------------------------------------------------------------------
// Size of the stack.
//-------------------------------------------------------------------------
//-D_CSTACK_SIZE=80
//-------------------------------------------------------------------------
// Size of the heaps.
//-------------------------------------------------------------------------
//-D_NEAR_HEAP_SIZE=400
//-D_FAR_HEAP_SIZE=4000
//-D_HUGE_HEAP_SIZE=4000
//-------------------------------------------------------------------------
// Near constant location.
// 0 -> Mirrored in rom area 0x00000 - 0x0FFFF
// 1 -> Mirrored in rom area 0x10000 - 0x1FFFF
// 2 -> Writeable constants
//-------------------------------------------------------------------------
//-D_NEAR_CONST_LOCATION=0
//-D_NEAR_CONST_LOCATION_START=00800
//-D_NEAR_CONST_LOCATION_END=00FFF
//-------------------------------------------------------------------------
// Used by DLIB only
// Define the format functions used by printf/scanf.
// Default is full formatting.
//-------------------------------------------------------------------------
//-e_PrintfTiny=_Printf
//-e_PrintfSmall=_Printf
//-e_PrintfLarge=_Printf
//-e_ScanfSmall=_Scanf
//-e_ScanfLarge=_Scanf
//-------------------------------------------------------------------------
// Used by DLIB only
// Define if row buffering should be used by terminal output.
// Default is no buffering.
//-------------------------------------------------------------------------
//-e__write_buffered=__write
//-------------------------------------------------------------------------
// Used by CLIB only
// Define the format functions used by printf/scanf.
// Default is full formatting.
//-------------------------------------------------------------------------
//-e_small_write=_formatted_write
//-e_medium_write=_formatted_write
//-e_medium_read=_formatted_read
//==================================ROM====================================
//-------------------------------------------------------------------------
// Allocate the read only segments that are mapped to ROM.
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Interrupt vector segment.
//-------------------------------------------------------------------------
-Z(CODE)INTVEC=00000-0007F
//-------------------------------------------------------------------------
// CALLT vector segment.
//-------------------------------------------------------------------------
//-Z(CODE)CLTVEC=00080-000BF
-Z(CODE)CLTVEC=00080-000BD//留2个字节给仿真调试用,用于跳转(注1)
//-------------------------------------------------------------------------
// OPTION BYTES segment.
//-------------------------------------------------------------------------
-Z(CODE)OPTBYTE=000C0-000C3
//-------------------------------------------------------------------------
// SECURITY_ID segment.
//-------------------------------------------------------------------------
-Z(CODE)SECUID=000C4-000CD
//-------------------------------------------------------------------------
// Reserved ROM area for Minicube Firmware: 000D0-00383
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Reserved ROM areas for OCD Firmware: 000CE-000D7
// 0FE00-0FFFF
//注1:仿真需要保留的ROM区域,要求是 2字节 10字节 512字节,在不仿真时,注解掉,
//-------------------------------------------------------------------------
-Z(CODE)OCNIROM1=000CE-000D7//10个字节,缓存(注1,注3)
-Z(CODE)OCNIROM2=0FE00-0FFFF//512字节,仿真代码区,前0FC00-0FDFF ,512字节保留(注1,注3)//1k的块操作,所以从0xFC00-0xFFFF
//////////////////////////////////////////////////////////////////////////
// PFDL
// ============
-Z(CODE)PFDL_COD=/10000//自编程代码必须安排在4k大小的1簇
//////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------
// Near constant segments.
//-------------------------------------------------------------------------
--segment_mirror @NEAR_CONST=NEAR_CONST_ID
-Z(CONST)NEAR_CONST_ID=_NEAR_CONST_LOCATION_START-_NEAR_CONST_LOCATION_END
-Z(DATA)NEAR_CONST=(_NEAR_CONST_LOCATION_START|F0000)-(_NEAR_CONST_LOCATION_END|F0000)
//-------------------------------------------------------------------------
// Startup, Runtime-library, Near, Interrupt
// and CALLT functions code segment.and near switch.
//-------------------------------------------------------------------------
-Z(CODE)RCODE,CODE=02000-FBFF //(注2)
-Z(CONST)SWITCH=02000-FBFF //(注2)
//-------------------------------------------------------------------------
// Near data initializer segments.
//-------------------------------------------------------------------------
-Z(CONST)NEAR_ID=/10000 //(注2)
-Z(CONST)SADDR_ID=/10000 //(注2)
-Z(CONST)DIFUNCT=/10000 //(注2)
//-------------------------------------------------------------------------
// Far and huge constant segments and far switch.
// The FAR_I and FAR_ID segments must start at the same offset
// in a 64 Kb page.
//-------------------------------------------------------------------------
-Z(CONST)HUGE_ID#0FBFF
-Z(DATA)HUGE_I=FF700-FFE1F
-Z(FARCONST)FAR_ID=02FFF-FBFF //(注2)
-Z(FARDATA)FAR_I=FF700-FFEDF //2k大小
-P(CONST)HUGE_CONST=02000-0FBFF
-P(CONST)FAR_CONST=/10000 //(注2)
-Z(CONST)FSWITCH=/10000 //(注2)
//-------------------------------------------------------------------------
// Far functions code segment.
//-------------------------------------------------------------------------
-P(CODE)XCODE=/10000 //(注2)
//==============================EEPROM=====================================
//-------------------------------------------------------------------------
// EEPROM segment.
// Note: This segment will not be automatically created
// and it will not be initialised by CSTARTUP!
//-------------------------------------------------------------------------
-Z(DATA)EEPROM=F1000-F1FFF //(注3)
//================================RAM======================================
//-------------------------------------------------------------------------
// Allocate the read/write segments that are mapped to RAM.
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Short address data and workseg segments.
//-------------------------------------------------------------------------
-Z(DATA)WRKSEG=FFE20-FFEDF
-Z(DATA)SADDR_I,SADDR_Z,SADDR_N,FDL_DATA=FFE20-FFEDF
//-------------------------------------------------------------------------
// Near data segments.
//-------------------------------------------------------------------------
-Z(DATA)NEAR_I,NEAR_Z,NEAR_N=FF700-FFE1F
//-------------------------------------------------------------------------
// Far data segments.
//-------------------------------------------------------------------------
-Z(FARDATA)FAR_Z=FF700-FFE1F
-P(DATA)FAR_N=/10000
//-------------------------------------------------------------------------
// Huge data segments.添加 //(注3)
//-------------------------------------------------------------------------
-Z(DATA)HUGE_Z=FF700-FFE1F //(注3)
-P(DATA)HUGE_N=FF700-FFE1F //(注3)
//-------------------------------------------------------------------------
// Heap segments.
//-------------------------------------------------------------------------
-Z(DATA)NEAR_HEAP+_NEAR_HEAP_SIZE=FF700-FFE1F
-Z(DATA)FAR_HEAP+_FAR_HEAP_SIZE=/10000
-Z(DATA)HUGE_HEAP+_HUGE_HEAP_SIZE=FF700-FFE1F//(注3)
//-------------------------------------------------------------------------
// Stack segment.
//-------------------------------------------------------------------------
-Z(DATA)CSTACK+_CSTACK_SIZE=FF700-FFE1F
//-------------------------------------------------------------------------
// Select the output file format if used from command line.
// Remove comment to select the file format if used from command line.
//-------------------------------------------------------------------------
//-Fdebug
//注1:仿真时,用rom的空间声明,2字节 10字节 512字节,
//注2:原来的FFFF改成FBFF 是因为仿真用rom FC00-FFFF 实际使用FE00-FFFF 512字节
//注3:原来没有,后来添加
//-------------------------------------------------------------------------
// End of File
//------------------------------------------------------------------------- 能在详细点吗 我想把APP放到0x1000开始执行 这样做行吗
//-------------------------------------------------------------------------
// XLINK command file template for RL78 microcontroller R5F109AA.
//
// This file can be used to link object files from the RL78
// Assembler, ARL78, and the C/C++ compiler ICCRL78.
//
// This file is generated from the device file:
// DR5F109AA.DVF
// Copyright(C) 2012 Renesas
// Format version V3.00, File version V1.02
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// The following segments are defined in this template link file:
//
// INTVEC -- Interrupt vectors.
// CLTVEC -- Calltable vectors.
// RCODE -- Code used by C/C++ startup and run-time library.
// CODE -- Code used by __near_func, __interrupt and __callt functions.
// XCODE -- Code used by __far_func functions.
// NEAR_CONST_ -- Constants used by __near const.
// FAR_CONST -- Constants used by __far const.
// HUGE_CONST-- Constants used by __huge const.
// SADDR_x -- Variables used by __saddr.
// NEAR_x -- Variables used by __near.
// FAR_x -- Variables used by __far.
// HUGE_x -- Variables used by __huge.
// NEAR_HEAP -- The heap used by near data model.
// FAR_HEAP -- The heap used by far data model.
// HUGE_HEAP -- The heap used by __huge objects.
// SWITCH -- Switch tables used by near code model.
// FSWITCH -- Switch tables used by far model.
// DIFUNCT -- Dynamic initialization vector used by C++
//
// Where _x could be one of:
//
// _Z -- Initialized data (initvalue = 0 or without init value).
// _I -- Initialized data (initvalue != 0).
// _ID -- The initial values of _I.
// _N -- Uninitialized data, used by __no_init.
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Define CPU
//-------------------------------------------------------------------------
-cRL78
//-------------------------------------------------------------------------
// Size of the stack.
// Remove comment and modify number if used from command line.
//-------------------------------------------------------------------------
-D_CSTACK_SIZE=80
//-------------------------------------------------------------------------
// Size of the heaps.
// Remove comment and modify number if used from command line.
//-------------------------------------------------------------------------
-D_NEAR_HEAP_SIZE=400
-D_FAR_HEAP_SIZE=4000
-D_HUGE_HEAP_SIZE=4000
//-------------------------------------------------------------------------
// Near constant location.
// 0 -> 0xF0000-0xFFFFF mirrored in rom area 0x00000 - 0x0FFFF
// 1 -> 0xF0000-0xFFFFF mirrored in rom area 0x10000 - 0x1FFFF
// 2 -> Writeable constants
// Remove comments and modify number if used from command line.
//-------------------------------------------------------------------------
-D_NEAR_CONST_LOCATION=0
-D_NEAR_CONST_LOCATION_START=01000
-D_NEAR_CONST_LOCATION_END=03FFF
//_NEAR_CONST_LOCATION
//_NEAR_CONST_LOCATION_START
//_NEAR_CONST_LOCATION_END
//_CSTACK_SIZE
//_NEAR_HEAP_SIZE
//_HUGE_HEAP_SIZE
//_FAR_HEAP_SIZE
//-------------------------------------------------------------------------
// Define the format functions used by printf/scanf.
// Default is auto formatting.
// Remove appropriate comment(s) to get desired formatting
// if used from command line.
//-------------------------------------------------------------------------
//-e_PrintfTiny=_Printf
//-e_PrintfSmall=_Printf
//-e_PrintfSmallNoMb=_Printf
//-e_PrintfLarge=_Printf
//-e_PrintfLargeNoMb=_Printf
//-e_PrintfFull=_Printf
//-e_PrintfFullNoMb=_Printf
//-e_ScanfSmall=_Scanf
//-e_ScanfSmallNoMb=_Scanf
//-e_ScanfLarge=_Scanf
//-e_ScanfLargeNoMb=_Scanf
//-e_ScanfFull=_Scanf
//-e_ScanfFullNoMb=_Scanf
//-------------------------------------------------------------------------
// Define replacement of the default library math functions.
// Choose either of:
// 1) smaller and faster versions
// 2) more accurate versions
// Remove appropriate comment(s) from either
// 1) or 2), but not both, if used from command line.
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// 1) Smaller and faster versions
//-------------------------------------------------------------------------
//-e__iar_sin_small=sin
//-e__iar_cos_small=cos
//-e__iar_tan_small=tan
//-e__iar_log_small=log
//-e__iar_log10_small=log10
//-e__iar_exp_small=exp
//-e__iar_pow_small=pow
//-e__iar_Sin_small=__iar_Sin
//-e__iar_sin_smallf=sinf
//-e__iar_cos_smallf=cosf
//-e__iar_tan_smallf=tanf
//-e__iar_log_smallf=logf
//-e__iar_log10_smallf=log10f
//-e__iar_exp_smallf=expf
//-e__iar_pow_smallf=powf
//-e__iar_Sin_smallf=__iar_Sinf
//-e__iar_sin_smalll=sinl
//-e__iar_cos_smalll=cosl
//-e__iar_tan_smalll=tanl
//-e__iar_log_smalll=logl
//-e__iar_log10_smalll=log10l
//-e__iar_exp_smalll=expl
//-e__iar_pow_smalll=powl
//-e__iar_Sin_smalll=__iar_Sinl
//-------------------------------------------------------------------------
// 2) More accurate versions
//-------------------------------------------------------------------------
//-e__iar_sin_accurate=sin
//-e__iar_cos_accurate=cos
//-e__iar_tan_accurate=tan
//-e__iar_pow_accurate=pow
//-e__iar_Sin_accurate=__iar_Sin
//-e__iar_Pow_accurate=__iar_Pow
//-e__iar_sin_accuratef=sinf
//-e__iar_cos_accuratef=cosf
//-e__iar_tan_accuratef=tanf
//-e__iar_pow_accuratef=powf
//-e__iar_Sin_accuratef=__iar_Sinf
//-e__iar_Pow_accuratef=__iar_Powf
//-e__iar_sin_accuratel=sinl
//-e__iar_cos_accuratel=cosl
//-e__iar_tan_accuratel=tanl
//-e__iar_pow_accuratel=powl
//-e__iar_Sin_accuratel=__iar_Sinl
//-e__iar_Pow_accuratel=__iar_Powl
//-------------------------------------------------------------------------
// Define if row buffering should be used by terminal output.
// Default is no buffering.
// Remove comment to get buffered terminal output if used from command line.
//-------------------------------------------------------------------------
//-e__write_buffered=__write
//-------------------------------------------------------------------------
// Allocate the read only segments that are mapped to ROM.
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Interrupt vector segment.
//-------------------------------------------------------------------------
-Z(CODE)INTVEC=01000-0107F
//-------------------------------------------------------------------------
// CALLT vector segment.
//-------------------------------------------------------------------------
-Z(CODE)CLTVEC=01080-010BF
//-------------------------------------------------------------------------
// OPTION BYTES segment.
//-------------------------------------------------------------------------
-Z(CODE)OPTBYTE=010C0-010C3
//-------------------------------------------------------------------------
// SECURITY_ID segment.
//-------------------------------------------------------------------------
-Z(CODE)SECUID=010C4-010CD
//-------------------------------------------------------------------------
// Reserved ROM areas for OCD Firmware: 000CE-000D7
// 03E00-03FFF
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Near constant segments.
//-------------------------------------------------------------------------
--segment_mirror @NEAR_CONST=NEAR_CONST_ID
-Z(CONST)NEAR_CONST_ID=_NEAR_CONST_LOCATION_START-_NEAR_CONST_LOCATION_END
-Z(DATA)NEAR_CONST=(_NEAR_CONST_LOCATION_START|F0000)-(_NEAR_CONST_LOCATION_END|F0000)
//-------------------------------------------------------------------------
// Startup, Runtime-library, Near, Interrupt
// and CALLT functions code segment and near switch.
//-------------------------------------------------------------------------
-Z(CODE)RCODE,CODE=010D8-03DFF
-Z(CONST)SWITCH=010D8-03DFF
//-------------------------------------------------------------------------
// Near data initializer segments.
//-------------------------------------------------------------------------
-Z(CONST)NEAR_ID=/10000
-Z(CONST)SADDR_ID=/10000
-Z(CONST)DIFUNCT=/10000
//-------------------------------------------------------------------------
// Far and huge constant segments and far switch.
//-------------------------------------------------------------------------
-Z(CONST)HUGE_ID#03DFF
-Z(DATA)HUGE_I=FFB00-FFE1F
-Z(CONST)FAR_ID#03DFF
-Z(DATA)FAR_I=FFB00-FFE1F
-P(CONST)HUGE_CONST=010D8-03DFF
-P(CONST)FAR_CONST,FSWITCH=/10000
//-------------------------------------------------------------------------
// Far functions code segment.
//-------------------------------------------------------------------------
-P(CODE)XCODE=/10000
//-------------------------------------------------------------------------
// EEPROM segment.
// Note: This segment will not be automatically created
// and it will not be initialised by CSTARTUP!
//-------------------------------------------------------------------------
-Z(CONST)EEPROM=F1000-F1FFF
//-------------------------------------------------------------------------
// Allocate the read/write segments that are mapped to RAM.
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Short address data and workseg segments.
//-------------------------------------------------------------------------
-Z(DATA)WRKSEG=FFE20-FFEDF
-Z(DATA)SADDR_I,SADDR_Z,SADDR_N=FFE20-FFEDF
//-------------------------------------------------------------------------
// Near data segments.
//-------------------------------------------------------------------------
-Z(DATA)NEAR_I,NEAR_Z,NEAR_N=FFB00-FFE1F
//-------------------------------------------------------------------------
// Huge data segments.
//-------------------------------------------------------------------------
-Z(DATA)HUGE_Z=FFB00-FFE1F
-P(DATA)HUGE_N=FFB00-FFE1F
//-------------------------------------------------------------------------
// Far data segments.
//-------------------------------------------------------------------------
-Z(DATA)FAR_Z=/10000
-P(DATA)FAR_N=/10000
//-------------------------------------------------------------------------
// Heap segments.
//-------------------------------------------------------------------------
-Z(DATA)NEAR_HEAP+_NEAR_HEAP_SIZE=FFB00-FFE1F
-Z(DATA)HUGE_HEAP+_HUGE_HEAP_SIZE=FFB00-FFE1F
-Z(DATA)FAR_HEAP+_FAR_HEAP_SIZE=/10000
//-------------------------------------------------------------------------
// Stack segment.
//-------------------------------------------------------------------------
-Z(DATA)CSTACK+_CSTACK_SIZE=FFB00-FFE1F
//-------------------------------------------------------------------------
// Select the output file format if used from command line.
// Remove comment to select the file format if used from command line.
//-------------------------------------------------------------------------
//-Fdebug
//-------------------------------------------------------------------------
// End of File
//-------------------------------------------------------------------------
页:
[1]