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.

Single step execution in CCS

Other Parts Discussed in Thread: CCSTUDIO

Hi Everyone,

I am new to Code Composer Studio(CCS). So I dont know how to go single step execution in CCS in Simulator mode. I tried by building the code, according my knowledge control has to point to main after building, but its not occuring. Is there any settings we have to make for simulator please let me know asap.

 

Thanks & Regards,

Prashant

  • Hi Prashant,

    Which CCS vesrion you are using CCSv3 or CCSv4?

    For CCSv3, use F11 for single stepping, F10 to step over and F5 to run the program. Ctrl+m brings the cotrol to main.

    Pratap.

  • Hi Pratap,

    Thanks for reply.

    I am using CCS version 3.1.0. I pressed (Ctrl+m) keys but still I am not getting the control to main. I am getting error message as "identifier not found: main". Please help me to go forward.

     

    Thanks & Regards,

    Prashant

  • Hi Prashant,

    I believe you are not loading the program after build.
    Choose the menu 'File->Load Program' and browse for .out file created by your project. Default path for the .out file will be '<Project Dir>/Debug' for debug mode and '<Project Dir>/Release' for release mode.

    Change the below settings of the CCS(v3.3) so that program load and go main happens automatically after build.
    1. Select the menu 'Options->Customize'. This opens 'Customize' window. In this window,
    2. Select the check box 'Perform Go Main automatically' in the 'Debug Properties' tab.
    3. Select the tab 'Program/Project/CIO' and select the check box 'Load Program After Build'.
    4. Click on OK button

    Don't you have latest version of CCS?. Vesrion 3.3 is the latest in the CCS3x and CCSv4 also available. If you use latest version you will get quick help. I am using CCSv3.3 and I am not sure if the CCSv3.1 menu is same as what I decsribed above.

    Pratap.

     

  • Hi Pratap,

    I am using CCSv3.1, Settings which you mentioned are correct and I am trying to install v4 but some system level problems are occuring after resolving this issue, Surely I will switch to v4.

    But as per current problem I am debuging the project in Release mode. "Load program" option is not enabled after I building the project and also I am not getting the .out file in the "<Project Dir>/Release" path.

    What I have to do to get the out file and also to enable the Load program option.

     

    Thanks & Regards,

    Prashant

  • Hi Prashant,

    Is your project build successful?. Are you building the executable project?.

    Using CCS you can create two types of projects. One is executable and other one is library. Executable projects create .out file after successful build where as library projects create .lib files. You need to create an executable projects for loading and executing the program. Executable projects may include library projects as dependent projects.

    If your problem is not specific to build mode(Debug/Release) it is better to debug it in Debug mode. Default release mode settings do not allow you to single step. Also check whether your simulator is suitable to do the operation you are trying to do.

    Pratap

     

  • Prathap,

    My project was building without errors and I am buiding the .pjt project. Now I am getting .out file since I tried on other system. But now I done all the setting you told but I am not getting the control to main function.

    Please help in changing the mode from Release to Debug and I will try with it. Please give me your mail ID.

     

    Thanks & Regards,

    Prashant.

  • Hi Prashant,

    Can you please describe the steps you are doing for building and loading your program.

    In CCS IDE above project window(Which shows your project files) there will be two drop down windows. One shows your project name and other shows your project active build mode. You can change your build mode by selecting required mode in this window.

    Have you tried running your program on any HW board?.

    Pratap. 

  • Hi Pratap,

    The procedure I am following in building and loading the project is as follows:

    1. Right click on project file and building it---> Building
    2. File\Load Program---> Loading.

    In CCS IDE, In Project active build mode: Only Release is visible i.e there is no Debug option.

    "Code which I am debugging in Simulator is working nicely in Hardware board". But I want to check the flow of the program it will be useful if I go through Single step.

     

    Thanks & Regards,

    Prashant.

  • Hi Prashant,

    If you don't have debug mode you can enable the debug for release mode by following the below steps

    1. Right click on the project and select 'Build Options'

    2. In the compiler tab, change the option in the dropdown 'Generate Debug Info' to 'Full Symbolic Debug'

    3. Change the option in the drop downs 'Opt Level' and Program Level Opt' to 'None'.

    4. Rebuild your program

    Now you should be able to single step your program.

    Pratap

  • Hi Pratap,

    I done the steps you mentioned but still I am not getting the Debug mode. When I done above changes I got linker error which is given below

     

     

    error: can't allocate .text, size 0000979e (page 1) in IDATA (avail:
                00007600), IDATA (avail: 001f0000)
    >>   error: errors in input - ./Release/MTL32_015.out not built

    >> Compilation failure

    Build Complete,
      3 Errors, 0 Warnings, 5 Remarks.

     

     

    Please give your mail ID I will send the chunk of code for you, please rebuild it and then let me know whether it is tool issue or what else.

     

    Thanks & Regards,

    Prashant

  • Hi Prashant,

    I think the available processor memory is not sufficient for debug mode configurations. You can reach me here 

    Please let me know the details of platform and simualtor you are using.

    Pratap.

  • Hi pratap,

    I am building the Examples code given in the CCS installed path ie "Sine.pjt". I am able to build this project in debug mode but I am getting some linking error which is given below please help in solving this issue.


    ------------------------------  sine.pjt - Debug  ------------------------------
    [SINE_T.C] "C:\CCStudio_v3.1\C5500\cgtools\bin\cl55" -g -q -fr"D:/Testing/sine/Debug" -i"../../include" -d"_DEBUG" -@"Debug.lkf" "SINE_T.C"
    "SINE_T.C", line 8: fatal error: could not open source file "tms320.h"
    1 fatal error detected in the compilation of "SINE_T.C".
    Compilation terminated.

    >> Compilation failure

    [TEST.C] "C:\CCStudio_v3.1\C5500\cgtools\bin\cl55" -g -q -fr"D:/Testing/sine/Debug" -i"../../include" -d"_DEBUG" -@"Debug.lkf" "TEST.C"
    "TEST.C", line 10: fatal error: could not open source file "tms320.h"
    1 fatal error detected in the compilation of "TEST.C".
    Compilation terminated.

    >> Compilation failure

    Build Complete,
      2 Errors, 0 Warnings, 0 Remarks.

     

     

    Waiting for your response.

    Thanks & Regards,

    Prashant

     

     

  • Hi pratap,

    I am building the Examples code given in the CCS installed path ie "Sine.pjt". I am able to build this project in debug mode but I am getting some linking error which is given below please help in solving this issue.


    ------------------------------  sine.pjt - Debug  ------------------------------
    [SINE_T.C] "C:\CCStudio_v3.1\C5500\cgtools\bin\cl55" -g -q -fr"D:/Testing/sine/Debug" -i"../../include" -d"_DEBUG" -@"Debug.lkf" "SINE_T.C"
    "SINE_T.C", line 8: fatal error: could not open source file "tms320.h"
    1 fatal error detected in the compilation of "SINE_T.C".
    Compilation terminated.

    >> Compilation failure

    [TEST.C] "C:\CCStudio_v3.1\C5500\cgtools\bin\cl55" -g -q -fr"D:/Testing/sine/Debug" -i"../../include" -d"_DEBUG" -@"Debug.lkf" "TEST.C"
    "TEST.C", line 10: fatal error: could not open source file "tms320.h"
    1 fatal error detected in the compilation of "TEST.C".
    Compilation terminated.

    >> Compilation failure

    Build Complete,
      2 Errors, 0 Warnings, 0 Remarks.

     

     

    Waiting for your response.

    Thanks & Regards,

    Prashant

     

     

  • Prashant,

    To fix this error, you need to include the file path for "tms320.h" in your project. Here is how you do it:

    1) Right-click on your project and go to "Build Properties"

    2) Under the "C5000 Compiler," go to "Include Options" and include the file path for "tms320.h"

    3) Under the "C5000 Linker," go to "File Search Path" and include the file path for "tms320.h"

     

  • Hi Juliana Almeida,

    I am not getting the Build properties when I right click on my project. If I go for Build options also I am not getting the C5000 Compiler in that option.

     

    Please help to go forward.

     

    Thanks & Regards,

    Prashant

     

     

  • Hi Prashant,

    Here are some screen shots that might help you

     

    Let me know if it works

  • Prashant,

    You can download the latest version of CCS here:

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

    The DVD image is free for use with C5000 tools.

  • Hi Juliana Almeida,

    I can able to change my project from Release to Debug, but not able to go single step execution because when i build the project in Debug mode it was giving error which is mentioned below.

     

    ---------------------------  MTL32_015.pjt - Debug  ---------------------------
    [Linking...] "C:\CCStudio_v3.1\C5500\cgtools\bin\cl55" -@"Debug.lkf"
    <Linking>
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'addd.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'cmpd.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'divli.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'exit.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'fixdi.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'fixdli.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'fixdul.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'fltid.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'fltlid.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'fltud.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'fltuld.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'llmpy.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'memcpy.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'mpyd.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'negd.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member '_lock.obj')
    >>   error: linking files for incompatible targets (library
                'D:\Prashant\Codes\MTL32Code\DSP\rts55x.lib', member 'frcmpyd.obj')

    >> Compilation failure

    Build Complete,
      18 Errors, 0 Warnings, 0 Remarks.

     

    Please help to solve this issue.

     

    Thanks & Regards,

    Prashant