DSPRelated.com
Forums

Linking problem with the c5505 CSL...

Started by znll...@gmail.com February 27, 2010
Buliding a simple main as this:

#include "csl_i2c.h"
void main(){
CSL_I2cSetup i2cSetup;
I2C_setup(&i2cSetup);
}

even if I linked the csl header in the build properties, I obtain three errors:

errors encountered during linking; "prova.out" not built

Linking failed. Check the Console window for details.

unresolved symbol _I2C_setup, first referenced in ./main.obj

...and on the console I read this:

**** Build of configuration Debug for project prova ****

C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake -k all
'Building file: ../main.c'
'Invoking: C5500 Compiler'
"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -g --include_path="C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/inc" --include_path="C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/include" --diag_warning"5 --sat_reassoc=off --ptrdiff_size --fp_reassoc=off --memory_model=small --asm_source=mnemonic --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
"../main.c", line 5: warning: last line of file ends without a newline
'Finished building: ../main.c'
' '
'Building target: prova.out'
'Invoking: C5500 Linker'
"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -z -m"prova.map" --warn_sections -i"C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/lib" -i"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/lib" -i"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/include" --reread_libs --rom_model -o "prova.out" "./main.obj" -l"rts55.lib"

warning: creating ".stack" section with default size of 0x3e8; use the -stack
option to change the default size
warning: creating ".sysstack" section with default size of 0x3e8; use the
-sysstack option to change the default size

undefined first referenced
symbol in file
--------- ----------------
_I2C_setup ./main.obj

error: unresolved symbols remain
error: errors encountered during linking; "prova.out" not built

>> Compilation failure
C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: *** [prova.out] Error 1
C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not remade because of errors.
Build complete for project prova

What should I do?

Thanks

Andrea
Andrea-

> Buliding a simple main as this:
>
> #include "csl_i2c.h"
> void main(){
> CSL_I2cSetup i2cSetup;
> I2C_setup(&i2cSetup);
> }
>
> even if I linked the csl header in the build properties, I obtain three errors:
>
> errors encountered during linking; "prova.out" not built
>
> Linking failed. Check the Console window for details.
>
> unresolved symbol _I2C_setup, first referenced in ./main.obj

You have to determine which code contains I2C_setup() function. Is that a TI library? A third-party library, for
example if you're using a third-party development board (Spectrum Digital etc) ?

Once you know, then you can add a file in whatever format is available (.lib, .obj, our C/C++ source) to your project,
then rebuild.

-Jeff

> ...and on the console I read this:
>
> **** Build of configuration Debug for project prova ****
>
> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake -k all
> 'Building file: ../main.c'
> 'Invoking: C5500 Compiler'
> "C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -g
> --include_path="C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/inc" --include_path="C:/Programmi/Texas
> Instruments/ccsv4/tools/compiler/c5500/include" --diag_warning"5 --sat_reassoc=off --ptrdiff_size
> --fp_reassoc=off --memory_model=small --asm_source=mnemonic --preproc_with_compile --preproc_dependency="main.pp"
> "../main.c"
> "../main.c", line 5: warning: last line of file ends without a newline
> 'Finished building: ../main.c'
> ' '
> 'Building target: prova.out'
> 'Invoking: C5500 Linker'
> "C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -z -m"prova.map" --warn_sections
> -i"C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/lib" -i"C:/Programmi/Texas
> Instruments/ccsv4/tools/compiler/c5500/lib" -i"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/include"
> --reread_libs --rom_model -o "prova.out" "./main.obj" -l"rts55.lib"
>
> warning: creating ".stack" section with default size of 0x3e8; use the -stack
> option to change the default size
> warning: creating ".sysstack" section with default size of 0x3e8; use the
> -sysstack option to change the default size
>
> undefined first referenced
> symbol in file
> --------- ----------------
> _I2C_setup ./main.obj
>
> error: unresolved symbols remain
> error: errors encountered during linking; "prova.out" not built
>
>>> Compilation failure
> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: *** [prova.out] Error 1
> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not remade because of errors.
> Build complete for project prova
>
> What should I do?
>
> Thanks
>
> Andrea
Looking at it a second time, it does look like you have provided the
necessary information. I might need to upgrade to glasses or better focus ;)
But still, try my suggestion.
You have already linked in the rts lib it looks like: -l"rts55.lib" so
doing the same for the csl lib might help.

