Thursday, June 29th 2017, 12:46pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

DirkAust

Beginner

Date of registration: May 19th 2017

Posts: 1

1

Friday, May 19th 2017, 1:39pm

[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?

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,424

2

Tuesday, May 23rd 2017, 12:02pm

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
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link