[SOLVED] J-link SEGGER_RTT_Write with additional channel

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

  • [SOLVED] J-link SEGGER_RTT_Write with additional channel

    Hi,


    I tried to add a seperate Channel to RTT.

    Source Code

    1. #define RTT_CHANNEL_1 1
    2. #define ITM_DUMP_DOWN_DATA_SIZE 1024
    3. static uint8_t vusb_up[ITM_DUMP_DOWN_DATA_SIZE];
    4. SEGGER_RTT_ConfigUpBuffer(RTT_CHANNEL_1, "Linux", vusb_up, ITM_DUMP_DOWN_DATA_SIZE,
    5. SEGGER_RTT_MODE_NO_BLOCK_TRIM);


    If I try to write there is no output.


    The Channel is definied correctly:

    <Image can not be added>, I see the up channel defined in the Channel Info dialog.

    The Output function is as follows:

    Source Code

    1. uint8_t ITM_Print(const uint8_t termid, const void *Format, ...)
    2. {
    3. va_list argptr;
    4. va_start(argptr, Format);
    5. SEGGER_RTT_SetTerminal(termid);
    6. SEGGER_RTT_vprintf(RTT_CHANNEL_1, Format, &argptr);
    7. va_end (argptr);
    8. }
    Display All

    I have RTT-Viwer V7.52 and J-Trace V2.00

    The post was edited 6 times, last by mansekurasan: Added a picture ().

  • Hi,
    Thank you for your inquiry.
    There seems to be a common misconception here.
    I suppose you want to show RTT data on different Terminals correct?
    However an RTT terminal and RTT channel are two different things.
    The RTT Viewer only supports terminal output via channel 0:
    wiki.segger.com/J-Link_RTT_Viewer

    You would have to use Channel 0 together with SEGGER_RTT_SetTerminal() and/or SEGGER_RTT_TerminalOut() functions to achieve what you want.

    I would suggest that you revisit the RTT Viewer article (link above).

    Best regards,
    Fabian
    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.
  • >> suppose you want to show RTT data on different Terminals correct?
    No, If you look on the pasted code above, you see that I make the Terminal handling already.
    I want on the second terminal a second Channel (Buffer) but you said already that this is not possible with Termin Viewer.

    I want to print to different data streams to different terminal windows. The problem is that the refresh rate of the second channel is very fast.
    What can I do to solve this? And what is the reason to define this different buffers if it is not possible to use them?

    Thanks
    Manfred
  • Hi Manfred,
    I am sorry but I think I do not fully understand what the issue is.

    mansekurasan wrote:

    I want to print to different data streams to different terminal windows.
    I do not see how this would not be possible with a singular buffer.
    The data is split by the RTT Viewer to the different terminals automatically anyway.

    mansekurasan wrote:

    The problem is that the refresh rate of the second channel is very fast.
    What can I do to solve this?
    What exactly do you mean? What channel are you referring to?
    Could you please describe the problem in more detail?

    mansekurasan wrote:

    And what is the reason to define this different buffers if it is not possible to use them?
    There are multiple reasons. Communication via the RTT Viewer is only one possible use case for RTT.
    Another use case would for example be SystemView, which uses RTT channel 1.

    This is also one reason why the J-Link RTT Viewer only uses channel 0 for communication,
    so that the RTT Viewer and SystemView can be used in the same debug session.
    Otherwise they would interfere with each other.

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

    thanks.
    If you define a channel some attributes are set also like the buffer and blocking or unblocking mode and later on we can use this buffer with the defined channel with its attributes.
    I want to define a channel in unblocking mode and the other channel in blocking mode. Then I want to print the first channel on Terminal 1 and the other on Terminal 2.
    Thats all.
  • Hi,
    Thank you for the elaboration.

    I put multi channel/buffer support on our feature request list.
    Unfortunately, we are currently fully booked with projects, so we can not give a timeline
    for when this feature will be added.

    Best regards,
    Fabian
    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.