[SOLVED] See register contents as a signed integer

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] See register contents as a signed integer

    Is there any way to see the contents of registers as signed integers? The "display as" menu only has "Decimal" and I suppose that works out to be unsigned integer only.

    Or alternatively, how can I see the register content in the "Quick Watch" windows? Because if this works, I can cast its value to be a "signed int".
  • Hi taydin,

    Ozone does not support displaying register contents as signed integer. I will add this to the list of potential future features to be added in future.

    Ozone does not yet allow to display register contents in the watched data window. Adding that feature is already on our list for future improvements but I cannot comment on when this will be released.

    I assume that your use case is seeing the intermediate values of a complex arithmetic operation that is split into multiple assembly language statements. Since ELF debug information works on source level the value of that variable is updated only after that sequence is completed and the value is written back into the memory. For such a use case you may try splitting up the complex arithmetic operation in the source code into multiple C-commands and storing the intermediate results in dedicated local variables. Those local variables can be displayed in the symbols window, thus increasing visibility.

    Does that answer your question?

    Best regards
    -- AlexD
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Thank you for the response Alex. The function is actually an assembly function that does median filter calculation. I am using a workaround now, having a calculator in front of me to get the value of the twos complement number.

    But your idea of using a variable makes sense. Will do that going forward.
  • Hi taydin,

    good to hear you can continue you work.

    Happy debugging!
    -- AlexD
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.