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.

link error (undefined symbol) when building DSP server

Hello, 

I am now modify a TI example to make my own use.

The example I used is sprc344 audcp, the audio copy example.

The platform I used is dm6446.

The original example worked totally fine.

So, I add a self-defined function in the program, and the function is called "testfunction".

There is no error when building codec.

 

However, when I want to build the codec server, the error message showed below appeared

 

undefined                        first referenced

 symbol                              in file

---------                        ----------------

_testfunction                    /home/jay/sdk/dvsdk_1_30_01_41/audcparray/audcp_codec/lib/audcp_codec.a64P

>>   error: relocation overflow occurred at address 0x00000010 in section

            '.text' of input file 'audcp.o64P

            (/home/jay/sdk/dvsdk_1_30_01_41/audcparray/audcp_codec/lib/audcp_codec.a64P)'.  The 29-bit PC-relative displacement 471280184 at this location is too large to fit into the 21-bit PC-Relative field; the destination address is too far away from the instruction. You may need to add a mask to the assembly instruction or use other target specific assembly features if you really only need the lowest 21 bits of this symbol. Please see the section on Relocation in the Assembly User's Guide. 

 

>>   error: symbol referencing errors - 'audcpServer.x64P' not built

 

I know I might have to modify some place in the makefile of codec server, but I don't know where.

Can anyone help?

THX

  • Hi Jay,

    Did you wrote your function in a different .c than the ones allready present in the codec?

    If this is the case and you are using XDC, you need to had it to the package.bld file.

    Go to var SRCS =     ["????????",
                                      "ADD IT HERE"]

    Dont put the extension .c or .h. So if you have for example a functions.c and a functions.h you just type functions.

    This should solve your problem.

     

    P.S. This procedure is to be done in the codec "source" not in the server. The server makefile is probably ok.

     

    Best Regards

     

    Filipe Alves

     

     

  • Dear Alves,

    Thanks a lot !

    You did solve my problem.

    Another question.

    Is there any material about the build of codec source and server for me to read?