Where is the const variable kept?

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

Where is the const variable kept?

385件の閲覧回数
tgc-yilmaz
Contributor III

Hello,

I'm using a MPC56xxx and developing a project on CodeWarrior. But, I don't know where the const variable is kept. Where is the const variable kept? Can you help with this...

Thank you for your help...

ラベル(1)
0 件の賞賛
1 返信

318件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

large constants are placed to .rodata section, small constants are placed to .sdata2 section. The threshold to distinguish between large and small constants is 8 by default and can be changed.

For more details, search for "rodata" and "sdata2" keywords in CodeWarrior help.

Regards,

Lukas

0 件の賞賛