Shop OBEX P1 Docs P2 Docs Learn Events
BMA GUI Multi-COG PASM Debugger — Parallax Forums

BMA GUI Multi-COG PASM Debugger

jazzedjazzed Posts: 11,803
edited 2011-07-07 14:16 in Propeller 1
Here is the BMA PASM Debugger with a GUI. It is built for Windows with .net 2.0+

This is a simple multi-cog capable debugger program that uses the mature BMADebugger.

Features
  • Set breakpoints in COGs and Continue, switch to another COG and do work there, etc....
  • See COG variable data by putting your mouse over the variable name
  • Step over PASM subroutine CALLs
  • Single step PASM and into subroutines
  • Help is available from the program Help Menu.
Attached .zip contains the PASMDebugger application, BMADebugger_Demo.spin files, and required special BSTC.

attachment.php?attachmentid=67413

Cheers.
--Steve

V0.2 - Fixes problem with breakpoint set.
V0.1 - Added BSTC special.
V0.0

Post Edited (jazzed) : 2/6/2010 3:59:59 AM GMT
802 x 661 - 93K

Comments

  • jazzedjazzed Posts: 11,803
    edited 2010-02-03 23:08
    Thanks to BradC for providing a feature in BSTC that makes this GUI possible.
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-02-03 23:48
    Nice! I have to try this...
    jazzed said...
    Here is the BMADebugger with a GUI. It is built for Windows with .net 2.0+

    This is a simple multi-cog capable debugger program that uses the mature BMADebugger.

    You can:
    • set breakpoints in COGs and Continue, switch to another COG and do work there, etc....
    • see COG variable data by putting your mouse over the variable name
    • step over PASM subroutine CALLs
    • single step PASM and into subroutines
    Help is available from the program Help Menu.

    The attached .zip contains the PASMDebugger application and BMADebugger_Demo.spin files.


    attachment.php?attachmentid=67413

    Cheers.
    --Steve
    .
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
    Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler Largos - upcoming nano operating system
  • RossHRossH Posts: 5,519
    edited 2010-02-04 00:19
    Jazzed,

    Multi-cog debugging! Great work!

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • kuronekokuroneko Posts: 3,623
    edited 2010-02-04 12:50
    Hi Steve,

    could you provide a link to bstc v0.15.4-pre3, I only seem to be able to locate pre2? I know it's probably somewhere in the bst thread ... needle ... hay [noparse]:)[/noparse]
  • BradCBradC Posts: 2,601
    edited 2010-02-04 13:23
    kuroneko said...
    Hi Steve,

    could you provide a link to bstc v0.15.4-pre3, I only seem to be able to locate pre2? I know it's probably somewhere in the bst thread ... needle ... hay [noparse]:)[/noparse]

    No, it's not. It's a special I knocked up for Steve. I'm still wrestling with some command line parameter changes required to do what it needed to do for the debugger, so I've not uploaded the binaries yet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
  • kuronekokuroneko Posts: 3,623
    edited 2010-02-04 13:25
    OK, no rush [noparse]:)[/noparse]
  • LeonLeon Posts: 7,620
    edited 2010-02-04 14:24
    I can't get the Windows executable to run with Windows 7 x64 on my laptop, it doesn't even let me try XP compatibility mode and exits almost immediately. Has anyone else had the same problem?

    It's fine on my desktop PC with XP.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 2/4/2010 3:48:41 PM GMT
  • jazzedjazzed Posts: 11,803
    edited 2010-02-04 16:37
    Leon said...
    I can't get the Windows executable to run with Windows 7 x64
    I took some shortcuts that seem to work for XP/VISTA.
    I'll make a special that uses an installer with .net 3.5 to see if that helps.

    BIG FOOBAR: I forgot to include the BSTC special in BMA GUI Debugger V0.0. Sorry about that. Please find attached.
    BMA GUI Debugger V0.1 in the top post has the file now.

    Post Edited (jazzed) : 2/4/2010 4:49:33 PM GMT
    bstc.zip 169.3K
  • LeonLeon Posts: 7,620
    edited 2010-02-04 17:42
    Thanks. I'll try it when it's ready.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • jazzedjazzed Posts: 11,803
    edited 2010-02-06 03:59
    Version 0.2 is available now. Fixes an issue in GUI application with breakpoints.
    Leon I'll make a package for you tomorrow morning.
  • MorrisMorrisMorrisMorris Posts: 16
    edited 2011-07-07 10:02
    This tool should really be listed in the Propeller Downloads area. I've been working blind in PASM for months now, gritting my teeth and hating life. 20 hours to deadline, I find the BMA debugger. That, or it should be bundled with and featured in the BSTC manual.
  • jazzedjazzed Posts: 11,803
    edited 2011-07-07 10:23
    This tool should really be listed in the Propeller Downloads area. I've been working blind in PASM for months now, gritting my teeth and hating life. 20 hours to deadline, I find the BMA debugger. That, or it should be bundled with and featured in the BSTC manual.
    I hope the debugger doesn't consume too much of your time. I'll answer any debugger questions at all to help you make your deadline.
  • MorrisMorrisMorrisMorris Posts: 16
    edited 2011-07-07 13:24
    A rough explanation of how it works might be helpful. My project is almost entirely PASM and I'm using all cogs except one. I take it I'll need to load something into that cog for comms to the debugger app. I'm looking at the demo file now.
  • jazzedjazzed Posts: 11,803
    edited 2011-07-07 14:16
    A rough explanation of how it works might be helpful.

    The best thing to do is run the BMADebugger_demo and get a feeling for what's happening.
    Press "enter" to single step after you get the "T0.PC 008 OK>" prompt. Press ? for help.

    Basically, the COG to debug gets started with a utility which allows you to single-step code or examine/modify registers or hub memory locations. You can set a break-point at an address and hit "g" to run the COG at full speed until that instruction gets hit. The same goes for multiple COG debugging.

    The only differences between single and multiple COG debug are the way the COGs get started and the need to switch context with the "t n" command (task n). You can set breakpoints for COG 1 and hit "g" for task 1 to run and switch to task 2 with "t 2". If you have multiple COG debugging needs, you use the BMAUtility.taskstart(...) to schedule the cogs, then BMAUtility.start to start the debugger. If you only need to debug 1 cog use BMAUtility.debug.

    One thing I often have to do is start a test thread with spin using cognew(test,@stack) ... This allows Spin to communicate with the COG(s) being debugged so I don't have to play with mailbox values from within the debugger.

    Any cog to debug must have 8 free registers at COG address 0. The debugger will fill the data for you.

    The BSTC listing (bstc -ls ...) is very important for debugging because it shows addresses of instructions, labels, and comments. It also tells the addresses of DAT data. VAR data addresses are harder to understand, but generally start at the end of the SPIN code.

    The hardest thing to get used to with the user interface (besides looking up addresses in the BSTC.list file) is the way commands are parsed. The "pr" command will print all registers, when entered is shows up as "p r". The fill long command has the syntax "flN A D" and the spaces are required there. The help menu shows the expected command syntax. All data is entered as hex.

    Hope this helps.
Sign In or Register to comment.