[SOLVED/OR] Is there any possible to specify all the parameters of JLinkRTTLogger.exe at command line?

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

  • [SOLVED/OR] Is there any possible to specify all the parameters of JLinkRTTLogger.exe at command line?

    Hi
    I want to write a batch file to automatically record all the rtt logs for several devices simultaneously
    But I don't know How to specify all the params and select the specific jlink via command line.
    Can anybody help? :)
  • Hi,

    currently, there are no command line options for RTT-Logger.

    As an alternative, J-Link RTT-Client can connect to an open session, which can be created via batch-file (e.g using J-Link Commander).

    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.
  • SEGGER - Niklas wrote:

    Hi,

    currently, there are no command line options for RTT-Logger.

    As an alternative, J-Link RTT-Client can connect to an open session, which can be created via batch-file (e.g using J-Link Commander).

    Best regards,
    Niklas
    HI Niklas,
    very appreciate your help.
    Would you please share a little more about how to write such a batch file?
    Or is there any reference code I can study with?

    thanks
  • Hi,

    Example procedure in order to open a connection to J-Link and then log RTT-Output:

    1. Open a connection to J-Link and let the J-Link connect to the target device (In this case, a Freescale K66)
      Example:[quote]"C:\Program Files (x86)\SEGGER\JLink_V510f\JLink.exe" -device MK66FN2M0xxx18 -if SWD -speed 12000 -autoconnect 1 -SelectEmuBySN _InsertSNofJ-Link_ [/quote]You need to adjust installation path and target device. Adjust target
      interface and and speed if necessary. If you have multiple J-Links
      connected to your PC, you can select one by passing the -SelectEmuBySN
      parameter.

    2. Open J-Link RTT Client and redirect stdout.
      Example:[quote]"C:\Program Files (x86)\SEGGER\JLink_V510f\JLinkRTTClient.exe" > C:\temp\rttclientlog.txt
      [/quote]


    A list of available J-Link Commander options can be read by typing "?" in J-Link Commander or by consulting UM8001 (chapter 3.2 "J-Link Commander" and chapter 12 "RTT")


    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.
  • SEGGER - Niklas wrote:

    Hi,

    Example procedure in order to open a connection to J-Link and then log RTT-Output:

    1. Open a connection to J-Link and let the J-Link connect to the target device (In this case, a Freescale K66)
      Example:[quote]"C:\Program Files (x86)\SEGGER\JLink_V510f\JLink.exe" -device MK66FN2M0xxx18 -if SWD -speed 12000 -autoconnect 1 -SelectEmuBySN _InsertSNofJ-Link_ [/quote]You need to adjust installation path and target device. Adjust target
      interface and and speed if necessary. If you have multiple J-Links
      connected to your PC, you can select one by passing the -SelectEmuBySN
      parameter.

    2. Open J-Link RTT Client and redirect stdout.
      Example:[quote]"C:\Program Files (x86)\SEGGER\JLink_V510f\JLinkRTTClient.exe" > C:\temp\rttclientlog.txt
      [/quote]


    A list of available J-Link Commander options can be read by typing "?" in J-Link Commander or by consulting UM8001 (chapter 3.2 "J-Link Commander" and chapter 12 "RTT")


    Best regards,
    Niklas


    Hi Niklas,
    Thanks again very very much for your great support.
    I still have one question, Can I run multi pair of JLink.exe and JLinkRTTClient.exe simultaneously on the same computer?
    If I can, How can I Know which JLink.exe the JLinkRTTClient.exe currently connected to.(seems all the JLink.exe listen to the same tcp port 19021)
    Is it possibly that I name the log file according to the JLink SN?
  • Hi,


    If I can, How can I Know which JLink.exe the JLinkRTTClient.exe currently connected to.(seems all the JLink.exe listen to the same tcp port 19021)

    The port will be customizable in a future version of the J-Link software & documentation pack.
    Until then, only one RTT-Telnet connection per Host-PC (or VM) is possible.

    Is it possibly that I name the log file according to the JLink SN?

    This could be done using Batch variables, example:

    Source Code

    1. @echo off
    2. for %%i in (1,2,3) do (call :subroutine %%i)
    3. pause
    4. :subroutine
    5. echo %1
    6. GOTO :eof

    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.
  • Quick update on this case:
    We have implemented this feature in the meantime (see forum.segger.com/index.php?page=Thread&threadID=2857)

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