Good luck!

-Sima

On Wed, Mar 3, 2010 at 8:37 PM, Sima Baymani wrote:

> Hi Andrea,
> do you still have this problem?
>
> If possible, could you paste all the flags you send to the compiler and
> linker?
>
> Looking at the messages you get, it looks like you don't link in the csl
> library, as it is the linker that complains. You have provided the compiler
> with the header files, and all is well there. But then when the linker tries
> to find the symbols they are nowhere to be found. If my guess is correct you
> need to add a flag such as "-lcsl55x.lib" or something like it. You need to
> find out the correct path to provide to the linker.
>
> Hope this helps,
> Sima
> On Sun, Feb 28, 2010 at 1:39 AM, wrote:
>
>> Buliding a simple main as this:
>>
>> #include "csl_i2c.h"
>> void main(){
>> CSL_I2cSetup i2cSetup;
>> I2C_setup(&i2cSetup);
>> }
>>
>> even if I linked the csl header in the build properties, I obtain three
>> errors:
>>
>> errors encountered during linking; "prova.out" not built
>>
>> Linking failed. Check the Console window for details.
>>
>> unresolved symbol _I2C_setup, first referenced in ./main.obj
>>
>> ...and on the console I read this:
>>
>> **** Build of configuration Debug for project prova ****
>>
>> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake -k all
>> 'Building file: ../main.c'
>> 'Invoking: C5500 Compiler'
>> "C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -g
>> --include_path="C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/inc"
>> --include_path="C:/Programmi/Texas
>> Instruments/ccsv4/tools/compiler/c5500/include" --diag_warning"5
>> --sat_reassoc=off --ptrdiff_size --fp_reassoc=off --memory_model=small
>> --asm_source=mnemonic --preproc_with_compile --preproc_dependency="main.pp"
>> "../main.c"
>> "../main.c", line 5: warning: last line of file ends without a newline
>> 'Finished building: ../main.c'
>> ' '
>> 'Building target: prova.out'
>> 'Invoking: C5500 Linker'
>> "C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -z
>> -m"prova.map" --warn_sections
>> -i"C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/lib" -i"C:/Programmi/Texas
>> Instruments/ccsv4/tools/compiler/c5500/lib" -i"C:/Programmi/Texas
>> Instruments/ccsv4/tools/compiler/c5500/include" --reread_libs --rom_model -o
>> "prova.out" "./main.obj" -l"rts55.lib"
>>
>> warning: creating ".stack" section with default size of 0x3e8; use the
>> -stack
>> option to change the default size
>> warning: creating ".sysstack" section with default size of 0x3e8; use the
>> -sysstack option to change the default size
>>
>> undefined first referenced
>> symbol in file
>> --------- ----------------
>> _I2C_setup ./main.obj
>>
>> error: unresolved symbols remain
>> error: errors encountered during linking; "prova.out" not built
>>
>> >> Compilation failure
>> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: *** [prova.out]
>> Error 1
>> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not
>> remade because of errors.
>> Build complete for project prova
>>
>> What should I do?
>>
>> Thanks
>>
>> Andrea
>>
>>
Hi Andrea,
do you still have this problem?

If possible, could you paste all the flags you send to the compiler and
linker?

Looking at the messages you get, it looks like you don't link in the csl
library, as it is the linker that complains. You have provided the compiler
with the header files, and all is well there. But then when the linker tries
to find the symbols they are nowhere to be found. If my guess is correct you
need to add a flag such as "-lcsl55x.lib" or something like it. You need to
find out the correct path to provide to the linker.

Hope this helps,
Sima
On Sun, Feb 28, 2010 at 1:39 AM, wrote:

