[SOLVED] JLinkRTTLogger write terminal numbers instead of control characters

  • [SOLVED] JLinkRTTLogger write terminal numbers instead of control characters

    When I use the JLinkRTTLogger to create a log file automatically, all the lines come out like:
    ÿ0RESETRES=0. PSELRESET[0]/[1]= 0xffffffff/0xffffffff, Reset Reason: Power-On Reset.
    ÿ0ÿ0WDT NOT started. CRV= 0xffffffff
    ÿ0ÿ6testcode_v_0.5.8 main.c. compiled @ Mar 29 2017 07:27:02

    ÿ0ÿ6nRF52 Device ID(LE Order): 0x7DBF4B935D203850
    ÿ0ÿ6nRF52 Device address(LE Order): 0xE25AC01962C1

    Those control characters at the beginning would look like the following in the RTTViewer windows app:
    0> RESETRES=0. PSELRESET[0]/[1]= 0xffffffff/0xffffffff, Reset Reason: Power-On Reset.
    0> WDT NOT started. CRV= 0xffffffff
    6> testcode_v_0.5.8 main.c. compiled @ Mar 29 2017 07:27:02

    0> nRF52 Device ID(LE Order): 0x7DBF4B935D203850
    0> nRF52 Device address(LE Order): 0xE25AC01962C1

    Is there a way to have the logger write out the terminal window properly instead of the control sequence? If I use the RTTView on Windows and then use "Start Terminal Logging", it is saved the proper way.

    This is using JLinkeRTTLogger on Mac. I haven't tried on Windows yet, but if it behaves differently there, I could use that.


    Thanks!

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

  • Hi,


    just the make sure that I understand you correctly:
    RTTLogger @ Windows: CLI output O.K. ; Logfile O.K.
    RTTLogger @ macOS: CLI output O.K. ; Logfile _not_ O.K.

    The complete message
    0> RESETRES=0. PSELRESET[0]/[1]= 0xffffffff/0xffffffff, Reset Reason: Power-On Reset.
    0> WDT NOT started. CRV= 0xffffffff
    6> testcode_v_0.5.8 main.c. compiled @ Mar 29 2017 07:27:02

    is generated by your target application and send via RTT.
    Is this correct?

    Which version of the J-Link software do you use?
    Could you please give the most recent version of the J-Link software & documentation pack a try?


    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.
  • Sorry for the confusion...

    (Bad case) The jlinkrttlogger CLI in both Windows and Mac generates files that have the weird characters at the beginning of each line instead of what I'd expect (ex. 3> )

    (Good case) If I use JLinkRTTViewer and then use the Logging -> Start Terminal Logging menu option and write the output to a file, I get terminal numbers in the file.

    Yes, the message below is generated by our firmware and sent via RTT.

    This is with JLink 6.14c, which is the latest as far as I can tell.

    Hope that helps.
  • Hi,

    the J-Link RTT Logger logs the raw binary output on the selected RTT channel. It does not support virtual terminals as the
    J-Link RTT Viewer does, so any ANSI escape codes (the weird characters) are directly written into the output file.

    If you want to use the J-Link RTT Logger, just write to the RTT channel what you want to have in the logfile in plain text
    or replace the ANSI escape codes by yourself afterwards.

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