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.

CCS/TMS320C6748: CCS/TMS320C6748

Part Number: TMS320C6748
Other Parts Discussed in Thread: MATHLIB, SYSBIOS

Tool/software: Code Composer Studio

Hello

I am using mathlib 2.01.00.00 on CCS5.5.0 and I want to upgrade my application to use MATHLIB 3.1.2.1. But what ever I do, I do not succeed in linking mathlib with my application.

I have developped a simple test program but whatever I do the linker does not want to link my application.

I don't understand. I never had such problems with mathlib 2.01.00.00....

Thank you by advance

ANNE-MARIE BONNET

-> Error displayed at link

-> Configuration of compiler and linker

->Test program

#include <xdc/std.h>

#include <xdc/runtime/Error.h>

#include <xdc/runtime/System.h>

#include <ti/sysbios/BIOS.h>

#include <ti/sysbios/knl/Task.h>

#include <math.h>

#include <mathlib.h>

/*

* ======== taskFxn ========

*/

Void taskFxn(UArg a0, UArg a1)

{

System_printf("enter taskFxn()\n");

#define NBPTS 1000

float afCos[NBPTS];

float afSin[NBPTS];

float afTan[NBPTS];

float fAngle = 0;

float fIncAngle = 2 * 3.14 / NBPTS;

int iNbMeasure = NBPTS;

for (int i = 0 ; i < NBPTS ; i++)

{

//Test cos

afCos[i] = cossp(fAngle);

//test sin

afSin[i] = sinsp(fAngle);

//test tan

afTan[i] = tansp(fAngle);

fAngle += fIncAngle;

} 

System_printf("exit taskFxn()\n");

System_flush(); /* force SysMin output to console */

}

/*

* ======== main ========

*/

Int main()

{

Task_Handle task;

Error_Block eb;

System_printf("enter main()\n");

Error_init(&eb);

task = Task_create(taskFxn, NULL, &eb);

if (task == NULL) {

System_printf("Task_create() failed!\n");

BIOS_exit(0);

}

BIOS_start(); /* does not return */

return(0);

}

  • Hello, your attached screenshots did not come through so I am unable to see the error message, and compiler/linker configuration. Could you please re-attach the images? Or you could copy the build log (output of the CCS build console) to a text file and attach it here.
  • Hello I finally succed in compiling with mathlib 3.1.2.1 and dsplib 3.4.0.0 after modifying mathlib.h and dsplib.h. I add at start 'extern C'

    extern "C" { ......}

    So now I can use the last release of libraries. I still have a problem because I want to measure the calculation time of the functions I'm using and the calculation is strongly dependent of input values and of number of calls averaged

    For example for log10 :

    1/ First I measure the time taken by TimeStamp_get32()

    2/ Then, at each call of function log10sp, I measure the calculation time with TimeStamp

    3/ Then I calculate the avergage

    Is there something xrong with this method ?

    Thank you by advance

     

    //Calculate average calculation time of TimeStamp

    m_iOffset = 0;

    for (int i = 0; i<100 ; i++)

    {

    iStart = Timestamp_get32();

    iStop = Timestamp_get32();

    m_iOffset += iStop-iStart;

    }

    m_iOffset = m_iOffset /(LLINT)100;

    //Test log10

    iStart = Timestamp_get32();

    fResult = log10sp(fAngle);

    iStop = Timestamp_get32();

    llCalculationTimeLog10 += (iStop-iStart);

     // Calculate average time of log10

    LLINT iCalculationTimeLog10 = llCalculationTimeLog10/iNbMeasure -m_iOffset;

  • A BONNET said:
    So now I can use the last release of libraries.

    Glad to hear this.

    A BONNET said:
    I still have a problem because I want to measure the calculation time of the functions I'm using and the calculation is strongly dependent of input values and of number of calls averaged

    This question will be better answered by the experts in the device forum so I would suggest starting a new post for this in the C67x device forum.