[ABANDONED] RTT Problems

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

  • [ABANDONED] RTT Problems

    I'm using RTT to print out a heartbeat from time to time (several seconds!) after a number of printouts I get a memory exception at the first call to "memcpy" in the function below.

    static void _WriteNoCheck(SEGGER_RTT_BUFFER_UP* pRing, const char* pData, unsigned NumBytes) {
    unsigned NumBytesAtOnce;
    unsigned WrOff;
    unsigned Rem;

    WrOff = pRing->WrOff;
    Rem = pRing->SizeOfBuffer - WrOff;
    if (Rem > NumBytes) {
    //
    // All data fits before wrap around
    //
    memcpy(pRing->pBuffer + WrOff, pData, NumBytes);
    pRing->WrOff = WrOff + NumBytes;
    } else {
    //
    // We reach the end of the buffer, so need to wrap around
    //
    NumBytesAtOnce = Rem;
    memcpy(pRing->pBuffer + WrOff, pData, NumBytesAtOnce);
    NumBytesAtOnce = NumBytes - Rem;
    memcpy(pRing->pBuffer, pData + Rem, NumBytesAtOnce);
    pRing->WrOff = NumBytesAtOnce;
    }
    }

    Any idea what the reason could be?
  • Hi,


    sorry for the delay in response.
    As you are still in your active support period, could you please open a ticket via mail?


    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.