[SOLVED] j-trace with stm32h7

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

  • [SOLVED] j-trace with stm32h7

    Hello,

    I use j-trace with stm32h743 and IAR.
    1. On testing the trace with SEGGER cortex-m reference board (stm32h7407, which comes with the j-trace product) and IAR, the functionality works great.
    2. I then moved to stm32h743 eval board. Using CN8 (ETM Trace connector) , I get no complaints from IAR on triggering ETM in the "ETM function trace" window , yet the windows is always empty, and also "ETM trace settings", window is disabled except for "trace buffer size". In the functional reference board, this window is not disabled. I expected it to work without issues, because after reset and jumping to main the trace pins should be configured by default to " trace" functionality. But even after trying to configure pins(PE2-PE5 according to schematics of stm32h743I MB1246B) in main() start after HAL_init pins , the results are still the same (pinmux configarion here : pastebin.pl/view/ffea4eaa )
    3. The last thing I've tried is using segger's ozone application , as this is the application that is provided in segger's tutorial for j-trace. Yet, the "instruction trace" window in that application is empty with stm32h743 eval board.

    Can anyone please help with it ?

    Thanks,
    Ran
  • Hi Ran,
    Thank you for your inquiry.

    Please find instructions about tracing on the STM32H743 with Ozone here:
    wiki.segger.com/STM32H7#Tracing_on_ST_STM32H743

    In general, we have a list of tested devices, and each comes with a sample for Ozone:
    segger.com/products/debug-prob…echnology/tested-devices/


    For tracing with IAR, please contact the IAR support, since they use their own trace configuration which we have no impact on.


    Best regards,
    Fabian
    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.
  • Thank you,
    It did help to get progressed.
    Yet, I noticed that I must use the pex file. But how was it created ? If I need to build it on my own, how can I do that ? Where is the text file javascriptfile ?


    It seems that with I-jest it works( while with j-link it doesn't !)
    j-link prints on start debug:
    pastebin.com/4xcGWKLx
    I-jet prints on start debug:
    pastebin.com/SjY7i2mh
    Any idea why these debuggers behave different ?
    Thanks

    Thank you,
    Ran

    The post was edited 2 times, last by ranran ().

  • Hi Ran,
    We have no insight about what I-Jet does to enable trace on a Target.

    Not all parts of a trace initialization are generic. We implemented trace support so that the J-Link is adaptable to device specifics that often are variable.
    One example for that is the pin initialization (for streaming trace). Many devices have multiple options for which pins can be used for tracing.
    The J-Link has no way to know which Pins the user wants to use for tracing in such a situation.
    Therefore the target specifics are supposed to be implemented by the user via a J-Link script file (not a JavaScript file).

    We offer script files for multiple devices, compiled as .pex files, here: segger.com/products/debug-prob…echnology/tested-devices/
    The .pex format is just a compiled form of the .JLinkScript file (as it is stated in the article linked above).
    As long as you use the same pins for tracing as the evaluation board form the article, you can use the same pex file from the article for you project.
    For more information about J-Link script files, please refer to the J-Link User Manual (UM08001).

    Do you use different pins for tracing then the evaluation board from the article?

    Best regards,
    Fabian
    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 Fabian,

    Thank you, I have only now noticed the answer.
    Yes, we use exactly the same pins in our custom board.
    But as I mentioned the problem happens already with stm32h743-eval board !
    I also noticed that you use ETB according to wiki, while I-Jet seems to use ETM pins.
    It is importnat to note that the SDK is IAR.

    So, I guess J-link does not support ETM with stm32h7 ?

    Thank you,
    Ran

    The post was edited 1 time, last by ranran ().

  • Hi Ran,
    Sorry, i just realized I posted the wrong link. I edited it in my last post so it is correct now.

    To answer your question:
    J-Link does not support streaming trace (ETM) in general. J-Trace does.
    Therefore you will have to use the J-Trace for streaming trace.

    If you look at this wiki page, you can see, that we have projects/script files for both, buffer tracing(TMC/ETB) and streaming trace (ETM):
    TMC/ETB: wiki.segger.com/STM32H7#Streaming_trace
    ETM: wiki.segger.com/STM32H7#Trace_buffer_(TMC/ETB)

    Both projects were tested and work out-of-the-box.

    Could you please provide us with the serial number of the probe you want to trace with?

    Best regards,
    Fabian
    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.