Wrong Value Shown for Constant Variable During Debugging in MCUXpresso

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

Wrong Value Shown for Constant Variable During Debugging in MCUXpresso

Jump to solution
648 Views
nick_schneider
Contributor II

MCUXpresso v24.9

I am seeing wrong values for nearly all constant variables in MCUXpresso. It shows the wrong value when I add the variable to a watch expression or if I hover over the value. It seems all uint16_t variables show the same value of 0x3000. I set the constant variable to another constant uint16_t pointer and that seemed to fix the issue for that specific constant variable.

Optimization is disabled.

Is this a known issue? Is there anything I can do on my end that would fix this issue?

nick_schneider_0-1741894312431.png

 

0 Kudos
Reply
1 Solution
558 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @nick_schneider 

Thanks for your sharing. I checked it on my end. This is an issue with the IDE Expression view. There is no issue with the real value. You can use PRINTF() to print it out as follows.

66666666.jpg

 

Feel free to contact me if still have issue.

 

BR

Alice

View solution in original post

0 Kudos
Reply
3 Replies
631 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @nick_schneider 

Could you please specify which chip you utilized? Additionally, kindly provide a siple project that replicates the issue for my reference. I will  help to check it on my end. Thank you.

 

BR

Alice

 

0 Kudos
Reply
617 Views
nick_schneider
Contributor II

When I first encountered this issue I was using the MKL16Z128VFT4.

I have now tried a modified example project for the FRDM-KL26Z and I am seeing the exact same behavior. I have attached the modified example project. 

Please let me know if there is any other information I can provide that would be helpful.

0 Kudos
Reply
559 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @nick_schneider 

Thanks for your sharing. I checked it on my end. This is an issue with the IDE Expression view. There is no issue with the real value. You can use PRINTF() to print it out as follows.

66666666.jpg

 

Feel free to contact me if still have issue.

 

BR

Alice

0 Kudos
Reply