Spin Unit Debugger (SPUD) WIN32 Cut
jazzed
Posts: 11,803
SPUD stands for Spin PASM Unit Debugger. PASM debug will be added after Spin is done.
Spud is a spin debugger that is similar to gdb, and is available for Linux and Windows running Cygwin.
All you need to add for Spud debug ability is to add code like below and run the spud debugger:
The serial port is added separately as a convenience. To remove the debugger, comment out v.start (and optionally comment v: "SpudVMM"). For normal serial port use, you can change SpudSerial to FullDuplexSerial if you like, but you don't have to. Spud needs SpudSerial to function because of the per/line checksum it provides.
Spin debugging is currently single COG only, and selecting a COG by spin "thread" may be supported later. Some thought has been given to adding COG PASM debug ability which would also be selectable by "thread". Both of these will require more invasive spin/pasm code changes than I like though.
Spud uses BSTC to build spin and a simple loader to download the spin program.
The attached spud_linux_aug20.tar includes the spud program, bstc, and SpudDemo.spin (etc...).
Users should tar -xvf spud_linux_aug20.tar . This will create a directory called release.
Forum software will not allow attaching tar.gz files.
SPUD takes parameters as:
If you specify a baud-rate, it must match the debugger startup serial port rate.
Today SPUD will work with the main Spin program. There is no provision for swapping SPIN COG "threads" or debugging COG code yet. I do plan to add multiple COG support later.
Examples of using SPUD are in this forum topic. A user guide will be crafted in time. Meanwhile, play with the program using some of the interaction examples and post feedback.
A generic Windows 32 variant is now available. Please download winspud.zip (not the cygwin zip).
Windows 64 bit platform users should use Cygwin and the spud_cygwin* package.
Cheers.
Post Edited (jazzed) : 2/1/2010 4:24:39 PM GMT
Spud is a spin debugger that is similar to gdb, and is available for Linux and Windows running Cygwin.
All you need to add for Spud debug ability is to add code like below and run the spud debugger:
obj v : "SpudVMM" s : "SpudSerial" pub FirstMethod s.start(31,30,0,115200) v.start ' your code starts here
The serial port is added separately as a convenience. To remove the debugger, comment out v.start (and optionally comment v: "SpudVMM"). For normal serial port use, you can change SpudSerial to FullDuplexSerial if you like, but you don't have to. Spud needs SpudSerial to function because of the per/line checksum it provides.
Spin debugging is currently single COG only, and selecting a COG by spin "thread" may be supported later. Some thought has been given to adding COG PASM debug ability which would also be selectable by "thread". Both of these will require more invasive spin/pasm code changes than I like though.
Spud uses BSTC to build spin and a simple loader to download the spin program.
The attached spud_linux_aug20.tar includes the spud program, bstc, and SpudDemo.spin (etc...).
Users should tar -xvf spud_linux_aug20.tar . This will create a directory called release.
Forum software will not allow attaching tar.gz files.
SPUD takes parameters as:
C:\>spud Usage: spud -c <ComPort[noparse][[/noparse]:baud]> -l <Loader> [noparse][[/noparse]-b <Compiler> -o <CompilerOptions> -s <StartupFile>] <Top Spin File>
If you specify a baud-rate, it must match the debugger startup serial port rate.
To run SPUD on an i686 linux box with a FTDI USB port PropPlug, use the command: ./spud -b ./bstc -c "/deb/ttyUSB0" spin/SpudDemo.spin To run SPUD on an i686 linux box with a standard serial port ttyS0, use the command: /spud -b ./bstc -c "/deb/ttyS0" spin/SpudDemo.spin
Today SPUD will work with the main Spin program. There is no provision for swapping SPIN COG "threads" or debugging COG code yet. I do plan to add multiple COG support later.
Examples of using SPUD are in this forum topic. A user guide will be crafted in time. Meanwhile, play with the program using some of the interaction examples and post feedback.
A windows command line version with Cygwin is attached as spud_rel_aug20.zip. To run SPUD on a cygwin enabled Windows PC with Propeller on COM1 use the command: ./spud -c COM1 spin/SpudDemo.spin To run SPUD on a cygwin enabled Windows PC with PropPlug on COM8 use the command: ./spud -c COM8 spin/SpudDemo.spin
A generic Windows 32 variant is now available. Please download winspud.zip (not the cygwin zip).
Windows 64 bit platform users should use Cygwin and the spud_cygwin* package.
A Windows 32 command line version is attached as winspud.zip. To run SPUD on a Windows 32 PC with Propeller on COM1 use the command: winspud -c COM1 SpudDemo.spin To run SPUD on a Windows 32 with PropPlug on COM8 use the command: winspud -c COM8 SpudDemo.spin On windows, COM10+ will not work. The windows BSTC spin compiler (v.15) is now included.
Cheers.
Post Edited (jazzed) : 2/1/2010 4:24:39 PM GMT
Comments
Here is a current startup example:
Below is a step/debug example.
In this example I have to change the Tv_Text:start(basepin) with "p basepin=20"
so my monitor will work with my PropellerProtoboard.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Post Edited (jazzed) : 8/20/2009 5:28:06 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.
Robots are microcontrolled.
I am microcontrolled.
But you·can·call me micro.
If it's not Parallax then don't even bother.
I have changed my avatar so that I will no longer be confused with others who use generic avatars (and I'm more of a Prop head then a BS2 nut, anyway)
I was thinking about converting this to Perl at some point. Maybe Phil P. can whip out a C -> Perl converter ?
Here is a new screen dump update.
The variable running shows starting up as -1 because the debugger has already been initialized (a la Cluso99).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Post Edited (jazzed) : 8/20/2009 5:29:07 PM GMT
Aaaah, nooooo!
I don't know C.
-Phil
TIA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Any idea if it would compile with Catalina? (XMM version ofcourse)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
Having a little trouble for some reason with "/dev/ttyS0" but "/dev/ttyUSB0" works.
Object file names are a little case sensitive [noparse]:)[/noparse]
I'll post a package link later today.
Edit: Fixed menu alignment that didn't copy paste very well from xterm.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Post Edited (jazzed) : 8/20/2009 5:30:04 PM GMT
My main machine is an Ubuntu box. Cad box is an XP64 box, that also runs ViewPort and PropTool.
I recently started using BST on my Ubuntu box, and I really like it... now a debugger under Ubuntu too!
And yes, I admit I asked Hanno about a version of ViewPort that will run on Ubuntu.
Thanks,
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
SPUD second cut is available in thread's first post. Normal windows command line program is not and probably won't be made available. Windows Cygwin users will however be able to use spud from the cygwin zip package. Both Cygwin and linux packages include copies of bstc and a spin/SpudDemo.spin example. I highly recommend using the spin directory for your spin files.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
A "native" Windows 64 bit version will not be created, but Cygwin makes spud possible on Windows 64 bit platforms.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propeller Tools
- Propalyzer: Propeller PC Logic Analyzer
- BMA: An on-chip PASM Debugger
- SPUD: Spin Source Level Debugger
Post Edited (jazzed) : 8/27/2009 4:50:52 PM GMTThanks to the users who downloaded 8 copies of the aug20 version. Wish I had some feedback.
A Mac version of this tool will never be created. I'm considering a cross-platform Python GUI variation.
Java for me would naturally go faster, but I don't know how kind that would be for users.
Integrating BMA PASM debugger features should be on my priority list, but for some reason that is motivationally challenging.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propeller Tools
I'm trying it out now, but being a SPUD newBud and a bit of a PASM NOOB, I'm running into some dependency(?) issues at the get go:
whereever\winspud>spud spindemo.spin
Top Spin File Path: '.\'
Top List File: 'spindemo.list'
'bstc' is not recognized as an internal or external command,
operable program or batch file.
Can't open BSTC list file 'spindemo.list'
Does BSTC need to be in SPUD's exe dir, or can it be set in a command line parm - using the win variant of the linux parm above? I tried several versions, but still get the same errror.
thanks - H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propeller Tools
- Propalyzer: Propeller PC Logic Analyzer
- BMA: An on-chip PASM Debugger
- SPUD: Spin Source Level Debugger
Post Edited (jazzed) : 8/30/2009 10:46:06 PM GMTOK I had Brads BSTC in another dir - and for whoknows why copying into the spud dir didn't work (weird). So I just overwrote it with the attachment you posted. And BINGO! it works (weirder still)
> For PASM, you might be more interested in the BMA Debugger until I fully integrate PASM threads in SPUD.
Actually, I skimmed over the very first line in your OP - and didn't notice that's pending %-)
Very nice app --- I'll noodle with it over the next week and give you some feedback as I go. Is there anything in particular you'd like us to hammer on?
- H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propeller Tools
" Having someone use an app other than me is priceless for weeding out issues "
My former coworkers used to say: "give it to Howard - if it can be broken, he'll find a way to do it" [noparse]:)[/noparse])
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
what's the correct command line syntax for passing options to the compiler? Whatever I put after the '-o' doesn't seem to take.
thanks
- Howard
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The minimum requirement for -o is "-bls -o" example: spud -c com8 -o "-bls -o" spin/SpudDemo.spin
That translates into a compile as: bstc -bls -o spin/SpudDemo spin/SpudDemo.spin
I left that there in case I got in trouble. One could use "-els -o" I guess for an eeprom file, but spud looks for a .binary .
I've attached winspud.howard (rename it to winspud.exe) you can try if you have connection problems.
You can also specify a library with it if necessary. It also fixes some problems with with local variables
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propeller Tools
- Propalyzer: Propeller PC Logic Analyzer
- BMA: An on-chip PASM Debugger
- SPUD: Spin Source Level Debugger
Post Edited (jazzed) : 9/15/2009 12:28:54 AM GMT▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Been playing with this this morning and I really like it.
On your screen dumps, it prints the actual lines of Spin Code, whenever I use the "l" command I just get the Line #s, anything I'm doing wrong?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PrEditor·- Text Editor
NYC Area Prop Club
The example package is working for me - no stepping into the serial port start of course[noparse]:)[/noparse] The demo package is rather simple though. Can you post your .zip example so I can try to reproduce your problem? PMs for problems are welcome.
Cheers.
Steve
I just gave it a whirl with the Demo Program and it lists the Code along with the Line#'s as expected.
With my code it still works, I can, stop, run,·step, peek and change variables etc, just the code listing issue.
I appreciate your help.
Rick
PS - here is what I'm working with, I have had to reduce some functionality and some buffer sizes to make room, (I'm hoping your tool will help with that)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PrEditor·- Text Editor
NYC Area Prop Club
Post Edited (CassLan) : 2/1/2010 5:04:06 PM GMT
It should be a re-compile... sort of. I'm willing to compile it if you want.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
I have lots of "Special" Characters in my program, I·pasted it into notepad, saved with a different filename, lost the Unicode stuff and now it behaves like the Demo you provided [noparse]:)[/noparse]
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PrEditor·- Text Editor
NYC Area Prop Club
·
@Ale, I didn't really think about it. I figured Mac users only want GUI programs. The program works under wine with linux, but I've never tried it on Mac.
Just replace Pred_Alpha.Spin with test.spin
One other little thing, when I use the p command:
p CursorRow=3
It will make it equal to $b3
p CursorRow=03 works well though
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PrEditor·- Text Editor
NYC Area Prop Club
I have bad news for this: I was building winspud with MSVC++ 6.0 on my old PC which crashed. I can not get it to install on my laptop (CD problems). This means I can't do bug fixes for winspud. If you want to continue using Spud, I suggest you switch to the Cygwin version. Considering the performance problems I've seen in either version, it might be difficult for me to continue developing/supporting this. You should consider using ViewPort instead.
After realizing the cause of the Unicode issue with SPUD, I also changed to ANSI and reloaded with ViewPort...it says my object has exceeded by 5374 longs..., I don't get it. I can connect to my running Prop with ViewPort, see memory changes etc..but when I go to debug it says it can't. Its very frustrating, but thats for another thread.
Are you yourself using ViewPort?
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PrEditor·- Text Editor
NYC Area Prop Club
·