[ABANDONED] Trace count doesn't display in Ozone "Download & Reset Program" mode, but does when in "Attach to Running Program" or "Attach & Halt Program" modes

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Trace count doesn't display in Ozone "Download & Reset Program" mode, but does when in "Attach to Running Program" or "Attach & Halt Program" modes

    I have a J-Trace Pro Cortex-M set up and running with Ozone V3.30b, J-Link drivers V7.92.

    I've been using it for more than a year to debug an Arm Cortex M3 on a Smartfusion2 device and it has been very reliable.

    I use the ETM trace function with 4b trace output at 36 MHz (same as CPU), no timestamps, 50M max instruction count and default trace timing. The J-Link debug is set to 25 MHz.

    When I use "Download and Reset Program" to start my debug session, the trace count does not increment other than if I hit a breakpoint. It counts on the breakpoint but not on surrounding instructions that would also have been hit. However, if I first "Download and reset" the program, then "Stop debug session", followed by "Attach and Halt program", then "Reset to Main" to play from the beginning, then the count works correctly and records every single instruction hit.

    The attached table shows the output from a similar stage in the debug run for each different mode I use.

    I thought this might be a bug in Ozone so I reported it to Segger support, however I was told it is most likely a configuration issue on my side and that Ozone is behaving as expected.

    My J-Trace is two years old and therefore out of the support period, so I am wondering if anyone else has seen this issue and can offer advice how to fix it please?

    I would like to see Trace output in "Download & Reset Program" mode, in the same was as I do in the other two modes.

    Thanks,
    Huw
    Images
    • JTraceOutput.png

      61.88 kB, 763×571, viewed 336 times
  • Hello Huw,

    Thank you for your inquiry.
    Where exactly are you executing the board/chip specific trace pin init? In a JLinkScript or via the target application itself?
    It sounds like the trace init can't be completed by the J-Trace Pro after reset but instead requires some code parts from your target application to run until it is available.
    Why a JLinkScript should be used and how is explained here:
    wiki.segger.com/J-Trace#Trace_pin_initialization

    Could you check if this could be the case with your setup?
    If not could you provide a J-Link Log of the failing session?
    wiki.segger.com/Enable_J-Link_log_file#Ozone


    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Nino,

    Thank you for your response and sincere apologies for my delay in responding.

    I saw your recommendation but I have not yet had the opportunity to dig deeper into JLinkScripting or establish whether that is my issue.

    I wanted to thank you for your attention and assure you that I have not forgotten this, I'm just too busy currently with my employer as we are in the midst of shipping several new products simultaneously.

    As soon as I have time again for debugging I will investigate your suggestions and post my results here.

    Kind regards,
    Huw
  • Hello Huw,

    No problem. Let me know once you have news.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.