Where is the const variable kept?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where is the const variable kept?

362 Views
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...

Labels (1)
0 Kudos
1 Reply

295 Views
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 Kudos