Download Preliminary Application Note

Transcript
Appendix - IAR library
Chapter 6
6.3 Sample - Linker Command File
The self-programming library uses two segments for data and code allocation:
•
FSL_CODE(code)
Within this segment the flash self-programming library will be
located. Be sure to locate this segment within common area.
•
FSL_DATA(data)
Segment for the fsl_entry_ram.
Listed below is an example of the XCL(Linker Command File) file for the selfprogramming library.
//-------------------------------------------------------------------------//
Define CPU
//--------------------------------------------------------------------------c78000
//-------------------------------------------------------------------------// Allocate the read only segments that are mapped to ROM.
//-------------------------------------------------------------------------//-------------------------------------------------------------------------// Allocate interrupt vector segment.
//--------------------------------------------------------------------------Z(CODE)INTVEC=0000-003F
//-------------------------------------------------------------------------// Allocate CALLT segments.
//--------------------------------------------------------------------------Z(CODE)CLTVEC=0040-007D
//-------------------------------------------------------------------------// Allocate OPTION BYTES segment.
//--------------------------------------------------------------------------Z(CODE)OPTBYTE=0080-0081
//-------------------------------------------------------------------------// Allocate SECURITY_ID segment.
//--------------------------------------------------------------------------Z(CODE)SECUID=0084-008E
//-------------------------------------------------------------------------// Allocate CALLF segment.
//-------------------------------------------------------------------------//-Z(CODE)FCODE=0800-0FFF
//-------------------------------------------------------------------------// flash self-programming library code segment.
//--------------------------------------------------------------------------Z(CODE)FSL_CODE=0100-0FFF
//-------------------------------------------------------------------------// Startup, Runtime-library, Non banked, Interrupt
// and Calltable functions code segment.
//--------------------------------------------------------------------------Z(CODE)RCODE,CODE=1000-7FFF
//-------------------------------------------------------------------------// Data initializer segments.
//--------------------------------------------------------------------------Z(CODE)NEAR_ID,SADDR_ID,DIFUNCT=1000-7FFF
//-------------------------------------------------------------------------// Constant segments
//--------------------------------------------------------------------------Z(CODE)CONST,SWITCH=1000-7FFF
Preliminary Application Note U18990EE2V0AN00
73