A delay/wait for PST
Oldbitcollector (Jeff)
Posts: 8,091
Is it possible (next time PST source is looked at) to add a function which will allow PST to send a command sequence open connecting?
This would allow us to add a little code to a Propeller program dependant on PST to detect that PST has opened and is connected before moving forward.
Right now I'm doing delays (hopeful that the user will have opened PST in time) and repeated "Press any key". A simpler solution would be to have PST send a specific character which would indicate to the Propeller that it has opened and is ready for traffic.
Thanks
OBC
This would allow us to add a little code to a Propeller program dependant on PST to detect that PST has opened and is connected before moving forward.
Right now I'm doing delays (hopeful that the user will have opened PST in time) and repeated "Press any key". A simpler solution would be to have PST send a specific character which would indicate to the Propeller that it has opened and is ready for traffic.
Thanks
OBC
Comments
An "I'm ready" string from the PST would solve all these problems. However, it needs to be coupled with a way to clear the screen when the PST is disabled, which it currently cannot do.
-Phil
Good morning Jeff,
You understand the problem. I spoke with Jeff Martin to understand his thoughts and to clarify it for myself, too. I've had the same experience but prefer Phil's approach of resetting the Propeller (not a good solution for those who download to RAM 1K times per day).
I'll draw on my BASIC Stamp experience for a moment to make a comparison that works very cleanly. First, the DEBUG tool (PST) is built right into the BASIC Stamp IDE, enabling easier COM port sharing in a single program. When the BASIC Stamp IDE encounters a DEBUG command it let's the IDE know to open a DEBUG terminal and share the COM port, making the DEBUG terminal ready to receive when the program download is finished.
Some of the considerations for doing this with the Propeller are COM port sharing between Prop Tool and PST, and the recognition of a command in Spin to launch PST. Perhaps this could be done by keying off the Propeller's PST object.
Some solutions to your request, OBC:
(a) Integration of PST/Prop Tool by Parallax engineers. This is a possibility but it's not high on the priority list given other requests. I've made a note to add it to our internal planning tools.
(b) Open-sourcing of our Prop Tool/PST. To do this requires some work with both of our Delphi programs. PST could be released today, but if a solution requires work in the Prop Tool then it must also be released. The only delay with releasing the Propeller Tool source is that it currently uses a single licensed component that allows only binary distributions. I am working with Altium who owns this component (more precisely, they bought Dream Company who previously built this component) to give us approval to release the source code. This component is part of our control edit and I've heard that it isn't something a developer would want to code. As soon as we have their approval we will release source for the Prop Tool and PST. It's possible that an outside developer would get to this before Parallax.
(c) BST. This certainly isn't Brad's responsibility and I don't expect him to be a substitute for our lack of engineering resources, but I wouldn't be surprised to see this feature in BST at some point.
In summary, this point is noted and we have added (a) to our list of Propeller Tool enhancements. The probability of (b) and (c) being solutions are also a possibility.
Thanks OBC,
Ken Gracey
Parallax Inc.
(d) ViewPort. Edit your spin or C code in a professional quality code editor- with regular expression search/replace, macros, syntax highlighting and more. ViewPort will compile and load your spin and C code (using Catalina) and then offers you several debugging tools:
- PST-like terminal
- Realtime graphing of variable values with oscilloscope, spectrum analyzer, and xy views
- Realtime graphing of the Propeller's IO pin states- with a Logic analyzer view capable of 80Msps
- Step through code line by line, set breakpoints, watch variables- just like Visual Studio
- Much more- OpenCV integration, built-in Fuzzy logic and more
See how the pros use ViewPort: http://hannoware.com/viewport/applications.php
Here's a review of ViewPort:Robot Magazine
I would prefer that Jeff works on other issues:
- Propeller tool/propellent is the only compiler I know that doesn't let you specify file directories.
- The Propeller font has numerous well documented problems
Hanno
Thank you, Hanno. ViewPort is yet another viable tool that provides solutions which we may not be able to implement. We appreciate other developers a whole bunch. Feel free to identify any suggestions that help us make you part of our team.
The priority you identify above is also the top priority for our Prop Tool improvements.
Ken Gracey
Parallax Inc.
Hanno
What about releasing the source for the Propellant DLL? Could that be more immediate?
Hanno,
I have switched over to using Viewport for all of my propeller coding. I love the debugging facilities. However, I think the main issue with Viewport for most users is the cost. Perhaps you and Parallax could work out a licensing deal that would let them offer a free version?
Yes. Two of our engineers are working to release Propellant DLL source code by the end of next week. Before any engineer reads too deep into the rest of my message, keep your expectations of my words in check with the fact that I'm a manager, not an engineer. . . got that out of the way.
There are a few caveats to consider. First, Propellant uses the same licensed edit control for unicode-based strings that we use in the Propeller Tool. This means it would be released as binary only for now, but we don't think you will have much need for the edit control in this case anyway. We are working with Altium (who bought Dream Company, who made the edit control years ago) to obtain their approval to release the source. After we get their approval [as we presently expect to occur] we will re-release Propellant to include the source for this edit control. But until then you will only have the binaries.
Next, Propellant also uses the Propeller compiler as written by Chip. The compiler is all assembly code (~8,000 lines) and we think nobody would modify this and still make it work - so we aren't certain of the benefit of releasing the compiler source. Therefore we'll give you the *.obj in the Propellant release. Ideally we'd rewrite the compiler in C so it is more useful to other people. If rewriting the assembly code in C is of particular interest to a qualified engineer we would like to hear from them. We would release their efforts as open-source.
This thread has taken a bit of a sideways tangent, but I'll ask David Carrier to reply to it once Propellant source (er, and a binary plus an object file) is posted by the end of next week.
Sincerely,
Ken Gracey
Parallax Inc.
Thanks for the kind words.
Parallax has been a good supporter of ViewPort- they've been reselling it for close to 2 years and Andy has written several PE Labs using it. I've been told many times that $149 is a bargain for its capabilities.
There is a 30 day free trial and I do offer restricted versions that cost less. A professional tool makes the Propeller more appealing to users who have a goal in mind- with ViewPort they can be more productive, debug problems faster, and they don't get stuck with their projects.
Of course ViewPort isn't perfect- it does have a learning curve- but through emails, phone calls and forums I've been able to get everyone going that has contacted me...
Hanno
This is excellent news on Propellant. I would love to talk with you about the assembler source for the compiler. I think it would be a nice challenge to "convert" it to C/C++ (or even C#), and would love to take a stab at it. Also, I have no problems with the result being open and free.
Let's talk!
I agree Viewport is a bargain for what it does. I personally don't have a problem with the price. I was just expressing what I think is a concern for a lot of the folks here who maybe can't afford the price.
Perhaps a version for non-commercial use that is cheaper or free?
I think anyone that actually tried Viewport for working with the Propeller would never go back to working without it.
Any thoughts about a multi-platform Propellent dll? I'd like to offer ViewPort/12Blocks/PropScope for Linux/Mac...
Hanno
Roy,
Although many ViewPort customers are from industry or education, a big chunk comes from hobbyists- probably a good representation of Propeller users in general. Many of those hobbyists spend hundreds of dollars on their hobby for parts- spending a small part of that on the piece that has the most impact (the debugging tool) shouldn't be such a hard decision. While electronics/robotics/computers isn't cheap- it isn't out-of-line with other hobbies like sports, movies or heaven forbid having kids...
Hanno
Ken & company know that I never mind someone running off with my thread..
The reason I'm requesting this is because PST is installed by default with the Propeller tool and I'm writing some beginner articles which use PST because "it is there". If PST had a simple checkbox added (checked by default!) which would send a single character when the Enable button was pressed. (Say character DEC 255) It would be easy enough to add a simple routine to the existing PST source which would wait until that character was received. (I'm picturing a "pst.wait")
All in all a simple thing to use, but probably a day of work for an engineer which is already overloaded.
Thanks for all the great feedback.
OBC
OBC, we will release PST as an open-source software to the community. It is written in Delphi but doesn't use any licensed controls. You have to understand that it's an adaptation of the BASIC Stamp DEBUG tool so it has remnants of the BASIC Stamp. This tool was made quickly for our Education team. Nonetheless, if we open-source this software then somebody could make the revisions you suggested above.
Expect to see this release on our open source page by the end of next week.
Ken Gracey
Parallax Inc.
Just a heads up, but bst has had this for as long as it has had a serial terminal.
I will start looking that over.
OBC
Actually, correction. the bst terminal does *not* have an init string. What it does is connect at the instant the download terminates so it's connected and running while the prop is loading cog 0. Same same but different.
Most terminal programs *do* have an init string harking back to the old AT modem days, but as the terminal in bst is loader aware, it's just not needed.
Would something as simple as this work for you? ... I use the one line 'ser.rx' all of the time during debugging. It allows me to start the PST and set it up so I that I can 'catch' certain events in a program.