Shop OBEX P1 Docs P2 Docs Learn Events
Simple, but full featured Debugger - Page 2 — Parallax Forums

Simple, but full featured Debugger

2

Comments

  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-11-26 06:36
    Hanno - I am drooling. Thank you for clarifying.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
    www.tdswieter.com
  • SRLMSRLM Posts: 5,045
    edited 2008-11-26 07:01
    I hope that it has a slim and efficient starting guide... Sounds good.
  • rhuggrhugg Posts: 14
    edited 2008-12-21 21:13
    Hanno, when do you plan on releasing your debugging tool? This looks great. I'm back looking at the Propellor for some earth science projects and
    this would be a great help.
  • HannoHanno Posts: 1,130
    edited 2008-12-22 23:45
    I'm basically done with the debugger code- will post video tutorial and manual in next couple days. I've successfully tested it with my various projects- as long as you're using ViewPort, no changes are required to get you complete debugging support. If you want to help out with beta testing send me a pm.. I've been busy lately with integrating ViewPort with OpenCV to greatly simplify computer vision programming with the Propeller. From spin, you'll be able to get x,y positions of recognized objects, faces, blob, etc... Also, been busy with the dancebot- here's an article:
    www.stuff.co.nz/thepress/4801688a26834.html
    Hanno
  • HannoHanno Posts: 1,130
    edited 2009-01-13 10:57
    It's taken a bit longer than expected (partly due to the holidays, but also the complexity), but I'm getting close. Here's a video showing both the debugger and the OpenCV integration:
    mydancebot.com/v41.wmv


    See a couple posts down for the YouTube video...
    Hanno

    Post Edited (Hanno) : 1/15/2009 8:26:27 AM GMT
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-01-13 13:56
    Hi Hanno,

    looks pretty good !

    When can I purchase it ?

    best regards

    Stefan
  • statemachinestatemachine Posts: 24
    edited 2009-01-13 15:13
    ·I will certainly be adding that to Viewport,Hanno.
  • HannoHanno Posts: 1,130
    edited 2009-01-14 05:38
    For people anxious to learn how to use the debugger- here a quick reference (very similar to "Visual Studio"):


    In the code view you're able to edit code- with familiar "Propeller Tool" syntax highlighting. After pressing the triangular "play" button to "start debugging", you can:
    - set a breakpoint by clicking on the line number you wish to pause the program at. Once the cog running your program reaches this line, it will pause execution
    - resume from a breakpoint by clicking the "play" button again. To remove your breakpoint, click the line number again.
    - pause your code where it's currently executing by clicking the "pause" button.
    - step into functions called by a line of spin code by pressing the "step into" button
    - step over a line of spin code by pressing the "step over" button
    - step out of a function by pressing the "step out" button
    - view the call stack window to see which functions were called to get to the current state
    - the watch window shows variables you've shared with ViewPort- including their address in main Propeller memory and their value. Click on the address to scroll the "Memory" window to that
    address. Click on the value to change it.
    - the profiler shows how much time is spend in different functions
    - the memory shows a complete snapshot of the Propeller's 32kb main
    memory- taken at each step
    - the command interpreter window lets you interact with the debugger:
    - "h": for a help listing
    - "set VAR=VALUE": sets variable named "VAR" to "VALUE"
    - "print VAR": prints the value of variable named "VAR"
    - "r":run until breakpoint
    - "s":step 1 line of spin code
    - "sN":step N lines of spin code
    - "p" : pause execution
    - "w VAR=<>VALUE":conditionally runs while variable "VAR" =<> "VALUE"
    - "u" VAR=<>VALUE":conditionally runs until variable "VAR" =<> "VALUE"
    - "a":animates the program, by taking ~5 steps/second
    - mouse over a shared variable to see it's value or change it.
    - load a file by clicking "File:Open" or selecting from the file browser
    - save a file by clicking "File:Save"
    - view a spin project's objects in the Object view
    - view a spin file's documentation by clicking the "Documentation" button
    - manage multiple spin files in tabs, close with the "x" button.
    - use any of the other ViewPort windows while you're debugging

    Hanno
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-01-14 19:11
    Thanks, Hanno.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH - Electronics: Engineer - Programming: Professional
  • HannoHanno Posts: 1,130
    edited 2009-01-15 08:22
    Here is the official YouTube video of the Debugger Plugin to the upcoming ViewPort v4.1:

    YouTube 4 minutes

    I hope to start public beta of v4.1 tomorrow...
    Hanno
  • EricGarlicEricGarlic Posts: 41
    edited 2009-01-15 23:57
    Watched the video. Brilliant, especially for us more novice (propeller) users familiar with studio. My son will love it. So where is it (eager as ever)? Eric
  • HannoHanno Posts: 1,130
    edited 2009-01-17 01:03
    Eric (and everyone else)!

    Here it is!
    ViewPort v4.1 Beta Thread

    Hanno
  • HannoHanno Posts: 1,130
    edited 2009-01-22 21:00
    terminal.png
    My buddy Andy requested a feature for ViewPort to send strings back and forth within the Debugger- here it is!!! jumpin.gif
    (Look at the "terminal" pane in the lower right.)
    My spin program started by "txting" me a message "Type your name"
    It then waited while "InStr[noparse][[/noparse]0]==0". Notice that your program could do anything it wanted, ViewPort takes care of all the communication details in its Conduit cog...
    When I type "hanno" into the terminal window in the debugger, it's sent to the InStr variable, and my spin program resumes by txting me a "Hello Hanno".

    And everything is easily debuggable- you can step through the spin program line by line (notice the breakpoint on line 36, and line 34 being executed) while watching the global memory change as the "bytemove" instructions do their stuff. In this case, our string is at address 0AF0...

    This is important because ViewPort now caters to all styles of debugging:
    - you can watch the states of the IO pins change over time to debug hardware communication issues
    - you can watch variables in your program change over time and change them
    - you can step over instructions, set breakpoint, watch memory, use a profiler...
    - AND now you can use a terminal to send strings back and forth

    ALL AT THE SAME TIME IN THE SAME PROGRAM! (notice the DSO, LSA tabs I could click to access that functionality)
    Hanno
  • SapiehaSapieha Posts: 2,964
    edited 2009-01-27 14:48
    Hi Hanno


    ·have strange problem with Debuger.
    See attachments. It is not always it becomes but is very irritating.

    In spin file is 3 places that I marked with ____ that·is double and cant compile.
    In Error massage it is wrong place that it point to.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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

    Post Edited (Sapieha) : 1/27/2009 2:54:30 PM GMT
  • HannoHanno Posts: 1,130
    edited 2009-01-27 22:22
    Hi Sapieha,
    Thanks for posting the spin file and error message- that made it easy for me to figure out what was wrong.
    Looks like I included a corrupted spin file as a tutorial in the beta. Attached is the correct version.
    Hanno
  • SapiehaSapieha Posts: 2,964
    edited 2009-01-27 22:57
    Hi Hanno

    It is one more file You must test.
    It has same problem that RS232.
    File name is ___ 05_Simulated Weather Station.spin

    My questions

    1.·why it is always ---- Line 7 error

    2. In Yourpost You have versipn 41F but on thread that have link to download You have only version 41E --- why?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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

    Post Edited (Sapieha) : 1/27/2009 11:16:42 PM GMT
  • SapiehaSapieha Posts: 2,964
    edited 2009-01-27 23:13
    Hi Hanno.

    One more question.

    On Propeler pins inhardware window Pins not clears with start on next exercise
    why?
    In my opinion it is wrong

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • HannoHanno Posts: 1,130
    edited 2009-01-29 01:29
    Hi Sapieha,
    Another good find. Should be the last one- I checked the rest of the tutorials. The correct file is attached... This one is fun to run through the debugger- to see how the sine value is calculated...
    V4.1f is coming soon- I'm testing everything right now.
    I'll have better error reporting in that release...
    Thanks for the feedback!
    Hanno
  • HannoHanno Posts: 1,130
    edited 2009-02-03 01:19
    Ok, beta of ViewPort is here

    Some new goodies:
    - support for Propeller float type
    - support for Propeller string type
    - new terminal, see tutorial #16
    - improved OpenCV, better interface, runs continuously (even while other tabs are up), and lets you use either a webcam, a propeller frame grabber, an avi file, or images...)
    - lots of fixes

    Hanno

    Post Edited (Hanno) : 2/8/2009 4:12:04 AM GMT
  • SapiehaSapieha Posts: 2,964
    edited 2009-02-03 16:04
    Hi Hanno.

    Look on pictures 1 and 3 it is same test program but not same pins active.
    In my opinion it is not corect in Hardware window.
    In 3 picture active Pins is from runing Test 2.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
    832 x 844 - 167K
    832 x 845 - 172K
    835 x 846 - 171K
  • HannoHanno Posts: 1,130
    edited 2009-02-03 19:09
    Sapieha,
    Thanks for the very clear explanation of the bug. Now I can fix it! And good to see v4.1F running well on your PC!
    Hanno
  • SapiehaSapieha Posts: 2,964
    edited 2009-02-03 19:47
    Hi Hanno.

    I have one problem on 4F.

    If my Port hangs I must disconect it and reconect again.
    On 4F if·I do so I have na Error masage that I post in Error.txt file

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • HannoHanno Posts: 1,130
    edited 2009-02-03 20:07
    Hi Sapieha,
    Please help me understand this bug. First- when does your port hang? And what happens- how do you know the port is hung? By disconnect/reconect, do you mean physically removing the USB propplug? Or just clicking the "connect" and "stop" buttons inside of ViewPort? And lastly, I don't recognize the error messages- how did you get them? Maybe take a screenshot?
    Hanno
  • SapiehaSapieha Posts: 2,964
    edited 2009-02-03 20:42
    Hi Hanno.

    " By disconnect/reconect, do you mean physically removing the USB propplug? "
    Yes.

    Port1. Port physically hangs.
    Port2. I physically disconect it.
    Port3. physically reconected. Masage that in picture else that masage I posted before in Error.txt

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
    1011 x 785 - 182K
    1087 x 779 - 193K
    1110 x 780 - 195K
  • SapiehaSapieha Posts: 2,964
    edited 2009-02-04 00:37
    Hi Hanno.

    I have one question on PIN's in hardware window.
    In instructions and on Proto Board its have numbers from ..... 0 to 31 and on Your's window from ... 1 to 32.
    It is not beter have same numers in both.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • HannoHanno Posts: 1,130
    edited 2009-02-04 00:45
    Sapieha,
    I fixed the pin numbering so it goes from 0..31, fixed the pins so they blank when they're not updated. I added a "send error report" feature so users can send me lots of detail when they encounter a bug. Still trying to figure out your reset issue.
    Hanno
  • SapiehaSapieha Posts: 2,964
    edited 2009-02-04 00:57
    Hi Hanno.

    One very strange error.

    1. I ran RS232 test in debug mode.
    2. Under runing this test I shifted to LSA mode and program stil run OK.
    3. Then I shifted to DSO and that error come up (see picture)

    Ps.·It loses program totally with beep as result.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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

    Post Edited (Sapieha) : 2/4/2009 1:03:20 AM GMT
    1600 x 1200 - 429K
  • HannoHanno Posts: 1,130
    edited 2009-02-04 04:41
    Hi Sapieha,
    I put together another release. Try it out:
    ViewPort Beta
    Hanno

    Post Edited (Hanno) : 2/8/2009 4:12:32 AM GMT
  • SapiehaSapieha Posts: 2,964
    edited 2009-02-04 16:17
    Hi Hanno.

    I have question abaut "Conduit.spin".

    Can You rewrite it to have communications speed calculated from effective frequency constant in HUB?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • SapiehaSapieha Posts: 2,964
    edited 2009-02-04 20:07
    Hi Hanno.

    More problem with shift tabs

    Masage "Problem" and text on it translated from Swedich

    ** The arithmetical operation caused spill **

    Look picture

    Ps. After that not posible to stop ViewPort program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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

    Post Edited (Sapieha) : 2/4/2009 8:12:27 PM GMT
    1294 x 768 - 180K
Sign In or Register to comment.