Qorivva: sizeof a structure with bitfields

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Qorivva: sizeof a structure with bitfields

671件の閲覧回数
pascalbrand
Contributor I

Hello,

 

Using CodeWarrior for MCU, v10.7, on Qorivva target, I am not able to understand the size of the current structures: S1 has size 1 (not expected - I was expecting 4, following the section "21.4.6 Bitfields" of the documentation MCU_Power-Architecture_Compiler.pdf), wheras S2 has size 4 (as expected):

 

    struct S1 {
        unsigned int a: 4;
        unsigned int b: 3;
        unsigned char c:1;
    };

    struct S2 {
        unsigned char c:1;
        unsigned int a: 4;
        unsigned int b: 3;
    };

 

Could you elaborate?

 

Thanks for your support,

Pascal.

 

PS: I have attached the project to highlight it.

Original Attachment has been moved to: MPC-C.7z.zip

0 件の賞賛
返信
3 返答(返信)

570件の閲覧回数
pascalbrand
Contributor I

Hello ZhangJennie‌,

could you have a look?

Thanks,

Pascal.

0 件の賞賛
返信

570件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Pascal,

I don't work for Qorivva.

I would suggest you create a private case to NXP support team directly it.

https://community.nxp.com/docs/DOC-329745?sr=search&searchId=356ea1f0-531d-4edb-b1aa-a707baa9ce8c&se... 

Best Regards,

Jennie Zhang

0 件の賞賛
返信

570件の閲覧回数
pascalbrand
Contributor I

Thanks a lot.

I've just created it as "NXP Support case #00136577".

Best regards,

Pascal.

0 件の賞賛
返信