[SOLVED] Help! How can I use SEGGER_RTT_printf() to log data into the JLinkRTTLogger or the JLinkRTTViewer

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

  • [SOLVED] Help! How can I use SEGGER_RTT_printf() to log data into the JLinkRTTLogger or the JLinkRTTViewer

    Hi,

    I have had a heck of time trying to log into the JLinkRTTLogger or the JLInkRTTViewer when I issue the SEGGER_RTT_printf(1, "Hello world!\n") call! I am not see anything logged by the JLinkRTTLogger or JLinkRTTViewer!


    I found out that RTTViewer is slow! It misses logging data when I do SEGGER_RTT_printf(1, "Hello world!\n") a zillion times!

    So, I tried RTTLogger below, but cannot get it to log!! COME ON, SEGGER SUPPORT TEAM! Please note that I blank out the SN for privacy!

    C:\Users\dev\logs>JLinkRTTLogger -Device STM32F407VG -If SWD -Speed 12000 -SelectEmuBySN XXXXXXXX -RTTChannel 1 log.txt
    SEGGER J-Link RTT Logger
    Compiled Sep 6 2019 17:58:48
    (c) 2016-2017 SEGGER Microcontroller GmbH, segger.com
    Solutions for real time microcontroller applications

    ------------------------------------------------------------


    ------------------------------------------------------------
    Connected to:
    SEGGER J-Link ARM
    S/N: 50111528

    Searching for RTT Control Block...OK. 2 up-channels found.
    RTT Channel description:
    Index: 1
    Name:
    Size: 0 bytes.

    Output file: log.txt

    Getting RTT data from target. Press any key to quit.
    ------------------------------------------------------------

    Transfer rate: 0 KByte/s Bytes written: 0 Byte
    Shutting down...

    The post was edited 3 times, last by unebonnevie ().

  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Which J-Link software version are you using?
    Do you have any tool additionally open to RTTViewer or RTTLogger that might receive RTT data? Keep in mind that RTT data can be read only once. If you use multiple tools that try to capture RTT data only one tool will receive it.

    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.
  • Hi,

    >Which J-Link software version are you using?

    I am using JLINK 6.50b on WINDOWS>

    >Do you have any tool additionally open to RTTViewer or RTTLogger that might receive RTT data? Keep in mind that RTT data can be read only once. If you use multiple tools that try to capture RTT data only one tool will receive it.

    I have JLink.exe (JLinkExe) runs in one console. In another console I run JLinkRTTClient for stdout and stdin, which I prompt the user for input at times, on channel 0. In the 3rd console I run JLinkRTTLogger with channel 1.

    Btw, I don't have to use SEGGER_RTT_printf(..), even SEGGER_RTT_write()/SEGGER_RTT_writestring() is fine.

    SEGGER/JLink support team, please advise. Would greatly appreciate a response.

    (When I tried RTTViewer instead of RTTLogger, I open two tabs of terminals, terminal 0 (for stdout and stdin) and terminal 1 for channel 1 output using SEGGER_RTT_WriteTerminalOut() API call. I noticed that with terminal 0, I cannot do input. With terminal 1, it cannot catch up with data output. So, I scraped the idea of using RTTViewer and just want to use RTTLogger, which I actually prefer.)

    Thanks!

    The post was edited 3 times, last by unebonnevie ().

  • Hello,

    Please not that this is *no* support forum! Also the J-Link that you are using is out of support period for over a year. So please understand that we can't offer prioritized assistance in such a case...

    The dropping of data over Channel 1 with RTTViewer was reproducible. We will investigate this further.
    As for the RTTLogger, here everything seems to work as expected so not sure what we should advise you on.

    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 the response!

    >Please not that this is *no* support forum! Also the J-Link that you are using is out of support period for over a year. So please understand that we can't offer prioritized assistance in such a case...

    Wow! I didn't know that! What are my alternatives to get support?

    >The dropping of data over Channel 1 with RTTViewer was reproducible. We will investigate this further.

    Good to know that the problem is reproducible on your end.

    >As for the RTTLogger, here everything seems to work as expected so not sure what we should advise you on.

    Would you please detail the steps how to make RTTLogger work on your end. It does not for me, regardless of the SEGGER_RTT_printf(1, ...) calls I do with channel 1 supplied. Please share with me your JLinkRTTLogger command line that you use!

    Thank you!
  • Hello,


    unebonnevie wrote:

    Wow! I didn't know that! What are my alternatives to get support?
    You could get a new probe so the support period gets reset. For that we offer a trade in program:
    segger.com/purchase/trade-in-program/


    unebonnevie wrote:

    Would you please detail the steps how to make RTTLogger work on your end. It does not for me, regardless of the SEGGER_RTT_printf(1, ...) calls I do with channel 1 supplied. Please share with me your JLinkRTTLogger command line that you use!
    Attached is the CL that worked for me. The only difference I see is the log file path. Make sure you have write rights at the location where JLinkRTTLogger is installed to or set the path to such a location.

    Best regards,
    Nino
    Images
    • Capture.PNG

      13.96 kB, 648×381, viewed 542 times
    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.