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.

How to use wild card in *.cmd file in CCS4/CGT7.2?

Hi all,

  I tried to change function location from L2 to DDR in cmd file as below.  My software environment: CCS4.2, CGT7.2, C++ Language, -O3 + no debug + -mo, C6616, elf

  SECTIONS
 {
    .platformLibFast: { -lPlatformLib.lib<QueMgr.obj> (.text) } > L2_MEM
    .platformLibSlow: { -lPlatformLib.lib<QueMgr.obj> (.text:*Initialize*) } > DDR_MEM
}

But it will print "....warning: no match section......" warning message for  Line 4. That means wild card * does not work. _ZN3QueMgr8InitializeEv funtion is still in L2_MEM,  In  section7.4.1 Wild Cards in File, Section, and Symbol Patterns of Spru186u TMS320C6000 Assembly Language Tools v 7.2 user guide.pdf, I see introduction about wild card usage, but I can't find any error in my cmd file.  Why linker can not find the match section?

Thanks.

Best Regards,

Kristy

  • Kristy,

    I haven't acttually tested it yet but I think your wild card syntax is ok. Do you have both the above lines in your linker command file? If so, the first SECTION specification would pick up all the .text from QueMgr.obj, so there is nothing else available to match when the processing of the next line takes place. Can you confirm if this is what is really happening by looking at the link map file? If so, can you switch the order of the two lines and see if the allocation changes.

  • Aarti is correct.  The syntax:

    .platformLibFast: { -lPlatformLib.lib<QueMgr.obj> (.text)

    behaves exactly as if there were an implicit wildcard at the end of the section name:

    .platformLibFast: { -lPlatformLib.lib<QueMgr.obj> (.text*)

  • You are right. I changed the order as Aarti suggested, and the initialize function can be allocated to DDR section.

    Thank you for your reply.

    Best Regards,

    Kristy