Shop OBEX P1 Docs P2 Docs Learn Events
Best Practices / tools for PASM debugging — Parallax Forums

Best Practices / tools for PASM debugging

__red____red__ Posts: 470
edited 2011-06-13 04:54 in Propeller 1
Greetings,

So my project is going well except I seem to have an elusive bug that I'm having real problems finding.

For development I've been switching backwards and forwards between two setups depending of the type of debugging I'm doing.

1) Propeller Tool and GEAR. I *love* gear, I would marry GEAR if I could. I just wish I could get this same interface and functionality on my hardware. Speaking of hardware, that's where GEAR falls down for me - I can't simulate the hardware that I'm interfaced to.
2) Viewport - which provides visibility into variables that I wrlong out of the cog. I can't step or do breakpoints tho and I really miss this. By the time I've added enough instrumentation in my code to expose my cog's dirty little secrets I get the sense I've changed it too much.

Schrodinger's Cog as it were.

Can anyone out there suggest some tools that may help me in my plight? I have to be finished before Saturday as I'm displaying my project at Makerfaire :cool:

Thanks,



Red

Comments

  • HShankoHShanko Posts: 402
    edited 2011-06-11 19:52
    Have you tried PASD, Propeller Assembly Sourcecode Debugger, by Andy Schenk (Aribe) and Eric Moyer? It uses one cog and requires about a dozen longs prior to your assembly code, and a change in the cognew. I usually use two cognews, one commented out, for normal running and using PASD.

    I've not used GEAR. But remember PASD is a debugger, not a simulator.
  • jazzedjazzed Posts: 11,803
    edited 2011-06-11 21:01
    If you need PASM multi-cog debug ability, trace animation, and other normal ASM debugger features, use this:
    http://forums.parallax.com/showthread.php?115068-BMA-Multi-COG-PASM-Debugger-V1.9-Now-Available&p=829927&viewfull=1#post829927

    The only big drawback for me is it does not have a GUI so you must use it in hand with a BSTC list file and use your noggin' a little more. Documentation and examples are in the main file BMADebugger_Demo.spin.
  • __red____red__ Posts: 470
    edited 2011-06-12 05:42
    jazzed wrote: »
    If you need PASM multi-cog debug ability, trace animation, and other normal ASM debugger features, use this:
    http://forums.parallax.com/showthread.php?115068-BMA-Multi-COG-PASM-Debugger-V1.9-Now-Available&p=829927&viewfull=1#post829927

    The only big drawback for me is it does not have a GUI so you must use it in hand with a BSTC list file and use your noggin' a little more. Documentation and examples are in the main file BMADebugger_Demo.spin.

    The word "Wow" springs to mind.

    I've been a UNIX admin and programmer for about 15 years so the command line is my natural habitat. I'm actually pretty uncomfortable in a UI. You'd be amazed how many times my code failed to compile in the Propeller Tool because there were of an errant :wq

    Time to research to see if there is a command line version of a compiler and code-loader which will run under linux. I would be significantly more comfortable hacking with the prop if I could bring myself back into my native "gcc-like" environment.

    This debugger looks like a Godsend. Seriously, thank you :-D
  • LeonLeon Posts: 7,620
    edited 2011-06-12 05:47
  • __red____red__ Posts: 470
    edited 2011-06-12 05:51
    Jaw-to-the-floor.

    I feel like an idiot now since I've been running around in unfamiliar environments for the entire time outside of my comfort level. Is there a list somewhere of all propeller tools somewhere? Given the insane amount of churn on this forum I'm guessing that if it existed it's twenty pages from the front by now if it wasn't stickied.
  • jazzedjazzed Posts: 11,803
    edited 2011-06-12 08:16
    The Propeller sticky lists most of the available tools. It does need some updates though.

    BSTC is available here: http://www.fnarfbargle.com/bst/bstc/Latest/ Choose your OS version.

    I use bstc and the attached uterm serial console all from my favorite text editor.
    Using the script below, I never have to switch windows except for loading the list file.

    My normal build script is shown below. Syntax is "run Spinfile.spin portname"
    The bstc list file will be called Spinfile.list - it is rich with spin/pasm info.
    c:\bstc>more run.bat
    @rem remove -ls to stop creating .list files
    bstc -ls -d %2 -p0 -Ograux -L c:\bstc\spin %1
    @rem Hit ESC to exit uterm.
    uterm %2 115200
    

    A uterm command line binary is attached that runs on Windows and Linux with mono (Mac too?).
    Full source is also attached.

    I copied spin object library files from C:\Program Files (x86)\Parallax Inc\Propeller Tool v1.2.7 (R2) to c:\bstc\spin . Also I put all the BMAD files including FullDuplexSingleton.spin into c:\bstc\spin .

    The only time I use Propeller Tool is for finding the Datasheet, Manual, or Character chart in Help.
    If you need to remove the silly parallax font from spin files for ASCII editors, i have a tool that will do that too.
  • Heater.Heater. Posts: 21,230
    edited 2011-06-13 04:54
    There is also the HomeSpun command line Spin compiler by mpark. http://propeller.wikispaces.com/Homespun+Spin+Compiler

    There is a nice assembler here, no Spin just assembler: http://forums.parallax.com/showthread.php?89141-Standalone-cross-platform-Propeller-assembler

    As you have a problem with :wq in your Spin source I see yo also need syntax highlighting from Spin in vi/vim http://forums.parallax.com/showthread.php?118328-Spin-syntax-definition-for-Vim

    For the emacs users there is http://forums.parallax.com/showthread.php?131311-Emacs-Propeller-mode-available
Sign In or Register to comment.