[SOLVED] Using RTT logging without GDB debugging

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

  • [SOLVED] Using RTT logging without GDB debugging

    Hi there,

    I'd like to automate the running of some test code on my boards. The aim is to have a makefile target, "make test" which:

    * Compiles my firmware with a -D flag set for test
    * Flashes the code to my board
    * Starts JLinkRTTClient
    * Runs my code, so that I can watch the log output on the terminal

    I notice that JLinkRTTClient looks to connect to localhost:19021 and that there's a server there listening if I also start JLinkGDBServer. I'd like to keep it simple, however, and not start the GDB server if I can avoid it. Same goes for the GDB client. I don't want to have to interact with the GDB client in order to start the test output.

    Is there a way to start *just* the RTT server and RTT client and have the code execute immediately? I've checked the command line options in the PDF doc, but haven't found anything to control this.

    Thanks.
  • As it happens, v5.12f was released just today and now includes the JLinkRTTLogger executable for Mac. So I can now run that instead of JLinkRTTClient, but I still have questions about getting this working.

    1. Does JLinkRTTLogger still require JLinkGDBServer to be running?

    2. What are the command line options? If I pass these in, they seem to be ignored:

    /Applications/SEGGER/JLink/JLinkRTTLogger -device nrf51822 -if swd -speed 1000

    /Applications/SEGGER/JLink/JLinkRTTLogger --help

    3. Can I get the output to go to stdout rather than a file?

    At the moment, all I can get the logger to do is produce an empty log file.


    Thanks.
  • Hi,

    JLinkRTTLogger does not require any other J-Link software to be running.

    Currently RTT Logger does not support configuration via command line options.

    The purpose of RTT Logger is to write the output into a file, therefore it is not possible to send it to stdout.

    By default RTT Logger logs the output on RTT Channel 1, it needs to be set to 0 to log the default Terminal output.

    If you require any more advanced RTT logging functionality,
    you could use the J-Link SDK to create your own RTT logging application.

    Best regards
    Johannes
    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,

    It seems that the command line option switch has been implemented since this post, such as:

    JLinkRTTLogger -Device NRF52 -If SWD -Speed 4000 -RTTChannel 0

    However, no sign of a stdout support, which might not be useful on Windows, but definitely a miss on Unix (either Linux or macOS) environment.

    Is the logger tool source code available (as part of the SDK for example) as I really need this kind of feature.

    Thanks.
  • Hi,


    Is the logger tool source code available (as part of the SDK for example) as I really need this kind of feature.

    yes, the RTT logger src code is available as part of the J-Link SDK (Part No 8.08.06 on the price list).


    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.