> Buliding a simple main as this:
>
> #include "csl_i2c.h"
> void main(){
> CSL_I2cSetup i2cSetup;
> I2C_setup(&i2cSetup);
> }
>
> even if I linked the csl header in the build properties, I obtain three
> errors:
>
> errors encountered during linking; "prova.out" not built
>
> Linking failed. Check the Console window for details.
>
> unresolved symbol _I2C_setup, first referenced in ./main.obj
>
> ...and on the console I read this:
>
> **** Build of configuration Debug for project prova ****
>
> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake -k all
> 'Building file: ../main.c'
> 'Invoking: C5500 Compiler'
> "C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -g
> --include_path="C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/inc"
> --include_path="C:/Programmi/Texas
> Instruments/ccsv4/tools/compiler/c5500/include" --diag_warning"5
> --sat_reassoc=off --ptrdiff_size --fp_reassoc=off --memory_model=small
> --asm_source=mnemonic --preproc_with_compile --preproc_dependency="main.pp"
> "../main.c"
> "../main.c", line 5: warning: last line of file ends without a newline
> 'Finished building: ../main.c'
> ' '
> 'Building target: prova.out'
> 'Invoking: C5500 Linker'
> "C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -z
> -m"prova.map" --warn_sections
> -i"C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/lib" -i"C:/Programmi/Texas
> Instruments/ccsv4/tools/compiler/c5500/lib" -i"C:/Programmi/Texas
> Instruments/ccsv4/tools/compiler/c5500/include" --reread_libs --rom_model -o
> "prova.out" "./main.obj" -l"rts55.lib"
>
> warning: creating ".stack" section with default size of 0x3e8; use the
> -stack
> option to change the default size
> warning: creating ".sysstack" section with default size of 0x3e8; use the
> -sysstack option to change the default size
>
> undefined first referenced
> symbol in file
> --------- ----------------
> _I2C_setup ./main.obj
>
> error: unresolved symbols remain
> error: errors encountered during linking; "prova.out" not built
>
> >> Compilation failure
> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: *** [prova.out]
> Error 1
> C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not
> remade because of errors.
> Build complete for project prova
>
> What should I do?
>
> Thanks
>
> Andrea
>
>
Hi Sima, thanks for your help. Now I've resolved the problem, it didn't work because the build properties weren't set correctly. The main problem was the memory model which was set as "small" instead of "large". Thank you again for your help.

Andrea

Buliding a simple main as this:
>
>#include "csl_i2c.h"
>void main(){
> CSL_I2cSetup i2cSetup;
> I2C_setup(&i2cSetup);
>}
>
>even if I linked the csl header in the build properties, I obtain three errors:
>
>errors encountered during linking; "prova.out" not built
>
>Linking failed. Check the Console window for details.
>
>unresolved symbol _I2C_setup, first referenced in ./main.obj
>
>...and on the console I read this:
>
>**** Build of configuration Debug for project prova ****
>
>C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake -k all
>'Building file: ../main.c'
>'Invoking: C5500 Compiler'
>"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -g --include_path="C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/inc" --include_path="C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/include" --diag_warning"5 --sat_reassoc=off --ptrdiff_size --fp_reassoc=off --memory_model=small --asm_source=mnemonic --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
>"../main.c", line 5: warning: last line of file ends without a newline
>'Finished building: ../main.c'
>' '
>'Building target: prova.out'
>'Invoking: C5500 Linker'
>"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/bin/cl55" -z -m"prova.map" --warn_sections -i"C:/Programmi/TMS320VC55XCSL-LOWPWR/VC5505_CSL/lib" -i"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/lib" -i"C:/Programmi/Texas Instruments/ccsv4/tools/compiler/c5500/include" --reread_libs --rom_model -o "prova.out" "./main.obj" -l"rts55.lib"
>
>warning: creating ".stack" section with default size of 0x3e8; use the -stack
> option to change the default size
>warning: creating ".sysstack" section with default size of 0x3e8; use the
> -sysstack option to change the default size
>
> undefined first referenced
> symbol in file
> --------- ----------------
> _I2C_setup ./main.obj
>
>error: unresolved symbols remain
>error: errors encountered during linking; "prova.out" not built
>
>> > Compilation failure
>C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: *** [prova.out] Error 1
>C:\Programmi\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not remade because of errors.
>Build complete for project prova
>
>What should I do?
>
>Thanks
>
>Andrea