Skip to main content
Ken Inoue
Associate III
November 9, 2017
Solved

How to look at floating-point number calculation result with EWARM

  • November 9, 2017
  • 1 reply
  • 2264 views
Posted on November 09, 2017 at 10:11

Thank you for your patronage. I'm using STM32F3348-Discoverywhich has FPU and EWARM.

I made calculations like the picture below.

0690X00000608KAQAY.png

I'd like to check if floating point arithmetic is calculated correctly. So,I added z to EWARM live watch. Butz indicated an error.In case of integer operation, it is correctly displayed.How can I do it?

0690X0000060PC8QAM.png

Best Regards,

Ken Inoue

    This topic has been closed for replies.
    Best answer by Andrew Neil
    Posted on November 09, 2017 at 10:39

    Having paid the considerable licence fee for EWARM, don't you think you should be asking them about difficulties with their product ... ?!

    https://www.iar.com/support/technical-support/

      

    But, anyhow, what is the text following 'Error(...' in your screenshot?

    General points - not specific to IAR:

    • Is z in-scope at the point you are trying to observe it?

       
    • Is the value of z ever used for anything non-trivial?

      If not, the compiler may well have optimised it away...

    1 reply

    Andrew Neil
    Andrew NeilBest answer
    Super User
    November 9, 2017
    Posted on November 09, 2017 at 10:39

    Having paid the considerable licence fee for EWARM, don't you think you should be asking them about difficulties with their product ... ?!

    https://www.iar.com/support/technical-support/

      

    But, anyhow, what is the text following 'Error(...' in your screenshot?

    General points - not specific to IAR:

    • Is z in-scope at the point you are trying to observe it?

       
    • Is the value of z ever used for anything non-trivial?

      If not, the compiler may well have optimised it away...
    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Ken Inoue
    Ken InoueAuthor
    Associate III
    November 9, 2017
    174712CGIL2
    Andrew Neil
    Super User
    November 9, 2017
    Posted on November 09, 2017 at 12:10

    Do you understand the concept of scope in the 'C' programming language?

    A variable is not visible outside its scope - not even to a debugger ...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.