I'm using CARM in uVision3. I have to use the variable which is aligned to 32 byte boundary. For example,
... int Var1, Var2;
struct{ char Index[16]; char Bucket[16][32]; }Var_3, Var_4; ...
Var1 has to be located at 0x20000020 Var2 at 0x20000040 Var3 at 0x20000060 Var3 at 0x20001060
It means that they shouldn't be located at such as 0x20000023, 0x20000030 or so on)
How to located them at 32 byte aligned memory?
Look at the PACKED keyword in the CA User Guide. You can force a byte, a half word or word to align. To align a byte on a 32 bit boundary is not code efficient. Are you real sure that you need to force the alignment? Bradford
It might be cache-efficient.
I already know it is not code efficient. But I need to do some tricky process between C and Assembly. In my assembly routine, they have to be referred in 32 byte alignment.