[SOLVED] J-Link Debugger: Save Terminal Text

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

  • [SOLVED] J-Link Debugger: Save Terminal Text

    Hi all,

    I'm evaluating J-Link Debugger to see if it is suitable for some automated tests. Is there a way to save the content of the terminal window to a file from a script? Something like Window.Save("Terminal", "result.log")?

    Are there some more example scripts in addition to the manual? Could be inspiring.

    Thomas
  • Hi Skoe,
    Is there a way to save the content of the terminal window to a file from a script? Something like Window.Save("Terminal", "result.log")

    Currently, there is no save function for the terminal output, but will be added in the near future.
    Are there some more example scripts in addition to the manual?

    No, but every function is described in the manual. In addition to that, every action which is performed by using the GUI is logged in the terminal with the corresponding script command.

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

    I have some more issues and questions regarding the debugger. Hope this is the right place to ask.

    Following functions don't work here (1.78). The second one was shown in the Console window when I added it to the watch list manually.

    Source Code

    1. Watch.Set(gMainReturnValue);
    2. Watch.Set("gMainReturnValue");
    3. Break.SetOnSymbol(gMainReturnValue, AT_WRITE_ONLY, AW_WORD, 0x0, 0xFFFFFFFF);
    4. Break.SetOnSymbol("gMainReturnValue", AT_WRITE_ONLY, AW_WORD, 0x0, 0xFFFFFFFF);


    They cause error messages like this:

    Source Code

    1. Syntax error at line 10: Watch.Set...
    2. Unknown identifier at line 10: Break.SetOnSymbol...


    gMainReturnValue is actually listed in the Globals window.

    Another question, is it possible to
    - evaluate program variables in scripts
    - set the return value of the debugger, so it can be seen in the calling Makefile
    it could look like this (sorry for the weird invented function names :)

    Source Code

    1. if (Util.EvalU32(gMainReturnValue) != 0) {
    2. Util.Log("Test failed.");
    3. File.Exit(1);
    4. }
    5. else {
    6. Util.Log("Test passed.");
    7. File.Exit(0);
    8. }


    Is what I try too far from the intended use of J-Link Debugger? If you are planning to add features like this (in case they aren't there yet), what is an *approximate* realistic time frame? I like the clean, quick user interface of this debugger, that's why I would like to use it in our project.

    Thank you for your help!

    Regards,
    Thomas

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

  • Hi Thomas,

    The issues regarding Watch.Set and Break.SetOnSymbol have been fixed in V1.79 of J-Link Debugger.


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