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.

CCS/TMS570LS3137: global variable in the .lib file is mapped in the flash area of TMS570LS3137.

Part Number: TMS570LS3137

Tool/software: Code Composer Studio

Hi,

    I use CCS5.2.1, and my board is TMS570LS3137,  I creating a library file(Testlib.lib),     and I add  the   Testlib.lib    into  project A, and  built  OK.    

now, the problem is:

I have some   global variable in the Testlib.lib file,  if I initialize these global variables when I define them , and after built the project,  these global variables will be mapped in the ram area(0x08000000-0x0803FFFF) of TMS570LS3137.

but , if if I do not initialize these global variables when I define them  , and after built the project, these global variables will be mapped in the flash area(0x00000000-0x002FFFFF)  of TMS570LS3137.

because  there are many do not initialized global variables when I define them ,and I do not want to change the code,  and I want these global variables  be mapped  in ram area(0x08000000-0x0803FFFF) in TMS570LS3137.  

how can I do?   

my .CMD file is :

MEMORY{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x0007FFE0
FLASH1 (RX) : origin=0x00080000 length=0x00080000
FLASH2 (RX) : origin=0x00100000 length=0x00080000
FLASH3 (RX) : origin=0x00180000 length=0x00080000
RAM (RW) : origin=0x08000000 length=0x00010000

SDRAM (RW) : origin=0x80000020 length 0x007FFFE0
RAM_ALIGN (RW) : origin=0x08010000 length=0x0003FFFF
}

SECTIONS{
.intvecs : {} > VECTORS
.text : {} > FLASH0 | FLASH1 | FLASH2 | FLASH3
.const : {} > FLASH0 | FLASH1 | FLASH2 | FLASH3
.cinit : {} > FLASH0 | FLASH1 | FLASH2 | FLASH3
.pinit : {} > FLASH0 | FLASH1 | FLASH2 | FLASH3
.bss : {} > RAM
.data : {} > RAM_ALIGN
.sysmem : {} > RAM
FRAMEBUF_ALIGN256 : align(256) {} > RAM_ALIGN
USB_SECT1_ALIGN256 : align(256) {} > RAM_ALIGN
USB_SECT2_ALIGN256 : align(256) {} > RAM_ALIGN
USB_SECT3_ALIGN256 : align(256) {} > RAM_ALIGN
USB_SECT4_ALIGN256 : align(256) {} > RAM_ALIGN
}

  Thank a lot!