Propeller: SPIN, C, C++, GCC. Future of Spin Tool vs. SimpleIDE?
John Kauffman
Posts: 653
I'm unsure of differences in languages listed. When should I use C vs C++? Why Spin over C?
I've used Spin Tool and Simple IDE. Seems last few years was examples in SPin Tool and now are in Simple What of above will continue to be supported? (Will Simple IDE evolve to handle SPIN and then Spin Tool die?)
I've used Spin Tool and Simple IDE. Seems last few years was examples in SPin Tool and now are in Simple What of above will continue to be supported? (Will Simple IDE evolve to handle SPIN and then Spin Tool die?)
Comments
The Spin Tool is partially written in Intel assembly language and makes use of some 3rd party modules that are not cross-platform. In addition, these modules are not open-source and Parallax is committed to making as much as possible of their new tools open-source. SimpleIDE is open-source and the GCC toolchain is open-source. Currently SimpleIDE uses BSTC as its Spin compiler (and comes with that already). There's a new Spin compiler / assembler that's under development, written in C, that's open-source. It's also being extended so it will generate code for the Propeller II in addition to the Propeller I. It will also have Propeller II-specific extensions to make use of the new features of the Propeller II. The Spin Tool will not be updated for the Propeller II and will eventually become obsolete.
If it's for your students, use SimpleIDE and C (or maybe even PropBASIC if it develops nicely). The C language will be very well-supported by Parallax. We're starting to release tutorials, and many pages are scheduled for release on September 3rd. It will make multicore very easy by turning impressive devices (SD cards, video, etc) into simple libraries.
C runs very well on Propeller 1 for education, but for industry we're still recommending Spin/ASM due to efficient use of memory and higher control over the chip. This will change for Propeller 2, which can download a C kernel and run much larger programs.
As much as we love Spin inside Parallax for Propeller 1, we probably wouldn't recommend it at this stage for educational customers. The tools we've developed around C are open-source, multi-platform (Mac, Windows, Linux) and very easy to use.
You should schedule a call with one of us pretty soon. I'll be offline for several days but would like to catch up, and walk you through exactly what we're doing. So much of it I can't talk about on these forums until it is released.
A computer programming teacher and I have been discussing including embedded electronics in her C programming class which adds even more importance to knowing where C support is headed. What I have seen so far looks very good.
It's nice to see one language to unify and simplify development.
Will there be books available soon?
Will there be something like the obex, but for the new C classes/libraries?
Thanks,
TonyA
Hi Tony,
Right now our focus is on web publication for a number of reasons. One, we can get new material to you much faster. Two, we can update material easily, without having to stock, and charge for, expensive printed inventory that becomes outdated far too quickly! Three, we can put just the content needed at the time in front of the reader, without the intimidation of a 400 page book. (We have had some teachers look at the thickness of our Stamps in Class texts and say "I don't have time to learn all that!" We understand.)
Our Propeller C Tutorials are arranged into web "books" with a built-in hierarchy. If you go to the first page of any Propeller C Tutorial and click on the "Printer-friendly version" the content of all of the pages in that tutorial will be pulled into a single html file that you can save to your computer or print to PDF or to a printer, whichever you prefer. This works at any place in the book, so you could download single chapters or single pages as well. The text and images are easy to copy-paste from the html content to create classroom materials for use with the hardware. Printed books are also a definite possibility in the future, when we've past this early rapid-growth stage.
Right now, the Simple Libraries for the Propeller C Tutorials are distributed with SimpleIDE. These are being crafted with the goal of being easy use and understand for those familiar with PBASIC, and those who are new to programming. We are focusing on providing a short path to a successful hands-on experience, with the freedom to dive deeper desired. The Simple Libraries are meant to work together well on the Activity Board, using the CMM memory model with a 64 KB EEPROM.
Propeller C libraries are welcome on the current OBEX - there is a category for them awaiting community contributions. Going forward, libraries that accumulate here might be intended for a wider variety of audiences, perhaps using the Standard C libraries, different memory models, or support for other specific Propeller development boards (not to mention the Propeller 2...). In the future we'd also love to see some customer-created libraries here that play well with the Simple Libraries; its simpletools, simpletext, and so forth are in place to handle I/O and protocol tasks, making it quicker to put together a library for a specific device.
As Ken mentioned, we have lots of stuff in the works, which we will start rolling out in September. So stay tuned!
I'm cool with the material on line and the option to get it into a single file for us to print ourselves. Shipping around paper is so last millennium. And I like to add my personal notes prior to the printout which should be possible with an HTML or PDF file. I'd much rather have another component or two in the kits than to have the dead tree.
Steph, can you say at this point that there will be these three products? If you can't say then Sept is not far away.
Prop / C kit similar in contents and objectives to WAM around same price of $80?
Prop / C kit similar in content and objectives to Robotics with the BoeBot around same price of $170?
Prop / C low-cost board similar to the Homework board around same price of $50?
These are the BS2 products that my students are required to buy for class and I'd like to stay in the same groove with the new language/architecture.
So glad to hear the web tutorial concept will work for you! Once you've saved a "book" as an HTML file, you could open that in MS Word; modification for classroom use with our hardware is well within the spirit of our educational copyright terms .
As far as staying "in the same groove" I think that should work out.
1) The Propeller C Tutorials Start Simple and Simple Circuits cover much the same components as the WAM text, though with less presentation of theory. We'll be adding more theory in another layer of separate reference pages, largely re-purposing concepts from WAM and other Stamps in Class texts, that can be optionally used by educators or hobbyists that want to know "why" but won't be an obstacle set in front of the 'fun stuff' for those that just want to know "how." We are working on sourcing a new component kit; for the time being the WAM Parts Kit has good overlap.
2) I can't quote a price for the ActivityBot coming out this fall, but it will be a great value. It will have a super-set of the breadboard-able electronic components included with the Boe-Bot, with the addition of a Ping))) sensor, microSD card, high-speed servos, encoder sensors/wheels, and my personal favorite, the O-ring tires. Also, this time we are using a compact box that is shaped to hold the assembled robot (instead shaped to accommodate a book). So, the packaging doesn't go to waste after opening, and your students can store and transport their parts easily. And yes Andy is madly working on tutorials for it behind the scenes. There is just so much one can do with this robot, that we can't delay releasing the hardware until after Andy has written everything he has dreamed up. So, we will have enough content to get you up and running with the basics, and will be rolling out more tutorials, projects, and classroom contest throughout the months to come.
3) The Propeller Activity Board used in the C tutorials is only $49.99. Combine that with the WAM Parts Kit and you are right at the $80 requested in item #1, with far more processing power and possibilities.
Signing off the forums now, I need to get to work on those ActivityBot tutorial pages!
I see. I think it's great to publish to the web, much more convenient/fast. Looking forward to all of this.
Thanks for the info,
TonyA
I have some specific projects I am trying to do where I will likely make use of libraries already done so Spin seems like the best choice at the moment.
Thanks!
Rodney
If you have specific objectives and plan to use available code then absolutely go SPIN. Last I checked there were only a few objects in C on OBEX. When you look at sample code for devices many are only SPIN. The exception is the Learn C tutorial which does have C code for about a dozen devices (along with good explanations of the code).
You can certainly get any C language questions answered on fora - really smart guys are working in C (and are generous with their help). But if you want off-the-shelf complete and tested solutions then SPIN trumps. Overall, the ecosystem for C is not as well developed as for SPIN. It is catching up and will get there, but not there yet.
Since you already know C and are facile with languages, pick up SPIN. When C objects become available the world will be your oyster.
- John
John,
Did you mean to say "only a few objects in OBEX"? I think I count three.
Jim
The internet is full of C code and examples. The internet is the C OBEX.
Not only that, but lots of Arduino code (which IS C++) can be used with SimpleIDE.
OBEX is nothing more than a collection of programs that have reusable spin code: in other words libraries.
For Propeller C specific libraries:
Martin_H ported a pretty big set of arduino code, and I add to that every now and then with the latest here.
There are two other propeller community C library projects: SwimDude0614's propware and SRLM's libpropeller.
--Steve
Steve,
You are correct. There is a BUNCH of stuff out there already. I just didn't want to confuse the user in Post #11 to thinking there was mostly C code in the OBEX.
It is primarily SPIN CODE.
Ya, I get it. My reply was in context of the thread title and other comments as well.
BTW, most Spin objects can be used directly in C with spinwrap. SimpleIDE will have this added later. SimpleIDE already supports extracting PASM from spin of course.
Anyone who knows C, C++, Java, Javascript, PHP, and/or Pascal can easily pick up Spin/PASM programming. Whether they want or need to do that is usually the motivator.
If Parallax or forum contributors could afford some time porting Spin to other MCUs and PC environments, and getting the word out, then maybe more people would want to use it.
Maybe my mentioning OBEX reflects that I don't appreciate the purpose of OBEX. It just seemed logical as next place to look since it is often listed in Prop materials as a strength of the platform.
I'm not being critical, just passing to poster a factor to consider in language selection. I know Parallax is working full speed on several important projects. So it will just take time to get C code examples available for all products on their catalog page. For many components (Ping, PIR, RFID) code is available and explained in Learn C tutorial. I think it is the back-catalog of products that needs C examples.
(Good news - the new PAM-7Q GPS has C example for download from catalog page.)
BTW - anyone have tested code in C for the Parallax part 4x4 Matrix Membrane keypad part #27899?
Simple Libraries are distributed with SimpleIDE, and are provided on the Parallax Learn learn.parallax.com web pages. So, example C code is easier to get in that case.
As far as components go, well, that's up to Parallax, and getting the whole company to do something is like trying to push a string unless Ken says: "Hey we're losing sales, and we need to fix it."
The needs of my students & I are probably not closely aligned with Ken's quarterly & yearly plans for the company. I have no problem with his priorities of getting Parallax to finish other things & get them out the door. Not having C examples for all devices sold is not losing money for them. I view it more as the future; when Parallax schedules the task of getting Prop C up to being an education platform then publishing C code for all devices will support that goal.
Use windows explorer to search the learn library.
I use grep in the CMD window. Nothing compares to the power of grep in getting good results (except for egrep).
This grep may be useful: http://gnuwin32.sourceforge.net/packages/grep.htm
Most likely I'll never see the day when that goal is achieved for everyone.
On Unix or Linux, search out a little package called 'id-utils'. It keeps track of all that without having to explicitly use 'grep' all the time.
Sounds like for me I should learn Spin if nothing more than to understand the libraries already in production and be able to either use them directly or port them over if I decide to do a project in C. May also make more sense on why things are done in C the way they are if I know spin.
Rodney
Propeller Tool(SPIN/ASM) - Last Update - 10/08/2012 (Parallax Support Download Page)
SimpleIDE(C,C++) - (Not on Download Page) Last Update - 12/29/2014 - 1.0 Release Candidate Only - RC2
OBEX - Few C Examples - Mostly SPIN and ASM.
Is the Propeller Tool going to be updated? I cannot use BETA or RC code in my projects.
What compiler is Parallax committed to?
Parallax can't really pick just one of Propeller Tool and SimpleIDE because they do different languages. SimpleIDE is currently gaining Spin support, but it is still under fairly heavy development.
If you can't afford to deal with compiler bugs, go with Propeller Tool. I would also personally recommend using Spin over C or C++ on the Propeller - the Propeller is not well suited for C/C++, while Spin was designed specifically for the Propeller.
I was hoping that Parallax would update some of the functions in the compiler too. Like lock check, bytemove... and the help screens are really bad.
SPIN is a great language. Simple and lots of examples on OBEX. Let's Grow it... Don't Kill IT!!
What's wrong with lock checking and bytemove in Spin? Also, most if not all built-in functions (including lockset and bytemove) are defined in the Spin interpreter in ROM and can't be changed at this point.
Spin isn't going away any time soon.
I agree, I started out with the BS2. As soon as I seen the propeller on the market, I had to have it. The tool is easy and fun to use. The Activity Board is a quality product at a great price. But I found SimpleIDE confusing and not user friendly. At my age I'm not interested in learning another language. With eight cores to work with, I'd like to be proficiant in spin, and not complicate a fun hobby.
"LONG LIVE SPIN"
I updated a lot of my SPIN projects to C and Simple IDE last year but now there is no movement on SimpleIDE development.
SimpleIDE - Last Updated January of 2017 (Version 1.1)
Propeller Tool (Spin) - Last Updated October 2012
Now BlocklyProp is all the rage.
What compiler and IDE should I use for long term projects with this chip set?
Anyone got a commercial compiler/IDE they like for (SPIN, PSAM and C/C++)???
-Phil
Here is the github site: https://github.com/parallaxinc/SimpleIDE