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.

Filename and function name are not exact in trace with Trace Analyzer XDS560V2

Other Parts Discussed in Thread: HALCOGEN

Hello,
 When I use the XDS560V2 Trace Analyzer the Filename column and Function name column are not always exact.
 In the following trace the 2 last columns say what should be written in the two first columns.
 What can be wrong in the use of XDS560V2 Trace Analyzer?
 Thanks for your help
 Jerome

Program Address:uinteger:hex                       Disassembly:string                                                                          Correct File         Correct Function
\HL_sys_startup.c                        _c_int00()        0x181DF0   CPSIE           f,                                                        \main_.asm        assmainTasks
\HL_sys_intvecs.asm                     adcInit()         0x1C           LDR             PC, 0xFFFFFE74                               Fetch FIQ vector     
\subroutines_interrupts.asm      saveAllReg()      0x60BC      STMFD           R13!, {R0, R1, R2, R3, R12, R14}   \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60C0      VMRS            R12, FPEXC                                     \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60C4      STMFD           R13!, {R12}                                      \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60C8      VMRS            R12, FPSCR                                     \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60CC      STMFD           R13!, {R12}                                      \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60D0      VSTMDB          R13!, {D0-D7}                                 \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60D4      SUB             R13, R13, #8                                       \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60D8      BL              0x5F14                                                  \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x5F14      STMFD           R13!, {R4, R5, R6, R7, R8, R9, R10, R11}  \subroutines_interrupts.asm      saveAllReg()
\subroutines_interrupts.asm      saveAllReg()      0x5F18       BX              R14                                                      \subroutines_interrupts.asm      saveAllReg()
\subroutines_interrupts.asm      saveAllReg()      0x60DC      LDR             R8, 0x6230                                         \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60E0      LDR             R8, [R8]                                               \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60E4      SUB             R8, R8, #1                                           \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60E8      STR             R8, [R13]                                             \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60EC      LDR             R8, [R13]                                             \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60F0      CMP             R8, #32                                                \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x60F4      BCS             0x611C                                                 \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x611C      LDR             R8, [R13]                                              \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6120      CMP             R8, #64                                                \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6124      BCS             0x6154                                                 \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6128      LDR             R8, [R13]                                              \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x612C      LDR             R10, 0x623C                                        \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6130      MOV             R9, #1                                                  \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6134      SUB             R8, R8, #32                                          \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6138      MOV             R8, R9, LSL R8                                   \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x613C      STR             R8, [R10]                                             \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6140      LDR             R8, [R13]                                              \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6144      LDR             R0, 0x6238                                          \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6148      SUB             R1, R8, #32                                         \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x614C      BL              0x55D0                                                 \HL_esm.c      esmHighInterrupt()
\HL_notification.c      esmGroup2Notification      0x55D0      SUB             R13, R13, #8                                       \HL_notification.c      esmGroup2Notification
\HL_notification.c      esmGroup2Notification      0x55D4      STR             R1, [R13, #4]                                       \HL_notification.c      esmGroup2Notification
\HL_notification.c      esmGroup2Notification      0x55D8      STR             R0, [R13]                                             \HL_notification.c      esmGroup2Notification
\HL_notification.c      esmGroup2Notification      0x55DC      ADD             R13, R13, #8                                      \HL_notification.c      esmGroup2Notification
\HL_notification.c      esmGroup2Notification      0x55E0      BX              R14                                                       \HL_notification.c      esmGroup2Notification
\subroutines_interrupts.asm      saveAllReg()      0x6150      B               0x620C                                                   \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x620C      BL              0x5F1C                                                 \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x5F1C      LDMFD           R13!, {R4, R5, R6, R7, R8, R9, R10, R11}  \subroutines_interrupts.asm      restrAllReg()
\subroutines_interrupts.asm      saveAllReg()      0x5F20      BX              R14                                                       \subroutines_interrupts.asm      restrAllReg()
\subroutines_interrupts.asm      saveAllReg()      0x6210      ADD             R13, R13, #8                                       \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6214      VMOV            R0, R13, D0                                      \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6218      LDMFD           R13!, {R12}                                      \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x621C      VMSR            FPSCR, R12                                    \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6220      LDMFD           R13!, {R12}                                      \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6224      VMSR            FPEXC, R12                                     \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x6228      LDMFD           R13!, {R0, R1, R2, R3, R12, R14}   \HL_esm.c      esmHighInterrupt()
\subroutines_interrupts.asm      saveAllReg()      0x622C      SUBS            PC, R14, #4                                      \HL_esm.c      esmHighInterrupt()
HL_sys_startup.c                   _c_int00()              0x181DF4  CPSIE          i,                                                         \main_.asm      assmainTasks

  • Jerome,

    What exactly are you expecting from the Trace output? Unfortunately the text columns you sent became a bit skewed and it is difficult to pinpoint what data belongs to what column. 

    I was unable to find any problems on my CCSv6.1.0.00104 on my AM437xIDK connected using my XDS100v2. Trace Data was gathered via the ETB.

    I also tested my XDS560v2 on an AM335x board (also using the ETB) without a problem.

    Regards,

    Rafael

  • Rafael,
    Thanks for your help.
    When you said “using the ETB” do you mean you have configured “ETB” in the Function Profiling: Transport Type?
    I work with the emulator XDS100v2 USB Debug Probe on cortexR4 and with XDS560v2 on a TMDXRM57LHDK Dev Board. If I select ETB in Transport Type of function profiling I get the following Error:
    Could not run analyser on CortexR4. Cause:
    Read device ID did not match with the device description available.
    Possible reasons:
    (1) Target is not connected
    (2)Trace support for the device is not available in the version of the software.

    So I select “Pro Trace” in the Transport Type field with XDS560v2 on a TMDXRM57LHDK Dev Board . And It seems to work that way.

    I never use the trace tools with the XDS100v2 USB Debug Probe on RM48 USB Stick Development Kit (Cortex-R4) Is that possible?

    Thanks a lot for your help
    Kind Regards
    Jerome
  • Rafael,
    I just expect to see the right name of function in front of the cpu code.
    The application uses C language with HALCOGEN for initialization part and after all is made in assembly language. The trace output is correct for all c functions but gives always the same name of function in the assembly code part.
    The main program in c is:
    gioInit();
    hetInit();
    adcInit();
    rtiInit(); rtiStartCounter(rtiREG1,0);
    rtiEnableNotification(rtiREG1,rtiNOTIFICATION_COMPARE0); rtiEnableNotification(rtiREG1,rtiNOTIFICATION_COMPARE1);
    rtiEnableNotification(rtiREG1,rtiNOTIFICATION_COMPARE2);
    rtiEnableNotification(rtiREG1,rtiNOTIFICATION_COMPARE3);
    assmainTasks(); /* Call the assembly language main programm */
    I tried to declare the assembly functions in main.c file but the problem is still there.
    I tried to use .asmfunc and .endasmfunc directives but the problem is also still there.
    Thanks for your help
    Kind Regards
    Jerome
  • Jerome,

    Sorry for the delay; I was out of my office most of last week.

    Unfortunately I am unsure how the Trace tool deals with assembly code (mostly because I do not have any assembly examples).

    Would it be possible to share the code you are trying to use? I have the same board as you.

    Regards,
    Rafael
  • Hello Rafael,
    No problem for the delay, thanks for your help.
    I will prepare simple assembly code to make the problem obvious.
    I think the easiest way is to send you a zip file with HCG project and CCS project.
    How can I send you this file?
    Kind Regards
    Jerome
  • Jerome,

    You can attach it to the forum thread. For the forum to allow attaching files, images, etc., simply select the option "Use rich formatting" at the bottom right of the text box.

    Cheers,

    Rafael

  • Hello Rafael,
    Thanks for that precision.
    During the code simplification the trace became OK and the problem disappeared.
    So I will take time to go step by step to see where the problem occurs.
    Then I will send you the project files.
    Regards
    Jerome

  • Rafael, I found the cause of the trace problem.

    1. Context of project:
      All initialization parts are made in C language with HCG
      After initialization all the project is made in assembly language.
      rtiCompare0Interrupt, rtiCompare1Interrupt, rtiCompare2Interrupt, rtiCompare3Interrupt, are rewritten in assembly language and suppressed from HL_rti.c.
      The rtiCompare0Interrupt needs to conserve the value of R8 and R9 banked register between interrupts.
      The esmHighInterrupt in HL_esm.c created by HCG use R8 and R9 banked registers without to save them.
      So I wanted to modify the code of esmHighInterrupt function in order to save R8 and R9 banked registers.

    2. A code modification affects the column “functions” of the Trace.
      I created two assembly functions to save and recall registers:

    I call the restrAllReg at the end of esmHighInterrupt function:

    At the beginning of esmHighInterrupt functionI got a difficulty because the user code is after the line : uint32 vec = esmREG->IOFFHR - 1U;

    So I moved it before that line:

    I have to replace the code at that place each time that the code is generated by HCG.

    3) The result is an alteration in the column “functions” of the Trace.

    At the beginning of the trace the column “functions” is OK.
    Then an ESM interrupt occurs.
    After that the column “functions” is still OK.
    Then an rtiCompare0Interrupt interrupt occurs.
    Then the column “function” contains always the same information : rtiCompare0Interrupt.

    Rafael, I made a request to friend with you in order to send you the two project files in a private way.

    One project with the trace OK

    One project with the trace NOK

    Kind Regards

    Jerome