First, align the structure, not the variable. See https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-aligned-type-attribute. For example
typedef struct
{
uint32_t first;
uint32_t second;
} __attribute__((aligned(32))) myStruct_t;
myStruct_t myStruct[2];
Next, control its placement in memory. Your post suggests you've already done this somehow. Otherwise for example
myStruct_t myStruct[2] __attribute__((section(".myDevice")));
And in your linker command file
MEMORY
{
<snip>
MY_DEVICE (rw) : ORIGIN = 0xdddddd00, LENGTH = 64
}
SECTIONS
{
<snip>
.myDevice (NOLOAD) :
{
*(.myDevice)
} >MY_DEVICE
}
Finally, as you're accessing a device of some kind and the number and order of bus accesses is probably significant, you ought tell the compiler that with a volatile qualification on each of the structure members, for example
typedef struct
{
volatile uint32_t first;
volatile uint32_t second;
} __attribute__((aligned(32))) myStruct_t;