2025-11-19 8:41 PM
Hi,
i have a confusing problem, i have a simple routine to compute values and it needs to return the result as a double. just before the return the value is correct but the calling routine does not get passed this value. i know there can be some alignment issues with double variables. i am using STM32CubeIDE Ver 1.18.1 To overcome i simple create a global variable and assign this the right value and it all works. however why am i not able to return the double value?
any help appreciated.
Mark
2025-11-19 9:50 PM
Hi Mark,
can you please provide more details?
Which MC or board do you use? Which project settings apply? How does your code look like?
A full example (as small as possible) would help to help you.
BR Klaus
2025-11-20 2:05 AM - edited 2025-11-20 2:05 AM
Remember that we can't see your code, so can't comment on what might be wrong.
Therefore, as @mfgkw said, please show a minimum but complete example which illustrates.
See: How to insert source code
Also: How to write your question to maximize your chances to find a solution
How do you observe the value? Are you sure this isn't just a problem with the debugger not properly presenting double values...?
@Barber.Mark wrote:i am using STM32CubeIDE Ver 1.18.1
Note that this is rather old - current version is 2.0.0.