london
Member level 4
Hi All Pls help me,
I am using MSP430F5438 with IAR compiler. For this micro the CONST memory size is define as 5c00 to ff79. (around 41K) but I need more CONST memory size. The another code memory is 10000 to 45bff,
So If I want to extend the constant memory size, how to do it?
The lnkXMSF5438.xlc file,
//*****************************************************************
//
// XLINK command file for IAR Embedded Workbench for MSP430.
//
// This file should be used with the XMS430F5438 microprocessor.
//
// Copyright 1996-2007 IAR Systems. All rights reserved.
//
// Usage: xlink your_file(s) -f lnkxms430f5438 library
//
// $Revision: 4455 $
//
//*****************************************************************
//*****************************************************************
//
// The memory areas of the XMS430F5438 microprocessor:
//
// Peripheral units: 0 - 01FF
//
// Information memory (FLASH): 1800 - 19FF
//
// Read-write memory (RAM): 1C00 - 5BFF
//
// Read-only memory (FLASH): 5C00 - FF79
// 10000-45BFF
//
//*****************************************************************
//*****************************************************************
//
// The following segments are defined in this linker command file:
//
// Data read/write segments (RAM)
// ==============================
//
// segment Restrictions Usage
// ------- ------------ --------------------------
// DATA16_I < 10000 Data16 initialized variables
// DATA16_Z < 10000 Data16 zero initialized variables
// DATA16_N < 10000 Data16 uninitialized variables
// DATA16_HEAP < 10000 Data16 heap used by malloc and free
// DATA20_I Data20 initialized variables
// DATA20_Z Data20 zero initialized variables
// DATA20_N Data20 uninitialized variables
// DATA20_HEAP Data20 heap used by malloc and free
// CSTACK < 10000 Runtime stack
//
//
// Program and data read-only segments (FLASH)
// ===========================================
//
// segment Restrictions Usage
// ------- ------------ --------------------------
// INFO Information memory
// CSTART < 10000 Program startup code
// CODE Program code
// ISR_CODE < 10000 Program code for interrupt service routines
// DATA16_C < 10000 Data16 constant data and string literals
// DATA16_ID < 10000 Data16 initializers for DATA16_I
// DATA20_C Data20 constant data and string literals
// DATA20_ID Data20 initializers for DATA20_I
// DIFUNCT < 10000 Dynamic initialization vector used by C++
// CHECKSUM Checksum byte(s) generated by the -J option
// INTVEC FF80-FFFF Interrupt vectors
// RESET FFFE-FFFF The reset vector
//
//*****************************************************************
// ---------------------------------------------------------
// Stack and heap sizes.
// ---------------------------------------------------------
// Uncomment for command line use
//-D_STACK_SIZE=80
//-D_DATA16_HEAP_SIZE=80
//-D_DATA20_HEAP_SIZE=80
// ---------------------------------------------------------
// Define cpu.
// ---------------------------------------------------------
-cmsp430
// ---------------------------------------------------------
// Read-write memory.
// ---------------------------------------------------------
-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA16_HEAP+_DATA16_HEAP_SIZE=1C00-5BFF
-Z(DATA)DATA20_I,DATA20_Z,DATA20_N,DATA20_HEAP+_DATA20_HEAP_SIZE
-Z(DATA)CSTACK+_STACK_SIZE#
// ---------------------------------------------------------
// Read only memory
// ---------------------------------------------------------
// Information memory
// ---------------------------------------------------------
-Z(CODE)INFO=1800-19FF
-Z(CODE)INFOA=1980-19FF
-Z(CODE)INFOB=1900-197F
-Z(CODE)INFOC=1880-18FF
-Z(CODE)INFOD=1800-187F
// ---------------------------------------------------------
// Low memory 0 - 0xFFFF
// ---------------------------------------------------------
// ---------------------------------------------------------
// Code
-Z(CODE)CSTART,ISR_CODE=5C00-FF79
// ---------------------------------------------------------
// Constant data
-Z(CONST)DATA16_C,DATA16_ID,DIFUNCT=5C00-FF79
// ---------------------------------------------------------
// All memory 0 - 0xFFFFF
// ---------------------------------------------------------
// ---------------------------------------------------------
// Code
-P(CODE)CODE=5C00-FF79,10000-45BFF
// ---------------------------------------------------------
// Constant data
-Z(CONST)DATA20_C,DATA20_ID=5C00-FF79,10000-45BFF
// ---------------------------------------------------------
// Interrupt vectors
// ---------------------------------------------------------
-Z(CODE)INTVEC=FF80-FFFF
-Z(CODE)RESET=FFFE-FFFF
// ---------------------------------------------------------
// The end
// ---------------------------------------------------------
I am using MSP430F5438 with IAR compiler. For this micro the CONST memory size is define as 5c00 to ff79. (around 41K) but I need more CONST memory size. The another code memory is 10000 to 45bff,
So If I want to extend the constant memory size, how to do it?
The lnkXMSF5438.xlc file,
//*****************************************************************
//
// XLINK command file for IAR Embedded Workbench for MSP430.
//
// This file should be used with the XMS430F5438 microprocessor.
//
// Copyright 1996-2007 IAR Systems. All rights reserved.
//
// Usage: xlink your_file(s) -f lnkxms430f5438 library
//
// $Revision: 4455 $
//
//*****************************************************************
//*****************************************************************
//
// The memory areas of the XMS430F5438 microprocessor:
//
// Peripheral units: 0 - 01FF
//
// Information memory (FLASH): 1800 - 19FF
//
// Read-write memory (RAM): 1C00 - 5BFF
//
// Read-only memory (FLASH): 5C00 - FF79
// 10000-45BFF
//
//*****************************************************************
//*****************************************************************
//
// The following segments are defined in this linker command file:
//
// Data read/write segments (RAM)
// ==============================
//
// segment Restrictions Usage
// ------- ------------ --------------------------
// DATA16_I < 10000 Data16 initialized variables
// DATA16_Z < 10000 Data16 zero initialized variables
// DATA16_N < 10000 Data16 uninitialized variables
// DATA16_HEAP < 10000 Data16 heap used by malloc and free
// DATA20_I Data20 initialized variables
// DATA20_Z Data20 zero initialized variables
// DATA20_N Data20 uninitialized variables
// DATA20_HEAP Data20 heap used by malloc and free
// CSTACK < 10000 Runtime stack
//
//
// Program and data read-only segments (FLASH)
// ===========================================
//
// segment Restrictions Usage
// ------- ------------ --------------------------
// INFO Information memory
// CSTART < 10000 Program startup code
// CODE Program code
// ISR_CODE < 10000 Program code for interrupt service routines
// DATA16_C < 10000 Data16 constant data and string literals
// DATA16_ID < 10000 Data16 initializers for DATA16_I
// DATA20_C Data20 constant data and string literals
// DATA20_ID Data20 initializers for DATA20_I
// DIFUNCT < 10000 Dynamic initialization vector used by C++
// CHECKSUM Checksum byte(s) generated by the -J option
// INTVEC FF80-FFFF Interrupt vectors
// RESET FFFE-FFFF The reset vector
//
//*****************************************************************
// ---------------------------------------------------------
// Stack and heap sizes.
// ---------------------------------------------------------
// Uncomment for command line use
//-D_STACK_SIZE=80
//-D_DATA16_HEAP_SIZE=80
//-D_DATA20_HEAP_SIZE=80
// ---------------------------------------------------------
// Define cpu.
// ---------------------------------------------------------
-cmsp430
// ---------------------------------------------------------
// Read-write memory.
// ---------------------------------------------------------
-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA16_HEAP+_DATA16_HEAP_SIZE=1C00-5BFF
-Z(DATA)DATA20_I,DATA20_Z,DATA20_N,DATA20_HEAP+_DATA20_HEAP_SIZE
-Z(DATA)CSTACK+_STACK_SIZE#
// ---------------------------------------------------------
// Read only memory
// ---------------------------------------------------------
// Information memory
// ---------------------------------------------------------
-Z(CODE)INFO=1800-19FF
-Z(CODE)INFOA=1980-19FF
-Z(CODE)INFOB=1900-197F
-Z(CODE)INFOC=1880-18FF
-Z(CODE)INFOD=1800-187F
// ---------------------------------------------------------
// Low memory 0 - 0xFFFF
// ---------------------------------------------------------
// ---------------------------------------------------------
// Code
-Z(CODE)CSTART,ISR_CODE=5C00-FF79
// ---------------------------------------------------------
// Constant data
-Z(CONST)DATA16_C,DATA16_ID,DIFUNCT=5C00-FF79
// ---------------------------------------------------------
// All memory 0 - 0xFFFFF
// ---------------------------------------------------------
// ---------------------------------------------------------
// Code
-P(CODE)CODE=5C00-FF79,10000-45BFF
// ---------------------------------------------------------
// Constant data
-Z(CONST)DATA20_C,DATA20_ID=5C00-FF79,10000-45BFF
// ---------------------------------------------------------
// Interrupt vectors
// ---------------------------------------------------------
-Z(CODE)INTVEC=FF80-FFFF
-Z(CODE)RESET=FFFE-FFFF
// ---------------------------------------------------------
// The end
// ---------------------------------------------------------