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 V5 (with GNUCHAINTOOL) Can't break at the breakpoint in C code

Other Parts Discussed in Thread: AM1808, CCSTUDIO

hello,

    I compile the usb_dev_serial demo in the AM1808_StarterWare_1_00_03_03 with gnu chaintool arm-none-eabi. but  the ccs5 can't break the breakpoint set. the detail is below, pls give me some ideas.

     1.   create the new makefile project,browse and select "AM1808_StarterWare_1_00_03_03\build\armv5\gcc\am1808\evmAM1808\usb_dev_serial"

     2.  configure the gnu chaintool in project properties,set the C/C++ build->Environment, add new variable LIB_PATH.

     3.   source location in "Environment " configure lab, link the directory "AM1808_StarterWare_1_00_03_03\examples\evmAM1808\usb_dev_serial"

     4.  make the project and successful. then new the Target  configurations, select the am1808 and the am1808.gel.

     5.  launch the debug, and set breakpoint in c code, the debug can,t halt at the breakpoint. if set the breakpoint in disassemble, the debug work well.

what happen? how do i configure the ccs to enable breakpoint function in c-code. thanks a lot.

Token.Jiang

  • Nobody to solve this problem?

    Why?

    Is this problem is very difficult?

  • Hi,

        Sorry for the delay in response.

        I dont have much insight in to this issue. moving this thread to CCS forum so that right folks will attend to it.

    regards

    Baskaran

  • HI,

    The breakpoint that you set is a C/C++ (CDT) breakpoint, the blue icon (smaller) is different than the CCS breakpoint that you set in the Disassembly view.

    CCS source breakpoint is only supported for CCS Project. However, you can manually tweak the .project file to enable setting CCS Breakpoint in the editor. Open the .project file in your project and add this line to the bottom together with the other natures.

    <nature>com.ti.ccstudio.debug.ccsBreakpointNature</nature>

    This is assuming you are using one of the newer version of CCS. I don't recall which CCS version have this workaround enabled.

    Regards,
    Patrick 

  • Hi Patrick ,

          The problem can't be resolved. pls give me more help. attached is the description  about the issue. 

    7853.CCS Problem description.rar

           

           

  • Are you able to enable breakpoint #7 (l2cLedBlink.c, line 88) in the Breakpoints view? For breakpoint #5, it looks like there is no instruction associated with the source line. 

    From looking at the disassembly view in des1.jpg file, it doesn't look like there is any source line info within your application, perhaps your application didn't compile with debug information enabled?

    Regards,
    Patrick 

  • Patrick,

         Thanks for your replies. the breakpoint #7 can't be enable.the case is the same as breakpoint #5. the project is frome the ti official example in the AM1808_StarterWare_1_00_03_03.  the project  is compiled with  "-g" paramter. it should generate the debug info. 

        

    patch said:
    it doesn't look like there is any source line info within your application,

       about this . you maybe right.  how to avoid the problem?  CCS can't location the source code  when launching the debug session. so I manually add the source code. 

    Token.Jiang

  • Token,

    Can you try manually add the source lookup directory where the source is located to your current debug session?

    In the Debug view, right click on the root node (i.e ccxml file node) and select Edit Source Lookup... Within the dialog, click on the Add button and then select File System Directory. Browse to the directory where the source is located, don't forget to check the Search subfolders checkbox.

    Let me know if this help to locate source file and whether you can set source line breakpoint or not.

    Regards,
    Patrick 

  • Hi Patrick,

       I have a test in the two case. 

    1. Why does the ccs local the source code form "../../../../../../examples/evmAM1808/gpio//gpioCardDetect.c".
    the dir is "c:\ti\am1808_starterware_1_00_03_03\build", there isn't gpioCardDetect.c".


    if i manually local the source code from "...AM1808_StarterWare_1_00_03_03\examples\evmAM1808\gpio\gpioCardDetect.c"
    the ccs prompt " no code associated with c:\ti\am1808_starterware_1_00_03_03\example\evmAM1808\gpio\gpioCardDetect.c"

    how do i to define the dir?

    2. Select the *.ccxml -> debug as-> debug configurations. In the source tab, add source code with subfolders. the launch the debug. the ccs can local the source code , but the breakpoint in c-code problem can't be avoid.

       Look forward to your better suggestions. Thanks a lot.

    Token.Jiang

  • Hi Token,

    I finally got hold on this board, I was able to import, build and debug with source breakpoint. However, I don't fully understand the target code, so I wasn't able to get the breakpoint to trigger, I am sure I missed some steps to get the breakpoint to tirgger on the target. But, the breakpoint is fully installed onto the target.

    You shouldn't need to manually open the source file if you have the project imported into your workspace. You can double clicks on the source file in the Project Explorer to open the file and then double clicks in the source file left margin to set a breakpoint. Make sure the target is suspended before setting the breakpoint, otherwise the breakpoint will not be install onto the target until it is suspended. There is option in the launch configuration to automatic halting the target whenever there is a debugger access request.

    Let me know whether importing the project and starting the debug session from the project works for you or not. Also, what CCS version are you using?

    Regards,
    Patrick 

  • Hi Patrick,

        the attached is the steps for my project creating, from 0 to 12.jpg.  I would like to ask,  in DEBUG process. Need to run CYGWIN?

     

    3858.Creator_to_build.rar

    Thanks.

    Token.Jiang

  • Can you attach the project, with source, image file, and ccxml file? I would like to debug the project without having to install additional compiler, this will help me to find out what when wrong without spending additional time to setup my environment.

    Thanks,
    Patrick 

  • Hi Patrick,

         The attached for you.

    3223.gpio.rar

    Thanks.

    Token.

  • My IDE version is CCS V5.1.0.09.

    Token

  • Hi Patrick.

       Forgot to add the source code (in AM1808_StarterWare_1_00_03_03) . now attached .

    7851.gpio_src.rar

    Thanks.

    Token.

  • Hi Token,

    Thanks for the project, I was able to reproduce this issue and filed a defect. Here is the tracking number SDSCM00044713.

    The reason is that the symbol contains an extract slash at the end of the directory, which causes our symbol look filed to resolve the path. On the other hand, when I import the example project (CCS Project), I was able to build and debug with breakpoint set.

    Regards,
    Patrick 

  • Hi Patrick,

        Thanks for your check.  Where can I get the latest news of this issue is resolved?

         Our project  have some usb devices. but the ccs project with TMS470 can't compile the usb program well.  so i only choose the gnu tool to compile our project.

         Because our project is more urgent . Do you have some solution to temporarily avoid the problem? 

     

        Thanks.

       Token

  • token said:

    Hi Patrick,

        Thanks for your check.  Where can I get the latest news of this issue is resolved?

    https://cqweb.ext.ti.com/cqweb/#/SDo-Web/SDOWP&format=HTML&loginId=readonly&password=&version=cqwj and enter the CQ number that I provided in the previous reply.

    token said:

         Because our project is more urgent . Do you have some solution to temporarily avoid the problem? 

     

    Source line breakpoint for the project that you are working on is not really possible, it needs to be fix in our code base. As for workaround,  if you can inject labels into your code where you want to set breakpoint, then you can set symbolic breakpoint from the Breakpoitns view (press the breakpoint icon and enter the symbol) or from the Modules view (right click on the symbol and select the breakpoint type).

    Regards,
    Patrick 

  • Hi token,

    We did not inject the extra "/" to the source file path.

    From the debug info (generated by GCC), the source file name has the relative path name ../../../../..//drivers/psc.c

        GCC Debug info from your object file.

        000005df   1 DW_TAG_compile_unit
        000005e0        DW_AT_producer  GNU C 4.6.3
        000005e4        DW_AT_language  DW_LANG_C89
        000005e5        DW_AT_name      ../../../../..//drivers/psc.c
        000005e9        DW_AT_comp_dir  c:\ti\AM1808_StarterWare_1_00_03_03\build\armv5\gcc\am1808\drivers

      I think that it has to do how the object file was built or possibly a bug in the tool chain.

    Could you check your make file or build script to see if you actually specify the source file as ../../../../..//drivers/psc.c ?

    Regards,

    Raymond