Structure in bit band region
Hi, I have this very simple code that sets generic flags to the desired value:
struct GenFlgStr
{
uint8_t F1 : 1;
uint8_t F2 : 1;
uint8_t f3 : 1;
};
struct GenFlgStr GenFlg;
main{
GenFlg.F1=1;
GenFlg.F2=0;
}
------------------------------------------------------------
Now I want to reply this simple structure in bit band region:
struct GenFlgStr
{
uint32_t F1;
uint32_t F2;
uint32_t F3;
};
uint8_t FLG[1];
struct GenFlgStr GenFlg __attribute__((at(((uint32_t)FLG - RAM_BASE) * 32 + RAM_BB_BASE))); // Bit Band Alias region
main{
GenFlg.F1=1;
GenFlg.F2=0;
}
When I compile this code (STM32cubeide) the "__attribute __ ((at" .... is ignored and a structure of 3 integers is generated in the main memory and not in the bit band region ....
Can someone help me?
the goal is to only change the structure definition and keep the same main when the code is compiled for M3 which supports the bit band region .
