Dear All,
I've been trying to build a library which itself uses RTSC and failing miserably.
This is with CCS 5.0.3 and MCSDK 2.0.1.12.
I created a new CCS project as a "Static Library" (rather than as an "Executable").
The library uses the RTSC (and/or SYS/BIOS) Assert, Log, LoggerSys, Semaphore, SysStd and System components. So, I had to create an RTSC config file - at which point CCS converts the CCS project into an RTSC one.
All goes well in the compiling and linking of the library. And all goes well if I link the library into a program that does NOT use any further RTSC and/or SYS/BIOS components.
The problem starts when I try and link the library against a program that DOES use RTSC and/or SYS/BIOS components - say BIOS, HeapBufMP, MessageQ, etc.
The linker fails to resolve any RTSC symbols from the program. It can resolve all the RTSC symbols from the static library.
Looking at the program's RTSC project settings, I have specified the name of the library in the upper-box in the "C6000 Linker -> File Search Path" and the name of the library's directory in the lower-box.
If I remove the library's directory (say "${MYLIB_ROOT}/Debug") from the lower-box and make the upper-box refer to the explicit library filename (say "${MYLIB_ROOT}/Debug/foo.lib"), everything works fine.
It's as if the linker is picking up the linker.cmd (or whatever) for the program from "${MYLIB_ROOT}/Debug/configPkg" rather than from the Debug/configPkg for the program's own directory.
What stupid thing am I doing ?
Is there a document somewhere detailing how to build and install libraries that use RTSC and/or SYS/BIOS ?
Is what I am trying to do even possible ? Or sensible ?
Can this be done from within an RTSC project, or should I resort to using explicit out-of-CCS makefiles and hand-built linker files ?
If I build the static library and then install it somewhere where there are only libs in that directory (and no Debug or Release sub-directories), will that work ? How do you do this from within the RTSC project settings (specify an install directory, that is) ?
Thanks for any hints,
Graham