Hi,
I am using memcpy and memset to initialize very large data structures. I mean, they seem large to me :)
Every loop, I initialize a struct of 32384 bytes to zero. Then I memcopy chunks of 640 bytes into it and also, set individual variables by assignment.
What I see, is it seems like sometimes the memset trickles into the next variables. I can see this is I tell memset to assign something other than zero. Are there any suspected culprits for this behavior? I also sometimes see that the data copied is incorrect. For instance, a variable will have an invalid number, like the bytes copied were maybe shifted?
Here is a better description of my structs.
I have an array[5000] of largeStruct. sizeof(largeStruct) = 32384
Inside each largeStruct is an array[50] of smallerStruct. sizeof(smallerStruct) = 640. The remaining space is misc variables.
I tried to make largeStruct and smallerStruct cache aligned to 128 bytes. I also placed smallerStruct at the beginning of largeStruct so it will start at a cache aligned position.
I read about maybe a 16K roll over problem, but I am under 16K. Maybe this is similar but I can't put my finger on the solution.
I also get this warning when I compile, but I read somewhere else that it is ok to ignore it :
"
<Linking>
"./configPkg/linker.cmd", line 357: warning #10237-D: split placement (>>) ignored for ".myLocalMemory": split run placement for this section is not permitted
'Finished building target: PXMTracking.out'
"
Thanks,
brandy
I am using C6678, CCS Version: 5.1.0.09000