|
是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=[01000-01FFE]/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=[02000-FBFF]/10000 //(注2)
-Z(CONST)SADDR_ID=[02000-FBFF]/10000 //(注2)
-Z(CONST)DIFUNCT=[02000-FBFF]/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=[02000-FBFF]/10000 //(注2)
-Z(CONST)FSWITCH=[02000-FBFF]/10000 //(注2)
//-------------------------------------------------------------------------
// Far functions code segment.
//-------------------------------------------------------------------------
-P(CODE)XCODE=[02000-FBFF]/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=[FF700-FFE1F]/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=[FF700-FFE1F]/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
//------------------------------------------------------------------------- |
阿莫论坛20周年了!感谢大家的支持与爱护!!
如果天空是黑暗的,那就摸黑生存;
如果发出声音是危险的,那就保持沉默;
如果自觉无力发光,那就蜷伏于牆角。
但是,不要习惯了黑暗就为黑暗辩护;
也不要为自己的苟且而得意;
不要嘲讽那些比自己更勇敢的人。
我们可以卑微如尘土,但不可扭曲如蛆虫。
|