This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS3134: Need help in editing the linker file since RAM usage is almost full

Part Number: TMS570LS3134

Hi,

Since the RAM usage is almost full for the device with 256Kb  (261 983 bytes of readwrite data memory (+ 50 337 788 absolute))

I would like to use the SRAM region , is this possible by editing the linker script?

Can I use the existing SRAM region ? If yes -- I need some pointers on how do I go about this. 

The linker file is as follows:

//SOC -*-asm-*-
//********************************************************************
// _______ _______ _________ _______ _______ _________ _______ **
// ( ____ \( ____ \\__ __/( ___ )( ____ )\__ __/( ___ ) **
// | ( \/| ( \/ ) ( | ( ) || ( )| ) ( | ( ) | **
// | (_____ | | | | | | | || (____)| | | | (___) | **
// (_____ )| | | | | | | || _____) | | | ___ | **
// ) || | | | | | | || ( | | | ( ) | **
// /\____) || (____/\___) (___| (___) || ) | | | ) ( | **
// \_______)(_______/\_______/(_______)|/ )_( |/ \| **
// **
// (c) 2010 SCIOPTA Systems AG/ Schweiz **
// **
//********************************************************************
// ID: S10102BS1 **
// $Revision: 1.1.2.2 $ **
// $Date: 2010/04/12 07:30:56 $ **
// Linkerscript for tms570 (IAR5 version) **
//********************************************************************
//EOC

/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
define symbol __ICFEDIT_appintvec_start__ = 0x00040000;

/*-Memory Regions-*/
define symbol _region_ROM_start__ = 0x00040040;
define symbol _region_ROM_end__ = 0x002FFFF7; /*
.for Old CPU */
define symbol _region_RAM_start__ = 0x08000000;
define symbol _region_RAM_end__ = 0x0803ffff; /* 0x08027fff for Old CPU */

define symbol _region_EXT_MRAM_START__ = 0x60000000;
define symbol _region_EXT_MRAM_END__ = 0x6007FFFF;

define symbol _region_EXT_SRAM_START__ = 0x64000000;
define symbol _region_EXT_SRAM_END__ = 0x6407FFFF;

/* needed by resethook */
export symbol _region_RAM_end__;

/* define some block to keep certain segments together */
/*define block DEBUG with alignment = 4, maximum size = 512K { section .debug* };*/
define block KERNEL with alignment = 4, maximum size = 512K { section .text_krn* };
/* define block INTVEC with alignment = 4, maximum size = 0x1000 { section .intvec };*/
define block NO_CACHE with alignment = 4, maximum size = 0x1000 { section .no_cache_sram };
define block HEAP with alignment = 4, size = 0x24900{ };
define block CSTACK with alignment = 4, size = 0xFF0 { };
define block IRQ_STACK with alignment = 4, size = 0x10 { };
define block FIQ_STACK with alignment = 4, size = 0x10 { };
define block UND_STACK with alignment = 4, size = 0x10 { };

define memory mem with size = 4G;
define region ROM_region = mem:[from _region_ROM_start__ to _region_ROM_end__ ];
define region RAM_region = mem:[from _region_RAM_start__ to _region_RAM_end__ ];
define region Code_Coverage = mem:[from _region_EXT_MRAM_START__ to _region_EXT_MRAM_END__ ];
define region RAM_EXT_region = mem:[from _region_EXT_SRAM_START__ to _region_EXT_SRAM_END__ ];

/* Define region for the bootloader version */
define symbol _region_ROM_APPVERSION_ADDR_start__ = 0x002FFFF8;
define symbol _region_ROM_APPVERSION_ADDR_end__ = 0x002FFFFB;
define region APPVERSION_ROM_region = mem:[from _region_ROM_APPVERSION_ADDR_start__ to _region_ROM_APPVERSION_ADDR_end__];

/* Define region for memory map 1 */
define symbol _region_MEMORYMAP_ADDR_start__ = 0x00018000;
define symbol _region_MEMORYMAP_ADDR_end__ = 0x0001FFFF;
define region MEMORYMAP_region = mem:[from _region_MEMORYMAP_ADDR_start__ to _region_MEMORYMAP_ADDR_end__];

/* Define region for Languages */
define symbol _region_LANGUAGES_ADDR_start__ = 0x00280000;
define symbol _region_LANGUAGES_ADDR_end__ = 0x002FFF00;
define region LANGUAGES_region = mem:[from _region_LANGUAGES_ADDR_start__ to _region_LANGUAGES_ADDR_end__];

initialize by copy { readwrite };
do not initialize { section .noinit, section .no_cache_sram, section .CODECOVERAGE};

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place at address mem:__ICFEDIT_appintvec_start__ { readonly section .appintvec };


/* be sure INTVECs are first ! */
/* place in ROM_region { block INTVEC }; */
place in ROM_region { readonly, block KERNEL};
place in RAM_region { readwrite };
place in RAM_region { block NO_CACHE, block HEAP, block IRQ_STACK, block FIQ_STACK, block UND_STACK, block CSTACK };
place in MEMORYMAP_region { section .MEMORYMAP };
place in Code_Coverage { section .CODECOVERAGE };
place in RAM_EXT_region { section .EXTRAM };
place in APPVERSION_ROM_region { section .MBVERSION };
place in LANGUAGES_region { section LANGREF };