Hi all,
I use the image 1.1b4 to access M4 core with Rpmsg lib. With VS2013 I buildt the Rpmsg_Demo example. I deployed the release exe to the eval board an everything works fine. The A7 talks to the M4.
But if I deploy the debug exe to debug it, I get a error while calling Rpmsg_Read(…).
void RxThread(HANDLE hRpmsg)
{
MESSAGE msg;
DWORD len;
DWORD count = 0;
TCHAR dataEvent[32];
HANDLE hReceive;
DWORD ret;
msg.DATA = 0;
//Get event name for creating a receive notification event.
Rpmsg_GetConfigString(hRpmsg, L"DataAvailableEvent", dataEvent, sizeof(dataEvent));
hReceive = CreateEvent(NULL, FALSE, FALSE, dataEvent);
//Send a DWORD to M4.
Rpmsg_Write(hRpmsg, (DWORD *)&msg, sizeof(MESSAGE));
while (msg.DATA < 100)
{
ret = WaitForSingleObject(hReceive, INFINITE);
if (ret == WAIT_OBJECT_0)
{
len = sizeof(msg);
if (Rpmsg_Read(hRpmsg, (DWORD *)&msg, len))
{
printf("Recv msg : %d\r\n", msg.DATA);
msg.DATA++;
}
Rpmsg_Write(hRpmsg, (DWORD *)&msg, sizeof(MESSAGE));
}
}
CloseHandle(hReceive);
}
Code in the example has not changed. Also Rpmsg_Write is fine. Calling Rpmsg_Read() throws the following error:
f:\dd\vctools\crt_bld\self_arm_arm\crt\src\dbgheap.c(1399) :
Assertion failed: pHead->nBlockUse == nBlockUse
First-chance exception at 0x0001CD5F in Rpmsg_Demo_VS2013.exe: 0xC0000005:
Access violation writing location 0x001A2000.
Unhandled exception at 0x0001CD5F in Rpmsg_Demo_VS2013.exe: 0xC0000005:
Access violation writing location 0x001A2000.
As I said, compiling in release version works. I build the project with Toradex CE_800 SDK.
Best regards,
kuzco