Shop OBEX P1 Docs P2 Docs Learn Events
Question about DEBUG... — Parallax Forums

Question about DEBUG...

RobofreakRobofreak Posts: 93
edited 2007-12-10 01:05 in Propeller 1
Hello everyone!

I've recently downloaded Martin Hebel's BS2 function library, and tried to use his debug features, but they didn't work. When it works, does it automatically open a debug window? I just don't know...

Thanks for the support,
Austin Bowen

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Austin Bowen,

Robo-freak.com

"One must watch out for mechanics. They start out with a sewing machine, and end up with the atomic bomb" - A quote from someone that I saw on Addall.com

Post Edited (Robofreak) : 12/10/2007 2:38:59 AM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-09 17:02
    1) Saying something "didn't work" is not very useful. Say something about what you've tried and include at least code snippets showing what you did. These things do work, but maybe not under the circumstances that you are assuming.

    2) There currently is no debug window and none is opened automatically. The debug routines simply communicate over the serial port used for programming the Propeller. You have to use a program like HyperTerm or propTerm, a program available here, or any other serial terminal emulator. There are plans to add a debugging window to the Propeller Tool, but that is not available yet.
  • RobofreakRobofreak Posts: 93
    edited 2007-12-09 20:45
    I just did something simple to test it:

    OBJ
    BS2 : "BS2_Functions"

    VAR
    BYTE X

    PUB MAIN
    X := 3
    BS2.DEBUG_DEC(X)

    That's pretty much it... But, now that I know about the programs you told me about, that's probably the problem.
    Oh, and could you tell me spacifically where to find PropTerm please?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Austin Bowen,

    Robo-freak.com

    "One must watch out for mechanics. They start out with a sewing machine, and end up with the atomic bomb" - A quote from someone that I saw on Addall.com

    Post Edited (Robofreak) : 12/9/2007 9:00:56 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-09 21:44
    At the top of the list of discussion threads, there's a "sticky" one called: Propeller Announcement, FAQ and Thread Index stickies

    Go to that and look for the one called: Graham Stabler's Good Thread Index

    Go to that and you'll see a section called "Programming Tools" and you'll see an entry for propTerminal.
  • John AbshierJohn Abshier Posts: 1,116
    edited 2007-12-09 22:44
    Also, BS2 Funcitons has a Start method that needs to be called
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-12-09 22:53
    As John mentioned, see the BIG notices all over it about runing BS2.start(30,31) prior to calling other methods.

    Also, it's not the best practice to end a program so quickly. With nothing following sending data, the Cog will shut down. It may not affect BS2_Functions, but it can cause problems at times sending data. It's a better practice to keep your cog alive at the end with a single 'repeat'

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards

    Southern Illinois University Carbondale, Electronic Systems Technologies
  • RobofreakRobofreak Posts: 93
    edited 2007-12-10 00:00
    Oh, right... I did include the start program for BS2, but forgot to type it in the example above. And i'll put a repeat at the end of the program to keep things going...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Austin Bowen,

    Robo-freak.com

    "One must watch out for mechanics. They start out with a sewing machine, and end up with the atomic bomb" - A quote from someone that I saw on Addall.com
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-12-10 00:18
    Cool, then it SHOULD work once you have a terminal program. You also do not list your clock/crystal settings. Running off the internal RC oscillator can have enough error to cause problems in sending/receiving data.

    Best practice is to post correctly and as much of your code as possible so people can give informed answers. Copy and paste and use the "code" formatting buttons to keep it looking nice.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards

    Southern Illinois University Carbondale, Electronic Systems Technologies
  • RobofreakRobofreak Posts: 93
    edited 2007-12-10 01:05
    Well, I'm not at my house right now... So, I'll post what I know to do here:

    OBJ
    · BS2 : "BS2_Functions"

    VAR
    · BYTE X

    CON
    · _CLKMODE = XTAL1 + PLL16X
    · _XINFREQ = 5_000_000

    PUB MAIN
    · BS2.START(31, 30)

    · X := 3

    · BS2.DEBUG_DEC(X)
    · REPEAT


    Well, that's what I know to do. This uses an external 5MHz crystal, times 16 speed to get 80MHz. It starts up BS2, makes "X" equal 3, and debugs that. Then it repeats infinitely to keep the cog alive. That was pretty much my test program. That'll work, right?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Austin Bowen,

    Robo-freak.com

    "One must watch out for mechanics. They start out with a sewing machine, and end up with the atomic bomb" - A quote from someone that I saw on Addall.com
Sign In or Register to comment.