Tool/software: TI C/C++ Compiler
Hi,
I am observing a strange behavior where a structure variable assignment is not working properly.
In my RTOS project code for arm core, I have a structure containing a memory pointer, and this is initialized inside the first function (structvar1). From this function the address of the variable will be passed to next function and then there it will be assigned to another variable of same structure (structvar2). But its found that, sometimes the pointer in structvar2 gets initialized with the starting address of DDR memory, instead of the address in the structvar1. Because of this invalid address, I am getting random crash.
I tried member assignment and memcpy, still not working. The error is less frequent in debug mode. But in release mode its very frequent. What could be the reason for this behavior?.
I am using ccsv7, RTOS, ARM compiler verison is GNU v4.8.4, SYS/BIOS version is 6.46.5.55, XDC tools version is 3.32.01.22.