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.

Can't find a source file at "/tmp/......../SRC/sin.c"

I am working on the Multi-Day workshop Lab 8.

I have not touched any of the example files, except I changed MATH_TYPE to FLOAT_MATH in IQmathLib.h

float y=0.0;
y=sin(0.24); //I have tried _IQsin(_IQ(0.24)) also

I put this code in Main, and it builds .. and I set a breakpoint on y=sin(0.24); and when it breaks, and I try to step through, I get an error

Can't find a source file at "/tmp/TI_MKLIBr3xJF4/SRC/sin.c"
Locate the file or edit the source lookup path to include its location.

"${CG_TOOL_ROOT}/include"
"${PROJECT_ROOT}/../../IQmath/include"
"${PROJECT_ROOT}/../../F2806x_headers/include"

which includes the IQmathLib.h (which includes <math.h> since MATH_TYPE is set to FLOAT_MATH

under Linker, I have

IQmath.lib and "libc.a"

with paths

"${CG_TOOL_ROOT}/lib"
"${PROJECT_ROOT}/../../IQmath/lib"
"${CG_TOOL_ROOT}/include"

Everything is set up right for the Labs in the workshop, and the only thing I changed was MATH_TYPE in IQmathLib.h and tried to do a simple sine function in my main.  Any ideas?

  • Sergio,

    When you add these lines the program will call the sin() function in the run-time support library for this device.  This is archived (i.e. object) code which is linked in when the project is built.  When you hit the break-point, click "View disassembly" and you will see the assembly instructions from that module.  You will be able to step through it by clicking the "Assembly step into" button in CCS.

    The C source from which the sin() function was built is included with the codegen tools when you installed CCS.  You can open the C file and look at the source, if that's what you want to do.  The path depends on how you installed CCS, but on my machine it's at: "c:\ti\ccsv6\tools\compiler\C2000_6.2.2\lib\rtssrc" and the file is "sin.c".

    I hope this helps.

    Regards,

    Richard

  • Is this because I have "Runtime support library" in my project properties set to <automatic>?

    Should I manually pick rts2800_fpu32.lib

    When I got the error, I pointed it to

    C:\ti\ccsv5\tools\compiler\c2000_6.2.5\lib\src

    and now it's happy.

    Where is the setting for this?  How can I avoid this problem with other projects in the future?

  • Sergio,

    CCS is doing what I'd expect.  If you want to debug object code you'll have to do this each time.  The alternative is to manually include the C source in your project.  If you can tell me what it is you want to do I can try to help.

    Regards,

    Richard

  • I think I understand what's going on .... it's still computing the sin( ) correctly, but when I hit Step in debug mode, it doesn't know where the sin.c file is.  I can just hit Step Over and look at the variable after, and see it was computed correctly.

    Anyway, thanks for your help.