I recently faced a problem with some C code, on ARM processors, where data alignment is of importance. I typically have following 2 scenarios:
Depending on the offset, I get some crashes. So the solution to scenario 1 is (for instance):
float value; memcpy (&value,ucharPtr+offset,sizeof(float)); value=doLittleBigEndianConversion(value);
Which solves the alignment problem. My question is now: How can I fix the scenario2 code, so that it also works on ARM processors?
Thanks for any insight!