Hot!MPLABX IDE assembly debug: Counting the days...

Author
PerranOak
New Member
  • Total Posts : 26
  • Reward points : 0
  • Joined: 2017/05/12 09:56:11
  • Location: UK
  • Status: offline
2018/07/11 07:49:54 (permalink)
0

MPLABX IDE assembly debug: Counting the days...

I'm using MPLABX IDE assembly debug to run through my code and have a few quick questions:
1. How do you display the programme steps, i.e. the total number for steps executed not the PC? My proprietary assembler shows this at all times.
2. Can you change the memory location for a variable in the watch window with the name you've given it - (e.g. var_1 equ 0x20) to show "var_1" not "0x20".
3. This is a long shot: when using the ADC can you somehow "inject" test value into the debugger that will help in testing?
Thank you.
#1

7 Replies Related Threads

    NKurzman
    A Guy on the Net
    • Total Posts : 16141
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: MPLABX IDE assembly debug: Counting the days... 2018/07/11 08:18:20 (permalink)
    +1 (1)
    Any Particular PIC?
     
    1 and 3 can be done on the Simulator, But not the Debugger.
    #2
    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: MPLABX IDE assembly debug: Counting the days... 2018/07/11 13:24:37 (permalink)
    +1 (1)
    PerranOak
    ...
    2. Can you change the memory location for a variable in the watch window with the name you've given it - (e.g. var_1 equ 0x20) to show "var_1" not "0x20".

    This should work if you change the project setting from "relocatable mode" to "absolute mode".
    MPLABX doesn't support the ancient "absolute mode" that well, it's more geared to using the more modern "relocateable mode", where variables are reserved using "db", "dw", "dt", etc. directives, not the kludge of using "equ" directives.

    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"
    #3
    JorgeF
    Super Member
    • Total Posts : 3216
    • Reward points : 0
    • Joined: 2011/07/09 11:56:58
    • Location: PT/EU @ Third rock from the Sun
    • Status: offline
    Re: MPLABX IDE assembly debug: Counting the days... 2018/07/11 16:17:52 (permalink)
    +1 (1)
    Hi
     
    Well, you can allways use "cblock", its less work, less error prone, and less clunsy then "equ". As I see it EQU is for constants.
    FWIW I allways use absolute ASM, so I can trimm down unnecessary paging and banking.
    Anyhow, its only for small stuff (< 1K) for bigger stuff its 'C'.

    Best regards
    Jorge
     
    I'm here http://picforum.ric323.com too!
    And it works better....
    #4
    1and0
    Access is Denied
    • Total Posts : 8258
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: MPLABX IDE assembly debug: Counting the days... 2018/07/11 22:30:39 (permalink)
    0
    qɥb
    ... the more modern "relocateable mode", where variables are reserved using "db", "dw", "dt", etc. directives

    Huh???
    #5
    1and0
    Access is Denied
    • Total Posts : 8258
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: MPLABX IDE assembly debug: Counting the days... 2018/07/11 22:31:40 (permalink)
    0
    JorgeF
    FWIW I allways use absolute ASM, so I can trimm down unnecessary paging and banking.
    Anyhow, its only for small stuff (< 1K) for bigger stuff its 'C'.

    No need for paging when < 1K ;)
     
    #6
    domble
    Junior Member
    • Total Posts : 110
    • Reward points : 0
    • Joined: 2007/01/25 04:11:53
    • Location: 0
    • Status: offline
    Re: MPLABX IDE assembly debug: Counting the days... 2018/07/12 03:14:28 (permalink)
    0
    Item number 1 would be the stopwatch?  Counts number of cycles executed (between breakpoints), displays as cycles and as time.  Works on the simulator and if you're lucky on the hardware debuggers too, depending on PIC, debugger, phase of the moon...
     
    (and I like absolute mode for ASM on small PICs.  Usually no spare cycles to muck about changing pages depending on where the compiler/linker happens to have put stuff.  Absolute mode puts stuff where its told to, without having to persuade the linker to please try and put that there...  But it's a pita for debugging because mplabx doesn't seem to support it well, presumably for philosophical reasons only)
    #7
    PerranOak
    New Member
    • Total Posts : 26
    • Reward points : 0
    • Joined: 2017/05/12 09:56:11
    • Location: UK
    • Status: offline
    Re: MPLABX IDE assembly debug: Counting the days... 2018/07/12 07:44:23 (permalink)
    0
    Ah. I now realise that I was using simulator and debugger interchangeably. I should have said that I am using the simulator: it's just that I was using the debug functions to step through.
     
    How do I "inject" test values into the ADC? I'm simulating the 16F1827.
     
    Can I change to absolute mode in an existing project?
     
    Thanks, I'll try cblock.
     
    The stopwatch! Thank you, it's excellent just EXACTLY what I needed.
    #8
    Jump to:
    © 2018 APG vNext Commercial Version 4.5