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/SIMPLELINK-CC2640R2-SDK: Faster Debug Stepping?

Part Number: SIMPLELINK-CC2640R2-SDK
Other Parts Discussed in Thread: CC2640R2F, SEGGER, CC2538

Tool/software: Code Composer Studio

Hi,

   I would like to know what is the requirement to achieve faster debug stepping at CCS. I am debugging a program running at CC2640R2F Launchpad and the debug stepping takes some time to go to the next code line or go in to a C function. The CC2640R2F Launchpad has XDS110 debugger. 

- kel

  • Markel Robregado said:
     I would like to know what is the requirement to achieve faster debug stepping at CCS.

    There is the XDS Performance comparison Wiki page, but at the moment the XDS110 is not listed in the comparison.

    Therefore, I tried my own measurements using CCS 7.1.0.00016 and a CC2538F53, under Windows 7. The test involved using a GEL script to step the target a number of instructions, where the script issued the next GEL_AsmStepInto() as soon as the target had halted after the previous instruction. The elapsed time was reported, which allowed the average time to step one instruction to be reported - which a combination of the emulator and CCS debugger performance.

    The GEL code used was:

    menuitem "Stepping Test";
    
    unsigned int remaining_instructions = 0;
    
    OnHalt ()
    {
        if (remaining_instructions > 0)
        {
            remaining_instructions--;
            if (remaining_instructions > 0)
            {
                GEL_AsmStepInto ();
            }
            else
            {
                GEL_System ("echo %TIME%");
                GEL_TextOut ("Step complete\n");
            }
        }
    }
    
    start_stepping ()
    {
        GEL_System ("echo %TIME%");
        GEL_TextOut ("Started stepping %d instructions\n",,,,,remaining_instructions);
        GEL_AsmStepInto ();
    }
    
    hotmenu STEP_10_instructions()
    {
        remaining_instructions = 10;
        start_stepping ();
    }
    
    hotmenu STEP_100_instructions()
    {
        remaining_instructions = 100;
        start_stepping ();
    }
    
    hotmenu STEP_1000_instructions()
    {
        remaining_instructions = 1000;
        start_stepping ();
    }
    
    hotmenu STEP_10000_instructions()
    {
        remaining_instructions = 10000;
        start_stepping ();
    }

    The results of the test are:

    Debug probe Debug probe configuration Average time per step
    XDS110

    JTAG TCLK frequency : fixed default 2.5MHz

    JTAG / , cJTAG / cJTAG mode : (1149.7) 2-pin advanced modes

    366 milliseconds
    XDS110

    JTAG TCLK frequency : fixed default 2.5MHz

    JTAG / , cJTAG / cJTAG mode : cJTAG (1149.7) 4-pin standard mode

    186 milliseconds
    XDS110

    JTAG TCLK frequency : fixed default 2.5MHz

    JTAG / , cJTAG / cJTAG mode : JTAG (1149.1), SWD and cJTAG are disabled

    186 milliseconds
    Segger J-Link EDU

    JTAG TCLK frequency : Auto (J-Link Control panel reported actual frequency of 4MHz)

    Target interface : JTAG

    3.1 milliseconds

    Notes:

    a) The thread CCS/TMDSEMU110-U: Confirm the specification for TCLK speed says the maximum XDS110 TCLK frequency is 2.5 MHz, which was the frequency used in the above tests.

    b) The Segger J-Link supports JTAG or SWD, and the CC2538 supports JTAG or cJTAG so JTAG was the only target interface which could be tested.

    c) I also tried using a Blackhawk USB560-M but couldn't get the test connection to work, and so couldn't take any performance measurements.

    The conclusions of the tests are:

    1) When using a XDS110 the step time can be up to twice as fast when using 4-wire JTAG or cJTAG compared to 2-wire cJTAG. This is probably because 2-wire cJTAG requires 3 times more TCLKs per operation than 4-wire modes.

    2) A Segger J-Link using 4-wire JTAG can be up to 60 times faster than a XDS110 using 4-wire mode, or up to 120 times faster than a XDS110 using 2-wire cJTAG mode.

    I can't guarantee you would see the same speed-up in your environment, but it does show a wide range of step times for different debug probes / configurations.

  • Hi Chester,

    Thanks a lot for your very detailed answer.

    - kel