Shop OBEX P1 Docs P2 Docs Learn Events
SimpleIDE using Spin — Parallax Forums

SimpleIDE using Spin

RsadeikaRsadeika Posts: 3,837
edited 2012-08-14 07:38 in Propeller 1
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

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-08-05 09:36
    Rsadeika wrote: »
    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?

    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.
    Rsadeika wrote: »
    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?

    You may need to adjust the terminal options for the output to appear correctly. See attachment.

    I have a program like this running.
    _clkmode = xtal1+pll16x
    _clkfreq = 80_000_000
    
    obj pst : "Parallax Serial Terminal"
    
    pub main
    
        waitcnt(clkfreq+cnt)
        pst.Start(115200)
        pst.Str(string(13,"some output",13))
        pst.Str(string("ok"))
    
    And output is:
    
    some output
    ok
    
    812 x 550 - 73K
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-10 09:02
    I decided to try PropForth using SimpleIDE as the loader. I started SimpleIDE, I closed the open project, and opened PropForthDevKernel.spin. SimpleIDE opened the file at which time I changed the compiler to Spin, hit the "Run project with Console" button, and nothing happened. So it seems that you can not compile just a xxx.spin file, it has to be within a project structure? I thought that SimpleIDE was able to do it both ways, as a single file or as a project?

    Ray
  • jazzedjazzed Posts: 11,803
    edited 2012-08-10 10:03
    Rsadeika wrote: »
    I thought that SimpleIDE was able to do it both ways, as a single file or as a project?

    Only projects.
  • David BetzDavid Betz Posts: 14,516
    edited 2012-08-10 10:42
    jazzed wrote: »
    Only projects.
    But don't I remember there being a button that will make a project from the currently open file?
  • jazzedjazzed Posts: 11,803
    edited 2012-08-10 10:44
    David Betz wrote: »
    But don't I remember there being a button that will make a project from the currently open file?

    Yes, it looks like a COG.
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-11 07:50
    I have been playing around with PropForth, because the program needs 57600 BAUD, I have been running into a problem once in awhile. Prior to running the PropForth program I open up the Console window, and change the BAUD rate from 115200 to 57600, then I run the program. Most of the time the Console window opens up and PropForth is alive and well, but on few occasions (now being more often) the console starts up, but PropForth responds like it is in the wrong BAUD. I am not sure if this is fluke with PropForth, or SimpleIDE. To solve, I have to close SimpleIDE, and unplug the QuickStart board, and a restart seems to solve problem.

    Ray
  • jazzedjazzed Posts: 11,803
    edited 2012-08-11 08:58
    Rsadeika wrote: »
    I have been playing around with PropForth, because the program needs 57600 BAUD, I have been running into a problem once in awhile. Prior to running the PropForth program I open up the Console window, and change the BAUD rate from 115200 to 57600, then I run the program. Most of the time the Console window opens up and PropForth is alive and well, but on few occasions (now being more often) the console starts up, but PropForth responds like it is in the wrong BAUD. I am not sure if this is fluke with PropForth, or SimpleIDE.

    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?

    Rsadeika wrote: »
    To solve, I have to close SimpleIDE, and unplug the QuickStart board, and a restart seems to solve problem.

    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?
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-11 09:17
    Before I was doing less starts of PropForth program, now that I am experimenting more with PropForth I seem to lock up the Console screen, witch means I have to do a reset, and a restart.
    ... is the terminal started with "Run Project with Console" (the blue play button) ...
    Yes, I always use the blue play button.
    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?
    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
  • jazzedjazzed Posts: 11,803
    edited 2012-08-11 10:05
    Sometimes a program can still be running even it does not show up on the task bar. Windows Task Manager shows all running processes.

    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.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-08-11 10:41
    I thought you guys were talking about me!

    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.
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-11 11:58
    Thanks Rick, I was not trying to clutter up SimpleIDE forum, I just thought, because SimpleIDE is still BETA, that maybe there was a problem with SimpleIDE. So, I did what you suggested, had SimpleIDE burn the program to EEPROM, and now I have to find a suitable terminal program. I have used TeraTerm before, and I do not like it, sure it has a lot of features, but it just does not fit well with me. I also do not feel that PST is a good fit with working with PropForth, in some ways it reminds of TeraTerm.

    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++.
  • jazzedjazzed Posts: 11,803
    edited 2012-08-11 13:46
    Rsadeika wrote: »
    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.
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-12 05:22
    The SimpleIDE "Projects" issue has been brought up in another thread, by some people that I respect as being very knowledgeable in the field. Having said that I am not sure what they are complaining about.

    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
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2012-08-13 06:57
    jazzed wrote: »
    The only way I know to start Windows Task Manager is to press Ctrl+Alt+Delete and choose "Start Task Manager".

    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
  • jazzedjazzed Posts: 11,803
    edited 2012-08-13 07:04
    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!
    Rsadeika wrote: »
    The SimpleIDE "Projects" issue has been brought up in another thread, by some people that I respect as being very knowledgeable in the field. Having said that I am not sure what they are complaining about.

    To each their own I guess. When Parallax asks for compile whatever is shown, then I'll consider it.
    Rsadeika wrote: »
    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.

    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?
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-13 07:32
    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
  • Heater.Heater. Posts: 21,230
    edited 2012-08-13 07:48
    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.
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-13 12:19
    I really want to give Tachyon a shot via SimpleIDE. The best way to get to EEPROM is by downloading a binary version of Tachyon, my question, does Spin handle opening and burning the EEPROM with a binary file? If yes, how would you do it?

    Ray
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-08-13 12:25
    I believe propeller-load from the PropGCC package will load a binary into a propeller.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-08-13 12:30
    jazzed wrote:
    When Parallax asks for compile whatever is shown, then I'll consider it.
    Ken Gracey wrote:
    Our cautious goal is to make SimpleIDE the official Parallax tool for programming Propellers, but only if it has enough of the features required (like your non-project-oriented mode) to be a qualified replacement.
    cgracey wrote:
    I really like how things now just compile from RAM. You don't save anything until you want to.

    Not requests, per se, but endorsements at least.

    -Phil
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-13 13:02
    IIRC jazzed does what Parallax tells him to do, in terms of what is necessary for SimpleIDE, so I guess the two quotes are really requests. The only thing that I am concerned about is, is SimpleIDE officially backed by Parallax? If it is not then where is PropGCC Eclipse, or shall we just forget about C for the Propeller, and move on to something else?

    Ray
  • jazzedjazzed Posts: 11,803
    edited 2012-08-13 19:53
    Not requests, per se, but endorsements at least.

    -Phil

    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.


    Rsadeika wrote: »
    The only thing that I am concerned about is, is SimpleIDE officially backed by Parallax?

    It is. This was started by Parallax: https://sites.google.com/site/propellergcc/
    Rsadeika wrote: »
    If it is not then where is PropGCC Eclipse, or shall we just forget about C for the Propeller, and move on to something else?

    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.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-08-13 20:12
    jazzed wrote:
    While your input is valuable on this forum, it does have limits and is actually counter-productive in this case.
    With all due respect, I find that statement mildly offensive. I do not believe that I am alone in wishing for the simplest, most beginner-friendly introduction to Propeller programming. And, while SimpleIDE is a huge improvement over Eclipse and other tools of that ilk, and I really do appreciate your effort in producing it, it does not yet meet the standard of simplicity set by the Propeller Tool. That standard is worth aspiring to, regardless of my constant haranguing and notwithstanding any direction you might receive from Parallax that might be counter to their public statements.

    I'm not giving up.

    -Phil
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-08-14 02:33
    I'm not giving up.

    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
  • Heater.Heater. Posts: 21,230
    edited 2012-08-14 05:03
    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.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-08-14 06:16
    Pleasant experience with SimpleIDE and Tachyon (and the dreaded "Project" button?? Read here.

    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!!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-08-14 07:38
    Ray and others,

    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
Sign In or Register to comment.