Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
9 replies Latest Post - ‏2013-08-23T08:29:13Z by richard.france
Lao Qiao
Lao Qiao
5 Posts
ACCEPTED ANSWER

Pinned topic I can't get RTRT run-time trace on coldfire+trace32 icd

‏2013-08-12T07:52:06Z |

Hi,

I configure a run-time trace project in RTRT,

the targe is freescale coldfire with trace32 icd debugger,

the result is xxxx.tdf:3:definition block not found (SF),

I assure that there are something right in the file, the content of xxx.tdf is:

TU "Clock Ticks"
TM 0
SF 1 0 0
TM 0
ME h91 1
......

But the simulator version TDP can gererate a .tdf file with SF line like SF 1 hb066e1c4 hf2b81454.

So I replace the blank SF line "SF 1 0 0" with "SF 1 hb066e1c4 hf2b81454", and I can see the UML sequence diagram.

Anyone can help cope with this problem?

 

  • richard.france
    richard.france
    814 Posts
    ACCEPTED ANSWER

    Re: I can't get RTRT run-time trace on coldfire+trace32 icd

    ‏2013-08-13T09:13:34Z  in response to Lao Qiao

    The numbers hb066e1c4 hf2b81454 comes from the source file itself.

    They look like 0x4C1E660B and 0x45418B2F in the _aug.c file

    if your compiler or target does not support global variable initialisation value at startup like

    int x=45;

    you have to unset the TDP >Library Settings > For runtime analysis features > Initialized global variable support and checks > RTRT_VARIABLE_INIT_SUPPORTED

  • Lao Qiao
    Lao Qiao
    5 Posts
    ACCEPTED ANSWER

    回复:I can't get RTRT run-time trace on coldfire+trace32 icd

    ‏2013-08-14T00:15:05Z  in response to Lao Qiao

    It's great! this problm solved.

    Richard, thank you very much.

     

    Richard, there is another problem: I can't get coverage information.

    When I do run-time trace, I can see the ICD debugger can stop to dump the buffer.

    But when I do code coverage, the debugger don't stop, so I can't get any coverage information.

    (the entire program is running, only one file is stubed, the others are excluded)

    I use the default settings for code coverage.

    I have no idea about this.

     

     

    Updated on 2013-08-14T08:11:07Z at 2013-08-14T08:11:07Z by Lao Qiao
    • richard.france
      richard.france
      814 Posts
      ACCEPTED ANSWER

      Re: 回复:I can't get RTRT run-time trace on coldfire+trace32 icd

      ‏2013-08-15T09:14:42Z  in response to Lao Qiao

      coverage results are generated at exit time or after each test (PTU.TEST)

      if you use coverage on an application that never exit

      either you insert a line

      #pragma attol insert ATCPQ_DUMP(2)

      see http://pic.dhe.ibm.com/infocenter/rtrthelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.rational.testrt.studio.doc%2Fref%2Frpragmas.htm

      in your code where you want to dump the coverage results, or

      into studio setting runtime analysis, you specify the method that will dump result when executed, or

      into studio settings you can specify coverage on the fly

      see http://pic.dhe.ibm.com/infocenter/rtrthelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.rational.testrt.studio.doc%2Ftopics%2Ftcovonthefly.htm

      • Lao Qiao
        Lao Qiao
        5 Posts
        ACCEPTED ANSWER

        Re: 回复:I can't get RTRT run-time trace on coldfire+trace32 icd

        ‏2013-08-16T08:18:30Z  in response to richard.france

        Richard, thank you.

        I use the first method, I add "#pragma attol insert _ATCPQ_DUMP(2)" into my source file, and I can get coverage result.

        About the second method, I specify coverage on the fly but fail to get the result.

         

        By the way,  I can run my application without any problem with only one file to instrument,

         when I add multiple files to instrument(for run-time trace),  the application can't run normally with trace32 debuger connected,

        and when I disconnect the debugger, it can run normally.

        I wonder if there is something special to set? or there is so much data that the debugger can't handle?

        Updated on 2013-08-16T08:43:09Z at 2013-08-16T08:43:09Z by Lao Qiao
        • richard.france
          richard.france
          814 Posts
          ACCEPTED ANSWER

          Re: 回复:I can't get RTRT run-time trace on coldfire+trace32 icd

          ‏2013-08-16T08:45:41Z  in response to Lao Qiao

          about the coverage on the fly:

          that should work: what did you put into the coverage on the fly settings? how many calls did you specify to start relative dump ?

          about runtime tracing:

          there is nothing to set. That should work

          You have to know that trace is more verbose and each time the result buffer is full the application is stopped to dump the result buffer. then application continue. so more source you have for trace more stop you have.

          in addition if your application is very realtime and you have few CPU time spare it could be an issue because trace is time consuming.

          what kind of issue are you facing ?

          there is also an other possibility to use trace packed in a roll over buffer then dumped on request but it require an additional bufer

          • Lao Qiao
            Lao Qiao
            5 Posts
            ACCEPTED ANSWER

            Re: 回复:I can't get RTRT run-time trace on coldfire+trace32 icd

            ‏2013-08-16T08:59:12Z  in response to richard.france

            I try to set "on the fly frequency dump" to 1 and 2, and the other settings left default,  it doesn't work.

            I want to use UML sequence to analyze the communication between different modules, so I need include multiple files.

             

            • richard.france
              richard.france
              814 Posts
              ACCEPTED ANSWER

              Re: 回复:I can't get RTRT run-time trace on coldfire+trace32 icd

              ‏2013-08-16T09:25:51Z  in response to Lao Qiao

              a correct value for the on the fly coverage dump is about 20 to 100 or 1000 in accordance with your application number of methods.

              what happend when you instrument all sources with trace ?

              • Lao Qiao
                Lao Qiao
                5 Posts
                ACCEPTED ANSWER

                Re: 回复:I can't get RTRT run-time trace on coldfire+trace32 icd

                ‏2013-08-23T04:07:31Z  in response to richard.france

                Hi richard,

                I tried 20, 100, and 600 for the on the fly coverage dump, but failed to get coverage result.

                When I instrument all sources I found that the program can't run, I assured that because the program can't run within a limited time period and the stack was overflow.

                 

                Updated on 2013-08-23T04:07:49Z at 2013-08-23T04:07:49Z by Lao Qiao
                • richard.france
                  richard.france
                  814 Posts
                  ACCEPTED ANSWER

                  Re: 回复:I can't get RTRT run-time trace on coldfire+trace32 icd

                  ‏2013-08-23T08:29:13Z  in response to Lao Qiao

                  Code coverage does not store any data into the stack.

                  only call to our runtime may add few return adresses.

                  I think you should debug to understand what happend.