Tool/software: TI C/C++ Compiler
TI v16.9.3.LTS
CCS 9.3
I have a unsigned integer pointer UINT8 *m_ucArcnetInputBuffer;
Structures of different sizes are used with this pointer to make assignments.
e.g., ARCNET_MSG_01_t * pRecvMessage = (ARCNET_MSG_01_t *)&(m_ucArcnetInputBuffer[0]);
In some places memory is dynamically allotted and freed to this buffer using free RTOS
e.g., m_ucArcnetInputBuffer = (UINT8*)pvPortMalloc(ucNumMsgs*MAX_USB_MESSAGE_SIZE);
vPortFree(m_ucArcnetInputBuffer);
The problem I am running into is:
Soon after I flash the application, and halt at the first structure assignment (shown above),
there are values written into the memory that are non-zero. This is causing problems in the application.
If I try malloc and freeing space, the processor is running into hard fault.
What can I do about this? Upgrading to a newer compiler didn't help.
Thanks,
Priya