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.

locating library text not working when importing legacy CCS3.3 project

I recently installed the latest CCS (Version: 6.2.0.00048) and used the Import Legacy 3.3V projects function to import an old project.

I used the "keep original location for each project option" and checked the create a subfolder box as recommended during the import.

I manually added the library files referenced by my project, but receive an "error #10008-D: cannot find file" referencing my linker command file where I instruct the library text contents to be placed in a particular section.

snippet from my linker command file:

SECTIONS
{
//... snip
   .FAST_CODE_SECTION > DDR2 align 0x8000 // want fast code aligned on 32kB cache boundary
   {
   	rts64plus.lib(.text)
	IQmath_c64xPlus.lib(.text)
   }
//... snip
}

If I comment out the lines referencing the library text, the project will build, but examining the map file shows that the library functions called from my fast code section require trampolines, which I was able to avoid in CCS 3.3.

Is there a workaround to allow me to force the linker to place library text into a particular code section in the latest CCS?

  • What version of the compiler are you using? (It is not related to the CCS version.)

    Did the project get converted to EABI? If so, try changing rts64plus.lib to rts64plus_elf.lib
  • I accepted the default compiler version suggestion at import, which was v7.4.19
    I had to do some googling to figure out EABI, but the project options show the output format is legacy COFF.
  • Hmm.. Well, 7.4.19 ships with rts64plus.lib pre-built, so the linker should have been able to find it easily.  Perhaps the import has messed up the search path.  

    1. On the Project->Properties->General page, what does it show in the "Runtime support library" box?  
    2. If you click the "Browse..." button, does it show the compiler's library directory?  
    3. In the Project->Properties->Build->C6x Linker->File Search Path window, does the "Add <dir> to library search path" box show "${CG_TOOL_ROOT}/lib" ?
    4. In the Project->Properties->Resource->Linked Resources window, does it show CG_TOOL_ROOT pointing to the compiler installation directory? (something like C:\ti\ccsv6\tools\compiler\c6000_7_4_14)

  • 1. This box is blank. See note 2.
    2. Yes. I tried selecting the library and rebuilding, but get the same problem. As an aside, when I comment out the 2 lines trying to put the library code into a particular section, I can see that .text objects from those two libraries are in the map file. They are just being placed directly into the general .text section instead of the .fast_code_section.
    3. Yes.
    4. Yes.
  • Then I'm rather stumped. I think I'd need to see the project to diagnose this.
  • I am trying to compare options between the CCS3.3 version project and the imported project.
    From my old, working .pjt file:

    ["Compiler" Settings: "Debug"]
    Options=-pm -pdsw225 -o3 -fr"$(Proj_dir)\Debug" -i"$(Proj_dir)\include" -i"$(Proj_dir)\source\uip" -ms0 -mv6400+

    ["Linker" Settings: "Debug"]
    Options=-c -m".\Debug\clean.map" -o".\Debug\clean.out" -w -x -i"$(Install_dir)\bios_5_31_07\packages\ti\bios\lib" -l"rts64plus.lib" -l"biosDM420.a64P"

    (I think the bios references are legacy and not used at all in the project, but I included the old items verbatim)

    From my new, not working project:
    Compiler flags:
    -mv6400+ --abi=coffabi -O3 -ms0 -g --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/CCSTUD~1.3/C6000/csl/include" --include_path="C:/ti/workspace/clean/include" --include_path="C:/ti/workspace/clean/source/uip" --include_path="C:/ti/ccsv6/tools/compiler/c6000_7.4.19/include" --program_level_compile --diag_wrap=off --display_error_number --diag_warning=225 --obj_directory="C:/ti/workspace/clean/Debug"

    Linker flags:
    -mv6400+ --abi=coffabi -O3 -ms0 -g --program_level_compile --diag_wrap=off --display_error_number --diag_warning=225 --obj_directory="C:/ti/workspace/clean/Debug" -z -m"C:/ti/workspace/clean/Debug/clean.map" -i"C:/ti/workspace/clean/clean" -i"C:/ti/workspace/clean" -i"C:/CCSTUD~1.3/C6000/csl/lib" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.19/lib" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.19/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="clean_linkInfo.xml" --rom_model

    I don't know if some of those linker flags that didn't get brought over are important or not.
  • The new linker flags look OK. Please verify that both libc.a and rts64plus.lib exist in directory C:/ti/ccsv6/tools/compiler/c6000_7.4.19/lib
  • They are both there.
    As with most folks, I can't publicly post my project. What is the best way to get the files you need to reproduce this problem?
  • Click on my user name to get to my profile. From there, you should be able to send a private message.