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.

How can I get struct aligned?

Other Parts Discussed in Thread: TMS320F28377S

Hello,

I am using CCS 6.1.2 and the microprocessor is TMS320F28377S.

What I have tried is to pack the members of struct to save memory space

as #pragma pack(1) struct{ }; does.

I've tried

#pragma pack,

#pragma data_align, and

__attribute__((__packed__)) with -gcc option enabled

but it seemed that neither #pragma pack nor the GCC keyword is supported by the C2000 compiler.

#pragma data_align seemed to work but only on the definition not the declaration.

It is where I got stuck.

Is there any another way?

Regards,

JS