This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

The IART XCL file for memory map?

Hi,

On program for the TI CC1110, the IAR is the default development IDE, the IAR use the specified link configuration file to process the memory map. I think there must be the same mechanism for Keil. I think the startup.a51 is can do this kind of settings, I have modified one startup.a51 file, but not aids!

You can test the memory map problem on CC1110 by the following project:

unsigned long SumValue( unsigned long X, unsigned long Y )
{

return X+Y;
}

void main()
{

unsigned long iRetVal;

iRetVal = SumValue( 100, 16 );

}

If the memory map is correctly set, the iRetVal will be 116, otherwise a very large magic value!

Appendix below is the link configure file for IAR, how should I modify my startup.A51 file upon the standard template?

Thanks & Best Regards

Appendix: link configure file for IAR ( CC1110 from chipcon )

////////////////////////////////////////////////////////////////////////////////
//
// File: lnk51ew_cc1110.xcl
// Date: 2007.3.26-8:44
//
// Description:
// This is a extended command line file for XLINK tool to be used when
// debug applications written for the Chipcon CC1110.
//
// Important:
// Data cannot be located at address zero, this address is reserved for
// the null pointer.
//
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
//
// Variables (used by lnk_base.xcl)
// ================================
//
// Segment limits
// --------------
//
//
// IDATA
//
-D_IDATA_END=0xFF // Last address of Idata memory
//
//
// PDATA
//
-D_PDATA_START=0xF000 // First address for PDATA memory.
-D_PDATA_END=0xF0FF // Last address for PDATA memory.
//
//
//
//
// IXDATA
//
-D_IXDATA_START=0xF000 // The internal xdata is 4k.
-D_IXDATA_END=0xFDA1
// FDA1 to FEFF used for reg savings (350 bytes)
// FF00 to FFFF mapped to IDATA
//
//
// XDATA
//
// The internal XDATA is used as XDATA.
-D_XDATA_START=_IXDATA_START
-D_XDATA_END=_IXDATA_END
//
//
// CODE
//
// Code size:
-D_CODE_START=0x0000
-D_CODE_END=0x7FFF // 32KB code
//
//
// NEAR CODE
//
-D_NEAR_CODE_END=_CODE_END // Last address for near code.
//
//
// TINY CODE
//
-D_TINY_CODE_END=0x7FF // Last address for tiny code.
//
//
//
// Special SFRs
// ------------
//
//
// CODE bank setup
//
-D_FIRST_BANK_ADDR=0x10000
-D_NR_OF_BANKS=0x00
//
//
// Register bank setup
//
-D?REGISTER_BANK=0 // Default register bank (0,1,2,3).
-D_REGISTER_BANK_START=0 // Start address for default register bank (00,08,10,18).
//
//
// PDATA page setup
//
-D?PBANK_NUMBER=F0 // High byte of 16-bit address to the PDATA area.
-D?PBANK=93 // Most significant byte in MOVX A,@R0. (0x93 is sfr MPAGE).
//
//
// Virtual register setup
// ----------------------
//
-D_BREG_START=0x00 // The bit address where the BREG segments starts. // Must be placed on: _BREG_START%8=0 where _BREG_START <= 0x78.
-D?VB=0x20 // ?VB is used when referencing BREG as whole byte. // Must be placed on: ?VB=0x20+_BREG_START/8.
//
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
//
// To the reader: Ignore this section ------------------------------------------
//
//
// Dummy definitions needed to satisfy lnk_base.xcl
//
//
-D_FAR_DATA_NR_OF_BANKS=0x0E // Number of banks in far data memory.
-D_FAR_DATA_START=0x010001 // First address of far memory.
-D_FAR_DATA_END=0xFFFFFF // Last address of far memory.
-D_FAR_CODE_START=_CODE_START // First address for far code.
-D_FAR_CODE_END=_CODE_END // Last address for far code.
//
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
//
// Include the lnk_base command file
// =================================
//
//
-f lnk_base.xcl
//
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
//
// Chipcon device specific
// =======================
//
//
//
//
//
////////////////////////////////////////////////////////////////////////////////