Aligned attribute not working in CW11.0

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

Aligned attribute not working in CW11.0

936件の閲覧回数
gordonp
Contributor III

I have found that the "aligned" attribute doesn't appear to work properly. I am using CW 11.0 for the S12ZVC processor.

 

volatile uint32_t ADC0CommandList[11] __attribute__ ((aligned(4))); //max 256 bytes = 64 commands per 4-byte entries
volatile uint16_t ADC0ResultList[11]  __attribute__ ((aligned(4))); //max 128 bytes = 64 results per 2-byte entries

 

This results in ADC0Command List not being located on a 4 byte boundary (as shown in the map file).

 

ADC0CommandList                           1252      2C      44      12   .common  

 

In the end, I had to add some padding in order to force this variable to the correct place. Any ideas?

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

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

Hello Gordon,

I ever reported similar issue.

Could you please upload your demo project here?

I will test if our latest CW11.0 update1 fixed this problem. it's not released yet.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

696件の閲覧回数
MJW
NXP Employee
NXP Employee

Hello,

I was able to reproduce this with one of my ADC test-projects.

I built a test-case and filed a support ticket.

Thank you for reporting this.

Best Regards,

MJW

0 件の賞賛
返信