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 Include and Link Mathlib's log10sp_v ?

Other Parts Discussed in Thread: MATHLIB

What is the correct way to link log10sp_v into my project? I am using the C6678 and mathlib_c66x_3_0_1_1. The strange thing about it, is that I have successfully included and linked log10dp_v, but trying to call log10sp_v in the same location does not work. Can someone please explain the proper steps for this in a SYS/BIOS project?

Thanks,

Ryan

  • Ryan,

    After linking, can you see log10sp_v listed in the application's map file to confirm that it was linked in?  Do you see any link warnings or errors?

    Can you describe more what you mean by “but trying to call log10sp_v in the same location does not work”.  Does this result in a build error, or a runtime error?

    Also, I think this thread from the compiler forum may help: http://e2e.ti.com/support/development_tools/compiler/f/343/t/131313.aspx?pi67643=1

    Scott

  • Scott,

    Sorry for not being too clear. I was unable to link log10sp_v.obj. Here is my message on the Console:

    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    logtable ./log10sp_v.obj

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

    >> Compilation failure
    gmake: *** [Matchbox.out] Error 1
    gmake: Target `all' not remade because of errors.

    In my project, I could call log10dp_v() without any build or linking errors, then when I tried switching that to log10sp_v(), I had no build errors, but had linking errors.

    Ryan

  • Ryan,

    OK, thanks. 

    So you are able to use log10dp_v() in your application, but not log10sp_v()?  From the compiler forum thread I’d pointed to these objects should reside in the same library.  Strange indeed!

    Can you run the archiver on your math library (as described in that compiler forum thread) to confirm that both objects are indeed in the library?

    I’ll also send a TI-internal email to the math library team to see if they can comment…

    Scott

  • Scott,

    In the mentioned thread's example, they use the command , "C:\Program Files\Texas Instruments\c67xmathlib_2_01_00_00\lib>ar6x -t c67xfastMath.lib" . I'm not using c67xfastmathlib, I'm using the mathlib_c66x_3_0_1_1 library. What should my query be?

    Ryan

  • Ryan,

    You should use a similar command line, but specify your math library name in place of the “c67xfastMath.lib”.

    Scott

  • Scott, 

    I'm still not sure what that lib file would be ( ie, what is the filename I should use?). Here are the contents of my mathlib/lib folder:

    C:\ti\mathlib_c66x_3_0_1_1\lib>ls
    ar6x.exe macros.ini mathlib.a66 mathlib.a66e mathlib.ae66 mathlib.ae66e

    C:\ti\mathlib_c66x_3_0_1_1\lib>

    Ryan

  • Scott,

    I think I understand what I was supposed to type:

    C:\ti\mathlib_c66x_3_0_1_1\lib>ar6x -t mathlib.ae66

    SIZE DATE FILE NAME
    -------- ------------------------ ---------------
    2300 Mon Feb 06 15:25:39 2012 atan2dp.obj
    1357 Mon Feb 06 15:27:24 2012 atan2sp.obj
    1865 Mon Feb 06 15:28:59 2012 atandp.obj
    1187 Mon Feb 06 15:30:44 2012 atansp.obj
    1443 Mon Feb 06 15:33:23 2012 cosdp.obj
    1031 Mon Feb 06 15:35:04 2012 cossp.obj
    871 Mon Feb 06 15:37:24 2012 divdp.obj
    839 Mon Feb 06 15:39:00 2012 divsp.obj
    1667 Mon Feb 06 15:40:40 2012 exp10dp.obj
    1512 Mon Feb 06 15:42:17 2012 exp10sp.obj
    1688 Mon Feb 06 15:43:51 2012 exp2dp.obj
    1508 Mon Feb 06 15:45:28 2012 exp2sp.obj
    1629 Mon Feb 06 15:47:12 2012 expdp.obj
    1475 Mon Feb 06 15:48:50 2012 expsp.obj
    1751 Mon Feb 06 15:50:29 2012 log10dp.obj
    1376 Mon Feb 06 15:52:01 2012 log10sp.obj
    1736 Mon Feb 06 15:53:30 2012 log2dp.obj
    1443 Mon Feb 06 15:55:00 2012 log2sp.obj
    1726 Mon Feb 06 15:56:23 2012 logdp.obj
    1438 Mon Feb 06 15:57:49 2012 logsp.obj
    1377 Mon Feb 06 15:59:38 2012 powdp.obj
    1269 Mon Feb 06 16:07:58 2012 powsp.obj
    875 Mon Feb 06 16:22:35 2012 recipdp.obj
    843 Mon Feb 06 16:24:22 2012 recipsp.obj
    971 Mon Feb 06 16:26:00 2012 rsqrtdp.obj
    875 Mon Feb 06 16:27:30 2012 rsqrtsp.obj
    1443 Mon Feb 06 16:28:42 2012 sindp.obj
    1031 Mon Feb 06 16:29:57 2012 sinsp.obj
    1041 Mon Feb 06 16:31:13 2012 sqrtdp.obj
    1009 Mon Feb 06 16:32:19 2012 sqrtsp.obj

    C:\ti\mathlib_c66x_3_0_1_1\lib>

  • Ryan,

    Yes, this is what I was asking for.  Both the “log10dp.obj” and “log10sp.obj” objects reside in the library.  So it is very strange that simply changing the function name at the same call site would be OK in one case, but cause a linker error in the other.

    I don’t know which library is being linked in your app.  You should be able to see the specific library referenced in the map file.  If it is one of the other three libraries you can double check that these objects both exist in that library too.

    I’d sent that ping to the math library team asking them to look at this forum thread.  Hopefully they can reply back with an answer or suggestion soon…

    Scott

  • Scott,

    I'm not sure what exactly is being done, but I followed the solution in http://e2e.ti.com/support/development_tools/compiler/f/343/p/206048/730549.aspx#730549 and that allowed my code to build and link. I'm not sure it is correct, and I can't imagine why I must do this, but it finally linked.

    How do I reach the MATHLIB team for their help?

    Ryan

  • Ryan,

    OK, thanks for the update.  I’m glad to hear your program is linking OK now.  

    I cannot give you the direct contact information, but I just sent another ping asking for a reply to this forum thread.

    Hope you will hear something soon…

    Scott

  • Ryan,

    It was our mistake that some _v and _i API's has been left out of our Mathlib object library. We are making a patch release to address this issue. The patch release is in final testing phase. It should be available soon. Sorry for the inconvenience.

    regards,

    Yimin