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.
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
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
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
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
My buddy Andy requested a feature for ViewPort to send strings back and forth within the Debugger- here it is!!!
(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
·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.
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
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.
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.
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
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
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.
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.
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
" 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.
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,
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
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.
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.
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.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
this would be a great help.
www.stuff.co.nz/thepress/4801688a26834.html
Hanno
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
looks pretty good !
When can I purchase it ?
best regards
Stefan
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH - Electronics: Engineer - Programming: Professional
YouTube 4 minutes
I hope to start public beta of v4.1 tomorrow...
Hanno
Here it is!
ViewPort v4.1 Beta Thread
Hanno
My buddy Andy requested a feature for ViewPort to send strings back and forth within the Debugger- here it is!!!
(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
·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
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
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
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
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
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
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
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
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
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
" 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
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
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
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
I put together another release. Try it out:
ViewPort Beta
Hanno
Post Edited (Hanno) : 2/8/2009 4:12:32 AM GMT
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
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