elecLear78
Member
I have seen this code
#define PM_ROW __attribute__((space(prog), aligned(128)))
const PM_ROW MyRowData1InFlash[] =
{ 0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111
};
const PM_ROW MyRowData2InFlash[] =
{ 0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222
};
If i do not give align(128) will the compiler not put in multiples of 128 addresses. When it is mandatory that i give this align parameter? Please advise.
#define PM_ROW __attribute__((space(prog), aligned(128)))
const PM_ROW MyRowData1InFlash[] =
{ 0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,
0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111,0x1111
};
const PM_ROW MyRowData2InFlash[] =
{ 0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222
};
If i do not give align(128) will the compiler not put in multiples of 128 addresses. When it is mandatory that i give this align parameter? Please advise.