This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debug Watch window and 8 bit variables

I am using version 5.05 of the C166 compiler and am seeing a strange problem displaying 8 bit variables in the Watch window. Rather than the value I expect, I see only the lower nibble with the upper nibble stuck at 0 (0x45 displays as 0x05).

I can see that the processor has the correct value because it is correctly shown in the Register window. This is a local function variable that has been optimized to be placed in a register rather than the stack.

Anybody else have this problem and know of a solution?

Thanks,
Barry

  • Hi Barry,

    unfortunately no solution, but the same problem.
    I was not sure before, whether this could be my mistake, when I cover this. I worked on array [][][] holding pixel values for a dot matrix display, showing some chinese characters.
    If I wrote a "scrolly" I became a little bit crazy, because I could not determine the right pixel values, exactly as you mentioned.
    If somebody has a solution, I would be interested in too.

    Stefan

  • Sorry, but we are not aware of any problems here. Which debugger are you using?

    Reinhard

  • Dear Mr. Keil,

    I was using simulator under V5.00
    and also ULINK.
    I have to mention, that I used "OCDS driver for XC16x" instead of "ULINK driver for XC16x".
    But since, this was the first and only case,
    that ULINK crashed I was not sure, whether this was my mistake.
    ( Since Barry mentioned the wrong display in the watch window, I remember that I had the same in simulator too. )

    This was a trial project to interfacing a dot matrix to a starterkit for support purposes and therefore I did not take extremly care of this.

    With kindly regards
    Stefan

  • I am still having a problem displaying the correct values for 8 bit variables and it is causing a lot of wasted time having to examine register values to see if the byte value shown in the Watch window is correct. The upper nibble of these variables will be displayed as zeros (i.e. 0xFF is displayed as 0x0F).

    I am using UV3.05e which came with the ULINK driver UL2OCDS.dll (V1.00). I am using the USB ULINK tied to a custom board having the XC167 uP, 2Mb external program flash and 512Kb of RAM. Is there a newer driver for ULINK (I don't even see ULINK listed on the Product Update page).

  • Can you provide an example since we are not aware of such problems.

    Send a test case to support.intl@keil.com.

    Reinhard

  • I use 3.11e, where the UL2OCDS.dll is
    shown as V1.0.0.1.
    ( I actually not work on 16-bit )
    As far as I know, only some improvements in the timings were done.
    Newer versions are not separatly downloadable, as I mean, but comes, if newer versions available within the updates for
    C166 package.

    Stefan