Hot!variable values wrong???

Author
roujesky
Junior Member
  • Total Posts : 116
  • Reward points : 0
  • Joined: 2008/08/12 13:04:59
  • Location: 0
  • Status: offline
2018/01/17 11:58:32 (permalink)
0

variable values wrong???

using mplabx 4.01, pic32mx795.   I cannot tell what is going on, but all my variables display as max values (like 65535).  I know they are REALLY right because for instance:
if(x<5)
   printf(.....
the code steps thru and does this. 
the variables appear wrong in hover and variable windows...
I have restarted mplabx, my windows 10 pc, the test board several times.
I am clueless
 
thanks!
#1

6 Replies Related Threads

    Jim Nickerson
    User 452 _
    • Total Posts : 5110
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: online
    Re: variable values wrong??? 2018/01/17 12:09:50 (permalink)
    +1 (1)
    You could try the latest MpLab X ver 4.05
    I set xc32-gcc, options,Optimization to 1 or 0 for debugging.
    I add

    _nop();
    _nop();
    for breakpoints
    #2
    annapolis
    Administrator
    • Total Posts : 1808
    • Reward points : 0
    • Status: offline
    Re: variable values wrong??? 2018/01/17 15:48:29 (permalink)
    0
    Show a sample declaration and scope.
    What Debug Tool ?
    #3
    roujesky
    Junior Member
    • Total Posts : 116
    • Reward points : 0
    • Joined: 2008/08/12 13:04:59
    • Location: 0
    • Status: offline
    Re: variable values wrong??? 2018/02/08 20:21:43 (permalink)
    0
    I am now using MPLabX 4.05, C32 1.12, ICD3.  I am running windows 10 pro, 32gb RAM, terabytes of disk space.  OPtimization....  I have to figure that out, will check in the morning.
     
    Jim Nickerson, you wrote
    I add

    _nop();
    _nop();
    for breakpoints
    Can you elaborate on this?  Not sure I follow...
     
    thanks!
    #4
    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: variable values wrong??? 2018/02/08 20:49:26 (permalink)
    +1 (1)
    roujesky
    ...
    Jim Nickerson, you wrote
    I add

    _nop();
    _nop();

    for breakpoints
    Can you elaborate on this?  Not sure I follow...

    Not every line of your C code can be the target of a breakpoint.
    If you add those two "do nothing" lines to your source, then you can always put a breakpoint on them.
    (Assuming they are in a location that execution can get to, otherwise they could be optimised away.)
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #5
    roujesky
    Junior Member
    • Total Posts : 116
    • Reward points : 0
    • Joined: 2008/08/12 13:04:59
    • Location: 0
    • Status: offline
    Re: variable values wrong??? 2018/02/08 20:52:19 (permalink)
    0
    qyb:
    got it.
     
    thanks!
    #6
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2645
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: variable values wrong??? 2018/02/08 21:42:50 (permalink)
    0
    What code, you have not shown an example.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #7
    Jump to:
    © 2018 APG vNext Commercial Version 4.5