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/TMS320F2808: CCS v8 - problem with profile clock

Part Number: TMS320F2808
Other Parts Discussed in Thread: TMS320F28335,

Tool/software: Code Composer Studio

I've previously used the profile clock with a TMS320F28335 and CCS v5 with no problems.  Sometimes using the Menu: Run->Clock commands, or sometimes via the Scripting Console with activeDS.clock.enable() / activeDS.clock.read() / activeDS.clock.reset().

I am now using a TMS320F2808 and CCS v8.3.0 (on Windows 10, 64-bit), and it works erratically.  Sometimes OK, but sometimes the clock count won't increase.  I'm stepping over a function that sometimes reports ~20000 counts, but I keep getting an increase of 0 or 1.  The function is certainly working, as I can see its effect (and a function call takes more than 0 clocks!).

Is there an issue with the clock?  Or am I not doing something I should?

Regards, Giles

  • Hello Giles,
    I am not aware of any issues. I tried to reproduce using CCSv8.3.1 on Windows 10 64-bit with my F2808 eZdsp, using the onboard XDS510USB. The profile clock is working as expected. Can you try using your F28335 with CCSv8.3.1 and see if see an issue with that target?

    Thanks
    ki
  • Hi Ki

    Using this example code:

    void A(void)
    {
        int i = 0;
        while (i < 100)
        {
            i++;
        }
    }

    int main(void)
    {
        int k;
        while(1)
        {
            k++;
            k++;
            k++;
            A();
        }
        return 0;
    }

    on a TMS320F28335.  Running from flash (RAM seems OK).

    Sometimes as I step over A() the clock does not change.

    Build console:

    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 8 all -O
     
    Building file: "../main.c"
    Invoking: C2000 Compiler
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.4.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --include_path="C:/2_BPCU/workspace_v8_B/aa" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.4.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.d_raw"  "../main.c"
    "../main.c", line 26: warning #112-D: statement is unreachable
    Finished building: "../main.c"
     
    Building target: "aa.out"
    Invoking: C2000 Linker
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.4.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"aa.map" --stack_size=0x300 --warn_sections -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.4.LTS/lib" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="aa_linkInfo.xml" --rom_model -o "aa.out" "./main.obj" "../F28335.cmd"  -llibc.a
    <Linking>
    Finished building target: "aa.out"

  • Thanks Giles,

    I can reproduce this on both 8.3.1 and 9.0.1. It works on 5.5.0

    Giles Robnson said:
    on a TMS320F28335.  Running from flash (RAM seems OK).

    This is the key trigger. If the code is in flash, then both single stepping and the profile clock require the use of HW breakpoints. The profile clock with always use a HW breakpoint resource. Single stepping will require a breakpoint resource. If the code is in RAM, then a SW breakpoint is used. If the code is in Flash, then a HW breakpoint is used.

    F28x devices have a very limited number of HW breakpoint resources available (I think 2?). Likely the issue you are hitting is how the debugger is managing the HW breakpoint resources with the clock enabled while you single step. Looks like stepping over function calls is where it is getting tripped up.

    It looks like a regression of some sort since it works in CCSv5.5. I filed a bug for this. Tracking ID: CCDSK-3608

    Thanks

    ki

  • Pity it's a bug - but good to know. I can stop trying to fix what I'm doing.
    Thanks.