This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTT & NRF_LOG_ENABLED=0

Hello,

We use SEGGER_RTT_ReadNoLock() in our code, and this works perfectly. Our nRF is connected to a DK, which is connected to a computer.

However, when we compile with NRF_LOG_ENABLED=0, RTT isn't working anymore. It is a bit hard to know what's going on since JLinkExe doesn't seem to notive.

I suspect there is a relationship between the two, since we also use logging over RTT (SWD) to debug; but I did not find a way to fix it.

Would you have any ideas? Maybe other flags to set/unset?C

Thank you very much.

Parents Reply Children
  • I don't init anything. Should I?

    I simply do the following:

    #include <SEGGER_RTT.h>


    // and in some loop:

            const int bufferIndex = 0;
            if (SEGGER_RTT_HasData(bufferIndex))
            {
                char buf[32];
                int r = SEGGER_RTT_ReadNoLock(bufferIndex, buf, sizeof(buf));
                buf[r - 1] = '\0';
                exec_cmd(buf);
            }
Related