[SOLVED] using another buffer in the control block.

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

  • [SOLVED] using another buffer in the control block.

    i'm debugging an nrf52840 board using j-link, i wanted to add another channel to log my specific data to separate it from the rest of the logs.
    i tried to define a buffer in my main.c file (512 bytes) and call

    C Source Code

    1. uint8_t index = SEGGER_RTT_AllocUpBuffer("TERM_2", my_buffer, sizeof(my_buffer), SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL);

    the index i get is 1 which is obvious, also i verified that MaxNumUpBuffers is indeed 2.
    after that i try to log using

    C Source Code

    1. SEGGER_RTT_WriteString(1, "\ntesting channel 1\n");
    i get nothing, if i log to channel 0 i do get those strings so it's working and jlink identified the CB signature. so what am i missing ? :wacko:
  • Hi,
    Thank you for your inquiry.
    Could please tell us which J-Link Software and Documentation Pack version you are using?

    eyal.gal wrote:

    i get nothing
    How are you checking that you "get nothing"?
    Which application/tool do you use to receive the RTT data?

    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.
  • right of course :)
    i'm using JLinkRTTViewer. opening another channel window (i get 0 by default and opening the second one). in the all tab and 0 tab i do see messages that are sent to SEGGER_RTT_WriteString(0,....) but if i do the same for 1 i don't see it in the viewer.
  • Hi,
    It seems to me like you are confusing "Channels" with "Terminals".
    The RTT Viewer only receives data via Channel 0 and therefore your data on Channel 1 is never received.

    What you are looking for is the
    SEGGER_RTT_TerminalOut(<TerminalID>, <String>)
    function.

    For more information about this function please refer to the J-Link User Manual (UM08001).

    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 Eyal,
    You are welcome!
    Good to hear that you are up and running again.

    We will consider this thread as closed now.

    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.