Where is the const variable kept?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Where is the const variable kept?

936 次查看
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 回复

869 次查看
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 项奖励
回复