Shop OBEX P1 Docs P2 Docs Learn Events
Single Step program "00_Debug" with ViewPort starting with the very first instr — Parallax Forums

Single Step program "00_Debug" with ViewPort starting with the very first instr

Jim ColemanJim Coleman Posts: 52
edited 2009-03-11 15:25 in Propeller 1
Hi,

I have an XP system with a parallax demo board as a target. I am trying to single step the program "00_Debug" from the very beginning of the program: instruction b:=200, right after vp.share(@a,@c).· No matter what I do or how I do it with breakpoints, the program does not stop, the very first time, at the instruction: b:=200. ·How do you stop the ViewPort debugger at the very first instruction of a spin program so that you can·single step using the "s" command from that point.

Jim

Comments

  • HannoHanno Posts: 1,130
    edited 2009-03-11 06:57
    Hi Jim,
    I'm still trying to come up with a real way- which would be included in the upcoming bug fix release.
    It takes a while for the debugger to "connect" to the program running in the Propeller. During this time, the Propeller has already started running it's program. One workaround is to start your spin program with a pause:
    waitcnt(cnt+clkfreq)
    should do it...
    Then, set a breakpoint/single step and you should start at the beginning.
    Hanno
  • Jim ColemanJim Coleman Posts: 52
    edited 2009-03-11 13:21
    Hi Hanno,

    Thanks for your fix.· I also used a time delay to hold the main program until your cog kicked in.· My favorite simple spin command to control cog synchronization is "repeat": in this case "repeat 1000000" did the trick.· It will take a while to train-up on all the features of your ViewPort creation.· Using ViewPort has sure made programming the prop more interesting and enjoyable.

    Jim
  • SapiehaSapieha Posts: 2,964
    edited 2009-03-11 15:25
    Hi Hanno.

    It is not posible to ad to "conduit" in debug mode Wait to Start Program on first Debuger command?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
Sign In or Register to comment.