Best Practices / tools for PASM debugging
__red__
Posts: 470
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
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
I've not used GEAR. But remember PASD is a debugger, not a simulator.
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
http://www.fnarfbargle.com/bst.html
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.
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.
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.
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