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.

Parameter Alignment

Hi all,

I try to declare four parameter like the following in CCS.

char fCmdStore[3];     (3 bytes)

char fReserve13;        (1 bytes)

char fCmdDataCnt[3]; (3 bytes)

char fReserved17;      (1 bytes)

After complire finished, I check the map file and show as below:

20003f59   fCmdDataCnt;

20003f54   fCmdStore;

20003f58   fReserve13;

20003f5d   fReserved17;

 

The parameter in RAM address is not my expecation.

I think it should be word alignment, is it ? By word alignment,

I think the variable address as below:

20003f50   fCmdDataCnt;

20003f53   fCmdStore;

20003f54   fReserve13;

20003f57   fReserved17;