Shop OBEX P1 Docs P2 Docs Learn Events
Stepping through a spin program line by line — Parallax Forums

Stepping through a spin program line by line

CassLanCassLan Posts: 586
edited 2010-02-01 23:14 in Propeller 1
I was using Ariba's PASD to do some PASM learning, I found the step feature to be the most helpful for me while I monitored the memory contents.

Is there any way to do this with a spin program? Does ViewPort do this?

Thanks,

Rick

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PrEditor·- Text Editor


NYC Area Prop Club





·

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2010-01-31 01:42
    Try my debugger (see the Tools link in my signature). It does both spin and pasm and you can switch between them interactively so you can actually trace a spin instruction in pasm. Unfortunately, it is not the easiest to setup. It takes zero footprint in the cog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • HannoHanno Posts: 1,130
    edited 2010-01-31 03:42
    Hi Casslan,
    Yes, ViewPort let's you step through spin code- just like in Visual Studio. You can step into functions, step over them, or step out of a function. You can also set a breakpoint and have it run until it hits the breakpoint.
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • CassLanCassLan Posts: 586
    edited 2010-01-31 04:40
    Hanno thats great, maybe its implied, but before I posted this question I went to the Hannoware website and looked for the word "step" in the features page about viewport, I guess now thinking about it, if you can monitor and change variables, then you must have to be able to pause the program thats running in order to do that.

    And I see that as the top bullet point on the parallax page now.

    I will download it and give it a go as I think it will really help me wrap up the loose ends in PrEditor.

    Clusso,

    Do I need to load a different Spin interpretter to use the one you mentioned?





    Rick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PrEditor·- Text Editor


    NYC Area Prop Club





    ·
  • HannoHanno Posts: 1,130
    edited 2010-01-31 06:39
    Hi Rick,
    Yes, ViewPort can pause your program to let you view and change variables.
    However, it also let's you monitor variables as the program is running, by graphing your data. There's a nice review in my signature... It also talks about the debugging features. I'll update my website soon- building new features is more fun than writing about them...

    Here's the original thread about ViewPort's debugger: http://forums.parallax.com/showthread.php?p=760083
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-01-31 08:05
    Rick: Yes, it is a soft interpreter which comes in the software package.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • matbmatb Posts: 39
    edited 2010-02-01 09:57
    I've been looking for a debugger too. (Since I don't do windows, Viewport sadly is out)

    I've been updating the wiki page with the latest detail I could find.
    I am going to give SPUD a try as seems the best/only alternative.
  • CassLanCassLan Posts: 586
    edited 2010-02-01 13:45
    Hey let me know how that goes, I've been giving ViewPort a go but am having an error about " ) " when I try to use the debug feature

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PrEditor·- Text Editor


    NYC Area Prop Club





    ·
  • HannoHanno Posts: 1,130
    edited 2010-02-01 19:06
    Matb,
    A decent number of people are running ViewPort under emulation (wine, Parallels) on OSX and Linux. Let me know if you need help setting that up.

    CassLan,
    Sorry to hear about your problem- sounds like it's related to a custom configuration string? You can create those with ViewPort's configuration wizard. Feel free to pm me for help...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2010-02-01 22:48
    I've found ViewPort to be a great tool to look into code and watch variables but it's compiler does seem to be buggy at times.
    If you run into one of those ')' and '[noparse][[/noparse]' errors, save your code file and load it into the Parallax Prop tool and update the compile.
    It will tell you exactly where (or if) the error is.
    When you go back to ViewPort, all is well.
    Jim-

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent!
    Send $1 to CannibalRobotics.com.
  • BradCBradC Posts: 2,601
    edited 2010-02-01 23:14
    Hanno said...
    A decent number of people are running ViewPort under emulation (wine, Parallels) on OSX and Linux.

    Under WINE? Really? That might be interesting. More information please.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
Sign In or Register to comment.