Forum Discussion
Altera_Forum
Honored Contributor
15 years agoYes, I have/had an endian issue. The original code was written for an X86 so most of that is already handled.
The casting is a limited problems since most functions didn't go through the recast so do not have an issue. I have one function that was causing problems. It took 2 void pointers and cast them as long pointers then copied the contents of one location to another. For right now I have cast them as character pointers and copy 4 characters. I will come back and optimize it later :) --- Quote Start --- I've just done a quick test (with gcc 3.4.6) the __attribute__((aligned(1))) works - for arrays and structure members, but not simple variables. --- Quote End --- This maybe why my test did not work. I tried something like int * __attribute__((aligned(1))) pvar; Which is a simple variable and as mentioned above saw no change.