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.

the problems occur in Memory.cmd when building in CCS

Hi,

When building the project named testdpu_C6678 in CCS ,  the problem is below: 

'Building target: testdpu_C6678.out'
'Invoking: C6000 Linker'
"C:/ti/C6000 Code Generation Tools 7.2.1/bin/cl6x" -mv6600 -g -O3 --
define=xdc_target_types__=ti/targets/std.h --define=LUMPED_VELVAR --define=PROFILE_CYCLES -
-define=NO_XDC --define=DISABLE_PLACEMENT --define=USE_OS --define=ti_targets_C66 --
diag_warning=225 --abi=eabi -k -z -m"testdpu_C6678.map" --warn_sections -i"C:/ti/C6000 Code
Generation Tools 7.2.1/lib" -i"C:/ti/C6000 Code Generation Tools 7.2.1/include" -
i"D:/workspace/miAlgos/dpu/test/ccsProj_C6678/testdpu/../../../../util/make_c66_lib/utillib/
Release" -
i"D:/workspace/miAlgos/dpu/test/ccsProj_C6678/testdpu/../../../../dpu/make_c66_lib/dpulib/Re
lease" --reread_libs --rom_model -o "testdpu_C6678.out" -l"./configPkg/linker.cmd"
"./testdpu.obj" "./fileIo.obj" "./edma3_config.obj" -l"dpulib_c66.lib" -l"util.lib" -
l"rts6600_elf.lib" -l"libc.a" "../Memory.cmd"
<Linking>
"../Memory.cmd", line 26: warning: no matching section
"../Memory.cmd", line 28: warning: no matching section
"../Memory.cmd", line 29: warning: no matching section
"../Memory.cmd", line 30: warning: no matching section
"../Memory.cmd", line 31: warning: no matching section
"../Memory.cmd", line 32: warning: no matching section
"../Memory.cmd", line 27: warning: no matching section
"../Memory.cmd", line 25: warning: no matching section
"../Memory.cmd", line 24: warning: no matching section
"../Memory.cmd", line 33: warning: no matching section
"../Memory.cmd", line 7: warning: memory range not found: DDR2 on page 0
"../Memory.cmd", line 7: error: no valid memory range(NULL) available for
placement of "GROUP_2"
"../Memory.cmd", line 7: error: placement fails for object "GROUP_2", size
0x3ec60 (page 0)
"../Memory.cmd", line 34: warning: memory range not found: DDR2 on page 0
"../Memory.cmd", line 23: error: run placement fails for object ".activecode",
size 0x0 (page 0)
"../Memory.cmd", line 36: warning: memory range not found: DDR2 on page 0
"../Memory.cmd", line 36: error: run placement fails for object ".text:_task",

>> Compilation failure
size 0x0 (page 0)
error: errors encountered during linking; "testdpu_C6678.out" not built
gmake: *** [testdpu_C6678.out] Error 1
gmake: Target `all' not remade because of errors.

the content of Memory.cmd is below:

-x


SECTIONS
{

GROUP > DDR2
{
.iobuff
.tables
.coefbuf
.bss
.far
.const
.switch
.data
.cio
.sysmem
.cinit
.text
}

.activecode {
rts64plus.lib <fwrite.obj> (.text)
rts64plus.lib <fread.obj> (.text)
rts64plus.lib <divu.obj> (.text:__divu)
rts64plus.lib <memset.obj> (.text)
rts64plus.lib <_bufread.obj> (.text:__buff_read)
rts64plus.lib <lowlev.obj> (.text:_read)
rts64plus.lib <setvbuf.obj> (.text:_setvbuf)
rts64plus.lib <_io_perm.obj> (.text:__wrt_ok)
rts64plus.lib <_io_perm.obj> (.text:__rd_ok)
*(.active_code)
} > DDR2

.text:_task :> DDR2

}

so,could you give me some suggestions to slove the question?

  • When building the project named testdpu_C6678 in CCS ,  the problem is below:

    Is this project a sample project or custom one?

    Regards,

    Gautam

  • Hi,

    I think you are missing a MEMORY section in your linker .CMD file, which defines where DDR2 is located in the physical memory. As an example, check the C6678.cmd linker CMD file provided with CCS under the directory ccsv5/ccs_base/c6000/include

    Also, the syntax for the SECTIONS seems odd to me. Check section 8.5.4 of the C6000 Assembly User's Guide (a link to it is at this page)

    Hope this helps,

    Rafael