[SOLVED] RTT only works in when debugging

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

  • [SOLVED] RTT only works in when debugging

    Hi

    I am only able to get RTT working while in debugging code. I am using iar compiler and cortez M3.
    As soon as I exit debugging mode the RTT viewer stops getting data, but my application still works so is not stopped.

    What am I missing.
  • Hi,

    my guess that you are using the "connect to existing Session" feature of the RTT viewer. Is this correct?
    Therefore, if the debug session ends, IAR EWARM closes the connection to the J-Link, which also terminates the session for the J-Link RTT Viewer.

    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.
  • Unfortunately that is not the problem. It works if using "connect to existing session" and of cause that would break if close my debugging session.
    But if I try with ex. USB and choose cortex-M3 I do not not receive anything when not in debugging session. I can see that the it is logged on and seems to have found the RAM section. I have tried with interface SWD and JTAG at different speeds
  • Hi,

    could you please provide us with more information about your setup?
    Which OS do you use? (I assume windows as to my knowledge, IAR EW is not available for Linux / macOS)
    Which target device (not core) do you use?

    Could you provide a with a J-Link log file of both a working session (IAR + + RTT Viewer) and a non working session?
    Log output can be enabled like as follows:
    • Open a connection to J-Link, e.g start J-Link Commander
    • In J-Link Control Panel: (Click the J-Link symbol located in the notification / tray area in order to open J-Link Control panel)
    • Open the tab "Settings"
    • Next to the field "Log file" check "Override" and click "..." in order to choose a log file path.

    This is also described in UM8001 Chapter 5 "Working with J-Link and J-Trace", Section 5.7 "J-Link control panel" .

    Which J-Link model do you use?

    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.
  • It helped by using the correct processor instead of generic core.

    But I then have two new issue:

    1.
    newline and cariage return \n\r does not seems to have effect in my strings, ex:
    SEGGER_RTT_WriteString(0, "Calc metering\n\r")


    2.
    After a reset of target the viewer does not automatically connect to the target. How to do that?
  • Hi,

    the reason for why you have to specify the correct processor is the localization of the RTT block. Because every device has its RAM at a different location, the generic core can only be used in combination with either a fixed RTT block address or a RTT search range.

    To 1:
    I cannot reproduce that here, \n\r works as it should in the RTT Viewer. Are you using the latest version of the J-Link software?

    To 2:
    An automatic reconnect is not possible. You'll have to reconnect manually (F3/F2).

    Regards
    Arne
    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.