I have the same problem.
We also create a struct using cpp.
The compiler generates a
ldmia
instruction to load the constant values from flash.
Which are then used to initialize the struct.
This in combination with an enabled BEE causes a hard fault.
We where able to recreate the problem with two ASM instructions.
__asm __volatile ("\
ldr r5,=0x7001fb68 \n\
ldmia r5!, {r0, r1, r2, r3}");
In our case we use the IMX1064.
Side note:
We have used a number of values for R5.
0x7001fb60
0x7001fb64
0x7001fb68 <- this value cause problems.
0x7001fb6C
The others do not cause problems.