[SOLVED] Trace with J-Link using target internal RTT buffer

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

  • [SOLVED] Trace with J-Link using target internal RTT buffer

    Hello, the page for J-trace says the below about Trace Buffer-
    "
    Trace Buffer
    If the target device includes an Embedded Trace Buffer (ETB) or similar, trace can be done with a J-Link. The trace data is then written by the target into the internal trace buffer of usually about a few kilobytes and read by J-Link when the target is halted. With a trace buffer the last few thousand executed instructions can be available, which does not provide full insight, but can be useful to recall the execution flow before a fault or issue occurs.

    "
    segger.com/products/developmen…echnology/trace-features/

    Can the RTT buffer be used for tracing with Segger J-Link Base? If so, can you please share more infromation on this?
    Thank you.
    Kind regards
  • Hi skam,
    ETB is a hardware feature. The respective trace buffer is a buffer that is written by HW only. It is also a dedicated buffer and you cannot use another buffer, e.g. a RAM area, such as the RTT buffer. RTT is a software feature. You can do some software tracing, but not on instruction level. Systemview makes sophisticated use of that feature.
    General information on tracing, including descriptions of multiple trace types, can be found here: wiki.segger.com/J-Trace#General_information_about_tracing
    J-Link supports ETB, a J-Trace is not required. It is our experience, that ETB is beneficial only in a very limited range of use cases, so we recommend using more powerful instruction trace mechanisms. For those a J-Trace is required.
    Best regards
    -- AlexD
    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.
  • Hi Alex,
    thanks for your response. The link provided is quite helpful.
    To be honest, I still don't know if I have the right requirement for tracing and can't really figure out its usecase. I think I need to inform myself what tracing is and if I can utilize its potential.

    Coming to ETB, I am afraid my chip doesn't support ETB. (pls see attachment).
    In this case I guess I need to rely only on software tracing.
    One of the child links from your link talks about trace with RAM functions. Perhaps this what you are refrerring to when you meant software tracing?
    wiki.segger.com/Ozone_Debug_and_Trace_with_RAM_Functions

    Kind regards
    Images
    • CortexM4_ETB.png

      68.43 kB, 973×457, viewed 440 times
  • Hi skam,


    for an overview on the different trace types, please also have a look at this WIKI page: wiki.segger.com/General_information_about_tracing



    In case your chip does not support ETB, this feature is not available to you. Which device are you working on? It is quite likely that ETM is supported by your device, this would allow you to make use of pin tracing, but also requires you to utilize a J-Trace probe.

    Best regards
    -- AlexD
    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.