SimpleIDE using Spin
Rsadeika
Posts: 3,837
In the Propeller forum I have a thread going called the DNA-RTC board, I listed a program for testing out the use of uSD card. When I was compiling I noticed this line: "Loading E:/PropGCC_SimpleIDE/Spin/MasterDNARTC/MasterDNARTC.binary to hub memory". What does this part mean "...MasterDNARTC.binary to hub memory", what part is going to hub memory, and what part is in cog memory?
So far the new and improved SimpleIDE is working very well. I am using 0.8.1, and the Spin part is also working just fine, so far. One question I do have is, what are the commands for using the Console window to see print strings and characters? In my Spin program I did a pst : "Parallax Serial Terminal", every time the program has a pst.Str(string(13, "Failed to MOUNT!",13)) command and I run it via the "Run Project with Console" I do see the "Failed to MOUNT!" string. Is this the only way to get strings and characters to be printed on the Console screen while using Spin?
Ray
So far the new and improved SimpleIDE is working very well. I am using 0.8.1, and the Spin part is also working just fine, so far. One question I do have is, what are the commands for using the Console window to see print strings and characters? In my Spin program I did a pst : "Parallax Serial Terminal", every time the program has a pst.Str(string(13, "Failed to MOUNT!",13)) command and I run it via the "Run Project with Console" I do see the "Failed to MOUNT!" string. Is this the only way to get strings and characters to be printed on the Console screen while using Spin?
Ray
Comments
SimpleIDE runs either BSTC or SPIN to compile programs to .binary files. All Spin programs are loaded to HUB memory. Spin programs are run by the interpreter that resides in COG memory at boot time. Your program is responsible for starting COGs.
You may need to adjust the terminal options for the output to appear correctly. See attachment.
I have a program like this running.
Ray
Only projects.
Yes, it looks like a COG.
Ray
The serial terminal baud rate is not "sticky" right now. I plan to fix that. Hopefully that will fix the problem you're seeing.
The other possibility is that by opening the serial terminal without a "Run Project" command may be toggling DTR - I have no control over this if it is not part of a compile, load, and run sequence provided by SimpleIDE.
When you say "but on few occasions (now being more often) the console starts up" ... is the terminal started with "Run Project with Console" (the blue play button) or separately by clicking the little display button?
Maybe Rick (@mindrobots) can help characterize and solve this issue?
That's a little extreme. No idea why it would be required.
When this happens, does it help to press the stop button without closing SimpleIDE?
When you close SimpleIDE, is it still running according to Windows Task Manager?
Yes, I always use the blue play button.
Pressing the stop button has no affect on the Console screen. I am pretty sure that SimpleIDE gets closed, because I have never seen two or more SimpleIDE Icons at the bottom of the screen, or whatever that bar is called at the bottom.
Ray
The only way I know to start Windows Task Manager is to press Ctrl+Alt+Delete and choose "Start Task Manager".
Choose the "Processes" tab and sort on "Image Name".
Please look in "Task Manager" for any leftover SimpleIDE copies when it is not on the task bar.
Ray,
Some pointers/tips on working with PropForth:
1) once you load PF into EEPROM on the Propeller you are working with you should have little need to go back into a SPIN tool and recompile the kernel itself. If you end up destroying the kernel somehow, you can always reload it from the .SPIN source but usually you can just reset the Prop to recover.
2) until the terminal in SimpleIDE has some more features (no offense, Steve), it's better to use something like TeraTerm (on Windows) or CoolTerm (on Mac) or your favorite terminal on Linux.
3) Unless you are just playing around, the usual development cycle on Propforth involves typing the word definitions into a file with your favorite editor, cutting from that file and pasting into your terminal program and then testing your creation through the terminal program. You'll have lots of cuts and pastes and maybe a file of handy little forth snippets all open at the same time. Often times, you'll start off your working file with an empty definition like ": mark_dev_session ;" - at any point, you can tell forth "forget mark_dev_session" and it will clear out anything you've done so you can start over. This is also a good way to mark pieces of application vocabulary in files so you can load them, use them and then forget them. Check out most of the .f files that come with PropForth, they use this technique in some way.
4) At this point, it's a cycle of iterative and refined development between editor and PropForth session on the terminal.
Having a terminal you can paste code samples into makes playing with PropForth much easier.
If you get something you like and really want to make part of the kernel, you can use the "saveforth" word to create a new forth image and put it into EEPROM. For the most part, it's becoming easier and more common to put your finished code on the EEPROM file system or the SD filesystem and then load them after PropForth loads.
If you have more PropForth questions, please open up a thread to discuss PropForth. SimpleIDE does well in compiling it and getting the Propeller but once that is done, it's out of the picture until you real messed up the kernel and need to reload a fresh copy from the source. With a new thread, we won't clutter up SimpleIDE with all this forth talk.
There's even a version of PropForth (should be generally released soon) that will go up to 230,400baud on the terminal session. PM me if you want a copy or like I said, it should be generally available in a couple of weeks.
Thinking about burning, I might have to try using SimpleIDE to burn PropForth to the uSD card, and see how that works on my DNA board, but wait, the board does not have a single LED that I could test programs with. Sitting here scratching my head ...
Ray
<edit> I just tried to burn the uSD card on the DNA board using SimpleIDE with the Spin compiler/component, that did not work. I guess that only works while working with C/C++.
That's right. This feature is disabled in version 0-8-4+ (or earlier). We have no control over the clock frequency, etc... used in SPIN, so it doesn't make sense to enable it.
What I did this morning was to try to use SimpleIDE as a Spin compiler, nothing more, and nothing less:
-> Start SimpleIDE
-> Select Spin Compiler
-> Start typing text in the text editor window
-> Select Save to save the file
-> Select the Cog icon (Set project) if you want to compile and run
I do not think that this any more complicated or more intrusive than using the Propeller Tool. I do not get it, this seems to be a good fit for somebody that has used the Propeller Tool, as a beginner or has moved on to be an expert.
The only suggestion that I have is when you select the Spin compiler, the editor should be in Spin mode, and not just a plain text editor. Also, when you do choose to run the program, have something pop that says "Not set for a project" or given a choice to set it as project or save and close. Maybe further discussion is needed here, at the moment I am at a loss as to what the problem is.
Ray
A quicker way to start Task Manager is to hit Ctrl-Shift-Esc...
From the command prompt, you can start it with the "taskmgr" command.
You can use the "tasklist" command to quit running processes from the command line; use "tasklist /?" (or Google) for more info.
Just sayin' :-)
===Jac
Thanks!
To each their own I guess. When Parallax asks for compile whatever is shown, then I'll consider it.
Right now the file must be saved before it is recognized as a SPIN file. I'll look at "Not set for project" ...
What problem do you mean?
Just wanted to reiterate, the "Projects" problem. Since it only concerns a few people, then maybe it's not such a big problem.
I am curious about one thing though, how many people are really using Spin, within the SimpleIDE program? Maybe SimpleIDE Spin needs to advertised more.
It was mentioned, in another thread, that Roy E. will be doing something with Spin, as it pertains to the Propeller II? Is Parallax trying to set up some kind of competitive atmosphere with the SimpleIDE project? I think, pretty soon people are going to start to wonder what tool they are supposed to use with the Propeller, in order to avoid an EOL of the particular tool that they are using. I think maybe an explanation needs to be announced here.
Ray
SimpleIDE is a graphical user interface for C/C++ and Spin development. It does not compile anything itself but rather farms that work out to other programs. propgcc for C/C++. Roy' Spin compiler for Spin. There is no competition there. Well, except SimpleIDE can also use BradC's BSTC for compiling Spin.
There is something of a competition between SimpleIDE and the existing Prop Tool. Given that the Prop Tool is closed source and Windows only I suspect it will be coming to end of life soon or at least not being enhanced for Prop II.
Ray
Not requests, per se, but endorsements at least.
-Phil
Ray
They did not tell me anything like that directly in email today, and I was in contact with Chip and Ken this morning about the "spin-y-ness" of SimpleIDE and other subjects. While your input is valuable on this forum, it does have limits and is actually counter-productive in this case.
For example, your disapproval of SimpleIDE has led to a drop in participation, and that is bad because there is more to the IDE that should be exercised other than its spinnyness. Propeller tool doesn't work natively on Mac/Linux. Propeller tool is not multilingual. These are some key requirements that SimpleIDE meets so far.
I was told to "never mind" some things and continue to do the best I can given the circumstances.
It is. This was started by Parallax: https://sites.google.com/site/propellergcc/
This appears to be Phil's goal. He's a C/C++ o-phobe like others here and can't see past his own narrow opinion of it.
I'm not giving up.
-Phil
Well I am. Maybe after PhiPi and Parallax get together, and determine the outcome of SimpleIDE, I may have to come back and revisit SimpleIDE. At this point it is not clear if SimpleIDE will exist, and I am not going to spend time on something that is more than likely to become EOL. Without something like a SimpleIDE, I do not see the point of pursuing PropGCC at the command line level.
jazzed and team, Thanks for the fine effort, but I doubt that you will be able to overcome statements like "... the shackles of C ..." coming from people that have a direct say in the future of any software that will be developed at/for Parallax.
Now, on a lighter tone, what about that Tachyon or maybe PropForth ...
Ray
Where do you get the idea that SimpleIDE will not exist. It has been adopted by Parallax, for example it is on Ken's check list of Prop II development here:
http://forums.parallax.com/showthread.php?141706-Propeller-II/page18
Why not pursue propgcc at the command line level? Compilers are used that way everyday. Anyway no matter what IDE propgcc will be here.
Also remember that SimpleIDE is an open source project. It is here and it works already very well. Even without Parallax and Jazzed support, God forbid, it will be available for use and it is such a nice program that I'm sure there are those who would want to maintain it.
You should review the "shackles of C" thread. Ultimately Chip was railing against the traditional Von Neumann computer architecture and the languages that grow up around it of which C is only one example and Spin is another (As Chip himself pointed out). The people having a direct say in the Props future have spent a lot of time, money and effort getting propgcc going. Seems to me they are very committed to the concept.
Now it's on to PropForth with SimpleIDE and having multiple "top" spin files open at the same time......I MAY need to click on a tab to select a file and THEN click on that terrible PROJECT button!! Only testing will tell!!
Please note that my statements about simplicity have nothing to do with the C aspects of SimpleIDE, only the Spin/PASM user experience. Frankly, what happens on the C side doesn't concern me one bit. If it's better for C programs to be project-oriented then that's the way they should be organized. But, in Spin programs, the "prpject" is defined implicitly by the object tree. There is no need to add the baggage of doing it explicitly. What's important in Spin is that the edit/compile/run cycle complete with the fewest keystrokes or mouse clicks possible, making rapid application development not only possible, but a joy to experience. That's what Jeff was able to accomplish with the Prop Tool and, if SimpleIDE is to become its heir apparent for Spin programming, that's what it needs to do as well. If that can be done under one roof with C, but in "Spin mode", great. If not, then perhaps a Spin-only version of SimpleIDE is more appropriate.
I want to see SimpleIDE succeed, and I'd be the last person to want to tear it down. It's a great piece of work. But it needs a little more work to make it a viable contender for Spin development.
As to my opinions of C, I've made no secret of my disdain for it (not fear, Steve ). But that doesn't mean that I think Parallax should not pursue it full-bore. They simply have to to attain a sustainable market share, and they deserve support from all of us for the effort. But just because C has been invited to the party does not make it the guest of honor. That mantle still belongs to Spin
-Phil