Hot!Watch Variable

New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2009/08/24 15:10:23
  • Location: 0
  • Status: offline
2018/02/13 10:01:17 (permalink)

Watch Variable

Hello Forum,
i start a Project with a PIC12F1572  in MPLABX 4.05 .
I wrote my Code in Assembler. I definded the variable in that way
cblock 0x70
When i use the Simlator and  debug main Projekt i see only the STATUS and W Register in the watch window .
By stopping the Debugger in the watch window i can see the Var's who's  added from me .
Please can anybody explain what's wrong with my work.
Thanks for help 

2 Replies Related Threads

    • Total Posts : 919
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: Watch Variable 2018/02/14 08:57:40 (permalink)
    Moved this to MPLAB X IDE forum.  I know this has something to do with the debug information available from the assembler, but don't know the details.  I suspect folks in the MPLAB X IDE forum can offer more cogent advice.
    Super Member
    • Total Posts : 791
    • Reward points : 0
    • Joined: 2006/01/20 10:21:24
    • Location: Microchip Technology - Chandler, AZ
    • Status: offline
    Re: Watch Variable 2018/02/28 13:36:05 (permalink)
    +1 (1)
    Yes, this is because the cblock is similar to using EQU statements, which equates a name to a constant number, which just happens to be an address.  Therefore, the debug file that is being used does not recognize this to be a variable.  This is why you cannot see it as a watch variable.  If you use the RES statement using relocatable builds, the debug file will let the IDE know that this is a variable.  Hopefully that answers the question.
    Jump to:
    © 2018 APG vNext Trial Version 4.5