2012-02-10 04:17 PM
hello
One question: when i am using: char table[10]; (...) *(unsigned int*)&table[1]=0x12345678; should the pointer be dword alligned in RAMy ? Can I make safely such access? Or it is forbidden in ARM architecture thanks in advance2012-02-10 04:52 PM
The Cortex-M3 supports unaligned writes, the ARM 7 and 9 do not. Writing such code is non-portable and inefficient, and therefore probably best avoided.
On ARM 7 and 9, you'd typically use a memcpy() construct, and if the compiler were smart enough it would in-line appropriate code for short copies and the target architecture.http://www.arm.com/files/pdf/IntroToCortex-M3.pdf