At 07:21 PM 10/5/04 +0000, you wrote:
>Is there any way to have the LPC2000 generate an exception on
>unaligned data accesses? We are using ARM-GCC and it seems neither the
>compiler nor the processor warn us of unaligned data accesses, even
>though they are illegal.
The short answer is no.
But it raises the question. What kind of code are you writing where this
is more than a very occasional issue? The compiler shouldn't be generating
unaligned access for normal code unless there is a bug in it.
The only case I know of where it would show up involves pointer punning
which is inherently risky regardless of architecture.
There is also the case of a few registers (AFAIR) that require word access.
Robert
" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "
Kelvin Throop, IIIMessage
Re: [lpc2000] Exception on unaligned access
2004-10-05 by Robert Adsett
Attachments
- No local attachments were found for this message.