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 5: No source available for "sprintf(...)"

Hi there,

Somehow I need to trace into sprintf() and this issue occurs even I can set breakpoint in sprintf.c.

Please indicate the way to make this C-level debug possible.

Regards,

Yulin.

  • Hi Yulin,

    do you mean you can't step into the sprintf function?  Can you please provide further infromation?

    - what target are you using?

    - what CCS Version?

    - what debug settings?

    Bacially anything that might help us to help you here.

    Best Regards,
    Lisa

  • Hi Lisa,

    Thanks for taking care of this.

    No, I can't step into the sprintf() in C level but I can step into it in ASM level.
    The target is a DM365.
    The IDE is CCS v5.1 with CGT v4.9.1.
    As for the debug settings, there are so many settings in CCS5 that I don't know which one is associated exactly.
    Could you please specify the file, the window, or the setting locations ?

    Compiler flags are:
    -mv5e -g -O2 --gcc --define="_DEBUG" --define="__ARCH_DM365__" --define="DVR_SLICE=VS_5" --include_path="C:/ti/ccsv5/tools/compiler/tms470/include" --include_path="W:/prj/mtg_ccs5/picos" --include_path="W:/prj/mtg_ccs5/sys" --include_path="W:/prj/mtg_ccs5/app" --include_path="W:/prj/mtg_ccs5/shl/api" --diag_warning=225 --diag_error=225 --display_error_number -me --abi=ti_arm9_abi --code_state=32 --std_lib_func_redefined

    Linker flags are:
    -mv5e -g -O2 --gcc --define="_DEBUG" --define="__ARCH_DM365__" --define="DVR_SLICE=VS_5" --diag_warning=225 --diag_error=225 --display_error_number -me --abi=ti_arm9_abi --code_state=32 --printf_support=nofloat --std_lib_func_redefined -z -m"../../debug/shl.map" --stack_size=1024 --heap_size=1024 --warn_sections -i"C:/ti/ccsv5/tools/compiler/tms470/lib" -i"C:/ti/ccsv5/tools/compiler/tms470/include" --reread_libs --absolute_exe --rom_model

    The debug configuration is

    Regards,
    Yulin

  • Hi Yulin,

    the runtime libraries are not build with the setting -g by default.  You would have to rebuild the runtime library with the -g enabled in order to get C source stepping.

    Have a look at this wiki which should help show you how to do this and please keep us informed.

    http://processors.wiki.ti.com/index.php/Mklib

    Best Regards,
    Lisa

  • #include <msp430.h>

    #include <stdio.h> //////////////!!!!!!!!!!!!!!!

    char value[20];

    unsigned char x;

    sprintf(value,"%d ", x);
    glcd_text57(10, 30, value ,1,1);

    enjoy....