[SOLVED] Questions about jtrace and ozone

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

  • [SOLVED] Questions about jtrace and ozone

    Hello everyone,

    Currently, I'm using JTrace and Ozone for my project to measure execution time automation base on jlinkscript, I have some question relate to it, please help

    1. How can I start or stop tracing application in C code?

    2. How to measure execution time of functions and sub-functions in application (bare metal application)?
    For Ex : I have a function like this,

    C Source Code

    1. void FunctionC()
    2. {
    3. ..........
    4. }
    5. void FunctionB()
    6. {
    7. FunctionC();
    8. }
    9. void FunctionA()
    10. {
    11. FunctionB();
    12. }
    13. int main (void)
    14. {
    15. FunctionA();
    16. return 0;
    17. }
    Display All

    I can export log of execution time for functions A, B, C. But how can I create a log with call graph in jlinkscrip? like below
    ----FunctionA 10ns
    -------- FunctionB 5ns
    ------------FunctionC 2ns

    3. How can I open full call graph of functions?

    Thank you,
    Tuan

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

  • Hello Tuan,

    Thank you for your inquiry.
    Could you provide your S/N of the J-Trace for reference?

    Regarding 1: You don't. Why would you need to do that? Is something not working?

    2: If available with timestamps. Which target device are you tracing exactly?


    tuandt2 wrote:

    I can export log of execution time for functions A, B, C. But how can I create a log with call graph in jlinkscrip? like below
    JLinkScript would be the wrong place as the high level analysis is done in Ozone. What is your use case here?

    3: Not sure what you mean. But we have the timeline window which will show you the complete recorded call stack over time.

    To get used to J-Trace and Ozone we recommend our trace tutorial so you can try out all features in a already working and set up environment:
    segger.com/products/developmen…ogy/ozone-trace-tutorial/

    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,

    Thank you for your feedback, I found the solution for our project with items in previous post.

    And btw, I have another question about ozone, please give me a idea. I'm trying to debug a i.MX8QM chip and I saw in setup of Ozone v3.28 supported for IMX8QM, so I did some setup based on setup wizard such as Device, Core, Elf file. After finishing configuration, I select "Download and reset Program" but only debug symbol in elf file is loaded to Ozone, and binary code didn't program to memory of chip. And I added a function to load binary file in TargetDownload handler.

    C Source Code

    1. void TargetDownload (void) {
    2. // Clear memory that contain the binary
    3. Target.FillMemory(0x88000000, 1048576, 0);
    4. // Load bin file to memory at address 0x88000000 (0x88000000 is run address and get from map file)
    5. Target.LoadMemory("D:/CORE0.elf.bin", 0x88000000);
    6. }
    So, select the elf file at configuration time doesn't include program the memory, doesn't it? But, it quite strange, I used the example board in Jtrace package, with the same step to setup, when I click "Download and reset Program", it downloaded the binary file to memory . Please give me a explain about this, I read the document but haven't found the solution yet.

    Thank you
  • Hello,

    This is a new question that is unrelated to the posts topic.
    Please open a new thread for a new question.

    This thread will be closed now.

    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.