Other Parts Discussed in Thread: OMAP-L138
Hi Everyone
I am currently working on OMAP-L138 custom board with DDR2(2Gbit, X16) at 150Mhz. I am facing some strange problem while declaring and using a string.In my code i have the following lines:
1.char a[ ]="hello";
2.printf("%s", a);
Output of the code: ehll.o
Now while executing the 1st line , i can see that a memcpy() function is being called which transfers "hello'" from a source to a destination address. In this function itself while copying each char from the source to destination the address where it is stored changes.
This is the Source Screenshot at address 0xc109f912:
This is the destination screenshot at address: 0xc0f7ff0e

I have ran some simple memory copy statements and it works in the same way.Whenever I initialize them as char pointer it copies to the wrong location.For all other cases i.e short or int pointers it works fine. Can anyone plz suggest how to solve this problem? Is it beacuse char is stored as 8 bit and integer as 16/32 bit. The same code works fine on the evaluation board.
Regards
Ayusman