This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

#pragma DATA_ALIGN



The DATA_ALIGN pragma aligns the symbol in C what means alignment boundary ?

for Example:

#pragma DATA_ALIGN(pui8ControlTable, 1024)
uint8_t pui8ControlTable[1024];

thanks 

sayed abdullah

  • Hello Sayed,

    The DATA_ALIGN pragma means that variable to follow is to be aligned on 1024 byte boundary. It must not be arbitrarily declared at any non-1024 byte location. As an example A byte can be placed at address 0x0, 0x1, 0x2 or 0x3. But when the pragma is used then it can be kept at 0x000, 0x400, 0x800 even though it is of type byte.

    Regards

    Amit