2021-11-17 08:22 PM
Hi,
I'm debugging code with floats. I am using live expressions to watch the values, but even though I choose the decimal format I am not getting the decimal places for float values. I seem to remember doing this in another project and getting the decimal places.
Are there any settings you need to configure to get the thing to display floats correctly or doesn't the IDE do this?
Solved! Go to Solution.
2021-11-18 06:45 AM
There's a setting under properties / C/C++ Build / Settings / Tool Settings / MCU Settings
2021-11-18 05:39 AM
It doesn't display trailing zeroes after the decimal point. "3" is certainly a valid value for a float, as is "0".
2021-11-18 06:45 AM
There's a setting under properties / C/C++ Build / Settings / Tool Settings / MCU Settings
2021-11-18 09:40 PM
HI LCE
Thank's for that.
I saw those settings, but there names are quite cryptic. I thought they had something to do with how code was compiled, not the actual IDE.
Best regards
Rob
2021-11-18 09:48 PM
Hi TDK,
The problem with that is that the value was 3.873... not 3.0 the decimal paces were ignored. I was sure that I had decimal places in other projects.
Best regards
Rob
2021-11-19 05:38 AM
Those settings do have to do with how the code is compiled.
I can't reproduce what you're seeing here (with checkboxes unmarked).
2021-11-29 03:42 PM
Setting the checkboxes fixes the problem, but at times the IDE still insists on displaying without the floating point representation. Then suddenly it comes good when your back is turned.
Like many things with Eclipse it seems to have a mind of its own.
Another issue I had was the Build Analyser wasn't mapping code to the correct memory segment. The memory segments were all shown correctly, but the variables assigned to them all ended up in AXI Ram. Then after some debugging and playing around the Build Analyzer woke up and displayed the memory map correctly.
I reckon there must be background threads that do all this stuff and they just don't run or run really slowly.
It's a pain as you think you have written bad code and you get sidetracked trying to work out what's wrong with your code when in fact it's Eclipse being Eclipse.
Best regards
Rob