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.

Problem with EtherCAT Stack and __attribute__

I have created an EtherCATStack and run the patch.I have a problem with the __attribute, originally it is like this:

struct {

}__attribute__((packed))

structname;

There are some possibilties to place the instruchtion. Where is the right place to set it?

I have tried to replace it with #pragma pack(1), but this failed.

best regards

  • Hi,

    If you are using sdk\protocols\ethercat\ecat_appl folder and project - it should work straight away - all you need to do is patch EcatStack folder with SSC 5.0 stack sources. Then import the project to CCS.

    If you are creating your own project - in the project properties > TMS470 compiler > Language options  - Select Enable support for gcc extensions (--gcc). This is required for __attribute___((packed)) to work.