Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and C support — Parallax Forums

Propeller and C support

KyroMasterKyroMaster Posts: 6
edited 2008-06-17 14:30 in Propeller 1
Hi,

I just discovered the propeller yC family and from the feature set it seems to be really killer with one exception, no (free) C support ATM
I think most programmers of AVR and ARM devices would gibt the propeller a try because of its features, but not without C support. Of course I could learn SPIN but that's not what I want, since learning a special language just for one platform isn't what hobbyists want IMHO.
I hears that there will be a commercial compiler out soon, but are there plans to have propeller support in gcc, just like e.g. avr-gcc? This would be killer [noparse];)[/noparse]
«1

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-14 21:22
    There are no plans to have propeller support in gcc unless you or some other individual or group has the interest and time.
    Parallax doesn't have the resources or interest in doing so since Spin is not that hard to learn and is very similar in some ways to C.
    Particularly now with a commercial compiler available, there's little advantage to supporting gcc. Spin has some particular advantages
    that C does not have. For one, the interpreter (which is in ROM) fits in a cog's memory and the byte code is quite compact and pretty
    fast for interpretive code. In particular, it's a very good match for the Propeller's native instruction set as was intended. C is not as
    good a match. Having a gcc implementation would be convenient (and inexpensive) for many people, but would not be a "killer".
  • KyroMasterKyroMaster Posts: 6
    edited 2008-06-14 21:41
    Of course, it's only my own opinion, but just have a look at about every yC dedicated forum and search for "propeller". The consensus is, everyone is impressed by its HW feature set and processing power, but doesn't use it because it lacks C support. Why do you mean SPIN should be better than C? I never programmed it myself, are there real advantages which can't be archived with C? I mean e.g. for AVR there a C headsers available which gives access (or better said simplyfies access) to every register giving instant "support" for every feature of the yC. I can't think of this not being possible with a propeller.
    And this "inexpensivity" is the reason many people choose one yC over another, at least from my opinion (I'm a CS student and I know many people working with yCs myself, most are hobbyists and don't want to spend $€ for a compiler). I hope someone will port gcc and binutils to the propeller platform someday. "Resources", ok that's clear, but if they don't have "interest", they should think about it IMO and about "niche products" and "mainstream". Because from the feature set the propeller looks too promising.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-14 21:47
    Have a look at this list.
    (Sorry, I haven't added the sensor stuff yet, but it's fairly complete otherwise.)

    Propeller's SPIN code is worth being able to do all of these things in one chip.
    I agree that it will have to overcome some preconceived notions that it
    can't be taken seriously because it doesn't program in C.
    I've already run into that with other AVR coders, but you can't beat the power here.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • KyroMasterKyroMaster Posts: 6
    edited 2008-06-14 22:03
    OK, nice if SPIN is able to do all this, but what could it do when there was proper C support [noparse];)[/noparse] I personally don't understand the argument "there is no interest in C because there is SPIN", and these aren't "preconceived notions" it's just because almost all yCs can be programmed in C and if the knowledge is there (in the programmers brain *gg) it's rather easy to switch to a new controller. I mean the features for thread/cog synchronizing could be also implemented in C.
    And also, I see people at opencores.org have ported gcc to their own FPGA based RISC core. Assuming they do all this in their spare time, it shouldn't be that hard. All a matter where parallax wants the propeller to be [noparse];)[/noparse]

    Of course I can't do anything about C support, just hope it will be there someday and then buy a propeller, as IMHO many others, too.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-14 22:31
    You missed out on the "great programming language explosion" when there were lots of programming languages used including Pascal and its variants and C and its variants and Smalltalk and Lisp and Snobol and APL and PL/1 and many many others. Some were used for specialized functions. Some were used for operating system implementation including functionality that is now associated with embedded systems. C is not the best match for the features and instruction set of the Propeller, particularly if you require adherence to Standard C. It's not that you can't express pretty much any program in C, it's that you may not be able to express it succinctly and clearly.

    Parallax is used to "thinking differently". That's how they came up with the Propeller. It's a good fit for their marketplace. They've done a pretty nice job with the very free development tools. If I were doing them myself, I would actually have based them on an extended Pascal framework rather than C based on years of using Pascal-like and C-like languages for low-level operating system implementation for a variety of processors.

    One of the nice things that a "different" set of development tools does for you is to make you step back and "think differently". Sure you can program the Propeller in C, but it's not a good match to the capabilities of the chip. Most people will try to program the Propeller like they program an AVR or ARM chip and they'll miss most of the unique capabilities of the chip.

    1) If you're committed to the use of C to the exclusion of other languages, so be it. Stick to chips with lots of raw, but conventional power like the ARM chips. They work well together. Many other chips, like the TMS430 and 12 or 16 bit PIC lineup just don't program well in high level languages. That doesn't mean that you can't write programs for them, but they're not as efficient as assembly language, particularly when you're "pushing the envelope", either for speed or program / data size or both.
    2) If you like the feature set of the Propeller, learn to program it in the native tools like Spin and its assembly language. You'll need to use its assembly language to make the most of its speed and determinancy.
    3) It won't get you very far to complain about lack of specific tools that you want. Either you are interested and willing to invest some effort in learning a new processor with all its quirks and foibles or you're not interested enough.
  • jazzedjazzed Posts: 11,803
    edited 2008-06-14 22:56
    Spin produces smaller but slower code than the current C compiler. Spin is interpreted. It does have some benefits over standard C like spin objects (a light-weight form of OOP). Propeller assembly is easy enough to learn, but it lacks some mainstream features. You will find many biases and preferences from fan-boys on this forum. You can learn lots of things here but sometimes you have to hold your nose. Stick around and you'll learn enough about Propeller to be able to make good decisions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • vampyrevampyre Posts: 146
    edited 2008-06-14 23:18
    I think a free C compiler would really boost user acceptance, but not because it would be any good. I think a semi-acceptable compiler , or even a C to Spin translator, would draw in people who are on the fence about trying the prop. once they had tasted its power they'd soon dip into spin.
  • LeonLeon Posts: 7,620
    edited 2008-06-14 23:46
    16-bit PICs like the dsPICs and PIC24 were designed for high-level languages, and run C programs very efficiently.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • ImageCraftImageCraft Posts: 348
    edited 2008-06-15 00:46
    I am the author of the C compiler, so of course I am biased. With that out of the way, this is not a dig at the fine folks at Parallax, but there is really only one advantage of Spin over C - cost. With ImageCraft C, it's standard C so there are authoritative answers to questions related to the language and the there are tutorials to get you started. We even have users who test out their logic with PC compilers and then port it to the target device. You can access the IO registers in C, as well as the multiprocessing and lock features. You can launch C functions or native code driver in another Cog. The performance is 10-25% of native code, 5-10 times faster than Spin, and it can only improve.

    Some people may prefer the Spin language or the Spin environment, and that's fine, but I don't think there is any synergistic advantage of from Propeller+Spin vs. Propeller+C per se. The LMM C interpreter unfortunately has to sit in the EEPROM and that does take 2K out of the total available memory, but you still have ~30K (edited) of RAM for your program and data. My unofficial benchmark shows that Propeller C code has similar density to the AVR, so this is an AVR ATMega32 class of memory space, but faster, even with the LMM C overhead since there are 8 cores, and I know we have boatloads of customers who use the ATMega16 for production work.

    In fact, while I don't have the actual figures, one would estimate the cost of developing and supporting Spin is in the same order as developing and supporting the C compiler, except that the difference is that Parallax intends to recover the cost of Spin development and support by the sales of chips, whereas we, unfortunately, have to recover the cost by selling the compiler licenses. Our STD compiler is $249, which I know is high for some hobbyists, but is the cost really the barrier to entry? The compiler is newly released so I don't know.

    Post Edited (ImageCraft) : 6/15/2008 8:52:02 AM GMT
  • ImageCraftImageCraft Posts: 348
    edited 2008-06-15 00:49
    vampyre said...
    I think a free C compiler would really boost user acceptance, but not because it would be any good. I think a semi-acceptable compiler , or even a C to Spin translator, would draw in people who are on the fence about trying the prop. once they had tasted its power they'd soon dip into spin.

    Our C compiler is fully functional for 45 days then become 4K limited.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2008-06-15 04:04
    ImageCraft said...

    Our STD compiler is $249, which I know is high for some hobbyists, but is the cost really the barrier to entry? The compiler is newly released so I don't know.

    I don't think that it's too high a price for a business or independent inventor / consultant to pay, since it becomes a tool that will be used for making money. In this respect, it's fairly reasonable.

    But I do think it's too high for a hobbyist* to pay.

    (Note to ImageCraft: the following rant is not directed at you...)

    [noparse][[/noparse]rant]
    Okay, my pet peeve with the software industry is that many companies make it nearly impossible for hobbyists to _legally_ use their products. There is one company that sells an edu version of their product (which I would like to use, as a hobbyist) for $139.95 to students, but $2495.00 if you aren't a student!

    Where does that leave Joe Average, that just wants to have fun? Either he purchases an edu version and disregards the license, downloads a cracked version from a torrent, or goes without. For myself, I've gone without, but the comapny in question is out $2495 that I won't spend in this case, as well as $140 that I would if the edu license allowed for hobbyist use.

    I think that policies like this are extremely short-sighted of companies, because the biggest thing that a company needs to do after producing some product that is good enough is to get it into the hands of consumers. Look at Microsoft, for example. It's not that DOS was the best thing out there, but it was good enough for people to use, and Microsoft put it into as many peoples hands as they could, until it became the greatest common denominator.
    [noparse][[/noparse]/rant]


    I'm glad to see the C compiler completed, with intentions to expand it's capabilities. I think there may be a much bigger market for it if the pricing was broken down into commercial & non-commercial use, with the non-commercial version at $50-100 dollars, and the commercial version at $250-??? dollars. Theoretically, you wouldn't lose any money for commercial sales, since somebody planning to use the compiler for product development would buy it anyways. But I think you would find far more hobbyists & students that would purchase it at a lower cost, and the increased sales volume would likely outpace the sales at the higher price.


    *Every hobby has the hardcore people that will pay whatever it takes, but for the sake of this discussion, I'm not talking about "them"...
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-15 04:11
    As a hobbyist, I have always considered myself a "self-taught" student and
    as such have never felt bad about the purchase of an "education" version
    of anything for my hobby. Now for the business... That's a different story. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • hippyhippy Posts: 1,981
    edited 2008-06-15 04:54
    ImageCraft said...
    this is not a dig at the fine folks at Parallax, but there is really only one advantage of Spin over C - cost ... The LMM C interpreter unfortunately has to sit in the EEPROM and that does take 2K out of the total available memory, but you still have ~14K of RAM for your program.

    32KB minus 2KB = 30KB so even better than what I assume is a simple typo, however ... that equates to just 7.5K PASM instructions of compiled code of which some is overhead to facilitate the C LMM and data storage uses some of that quota as well.

    It may be perfectly adequate for many programs and it's no worse than any 32-bit PASM executing LMM would be but Spin does seem to have the advantage on code density / program size albeit with slower execution. It's also fair to say that for the Prop Mk II its 256KB RAM allows near 64K PASM instructions of compiled code which is probably enough for many to most programs.

    I'm not personally held back by a lack of C on any processor and find it strange that people are but accept that's the case as this isn't the first time someone has cited a lack of C as holding back Propeller take-up, and I've heard the same said in relation to other processors.

    Having followed the ImageCraft C developments I've been impressed so I would not stand up and criticise it and I see no problems with a fair comparison of C and Spin and I believe both have their advantages and disadvantages ( the end user can decide which comes out the winner for their particular application ). I do however worry when I see potential users looking at the availability of C as being the panacea for adopting the Propeller or any platform. It may be but it often seems to be simply kneejerk, as does rejecting the Propeller or other choices out of hand for lack of C or gcc support.

    The cost of ImageCraft C may be an obstacle for hobbyists ( it would be for me ), but I don't have a problem with that and cannot understand other hobbyists who do. If a hobbyist wants to use something they have to be prepared to take what's on offer for free, pay for the alternatives, knuckle down and start developing alternatives themselves or convince someone else to do so. If they cannot find a way to work with what's on offer then that's perfectly fine; head in a different direction.
  • ImageCraftImageCraft Posts: 348
    edited 2008-06-15 05:01
    Kevin Wood said...
    ...

    I'm glad to see the C compiler completed, with intentions to expand it's capabilities. I think there may be a much bigger market for it if the pricing was broken down into commercial & non-commercial use, with the non-commercial version at $50-100 dollars, and the commercial version at $250-??? dollars. Theoretically, you wouldn't lose any money for commercial sales, since somebody planning to use the compiler for product development would buy it anyways. But I think you would find far more hobbyists & students that would purchase it at a lower cost, and the increased sales volume would likely outpace the sales at the higher price.

    I am open to the ideas of having a lower cost non-commercial use license. $50 seems too low though, you can't even get a tank of gas at that price :-( Anywhere between $50 to $100 sounds like may as well go to $100. What do people think?
  • BradCBradC Posts: 2,601
    edited 2008-06-15 06:35
    ImageCraft said...
    $50 seems too low though, you can't even get a tank of gas at that price :-(

    You should come here then! $50 will fill up my car 2.4 times [noparse]:)[/noparse]

    While I'm here I'll put in my .03c worth (inflation)

    Hippy made a very valid point with regard to code density. You will fit an awful lot more SPIN into the current chip than you will LMM PASM, C or whatever else you would use natively.

    On alternative compilers, price and the rest..

    Yes, gcc is doable, SDCC would be a better fit however. In either case, ImageCraft are the ones that actually took the initiative (and TIME == money) to do it and as such are the only kids on the block with a functioning C compiler for the Propeller. Thus they are the only game in town! (nice place to be by the way).

    If I *needed* C for work, I'd plunk $250 for it (the cost of about ~20 chips give or take). As an experimental hobbyist I'd certainly do the free trial, and if I wanted it I guess I could stretch to $100.

    Personal opinion only of course.
    I use FreePascal these days, only venturing to C when I need to hunt bugs in other code (like the WINE one that prevents Proptool from detecting serial ports).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • KyroMasterKyroMaster Posts: 6
    edited 2008-06-15 08:55
    I also would vote for a non-commercial edition for about 100$ which would IMHO seem fine for hobbyists. Of course, people who want to make money with their projects thereafter can afford the 250$ without problems [noparse];)[/noparse]
  • hippyhippy Posts: 1,981
    edited 2008-06-15 12:19
    If I've read ImageCraft's earlier post correctly there will be a free compiler but limited to 4K after 45 days. Hobbyists who can live with that will be happy, those who see $249 as affordable and value for money will be happy, which just leaves those hobbyists in between, who want more than 4K but don't want to pay full commercial price (*).

    How much they'd pay for something they are obviously impressed by if they want to keep using it I couldn't say, it really does come down to their perception of whether what ImageCraft asks is seen as value for money or not. If they do see it that way they'll likely pay the asking price, if they don't then they almost certainly won't, either walking away from C or seeking out cracked versions.

    I am sure there will also be people ( like myself ) who will be prepared to put in the effort to get larger than 4K code legitimately working with the free compiler even if that means a more complicated development process and additional tools - even though the effort may be huge and cost of achieving that may be more than what they would otherwise have paid it isn't physical money exchange to them. Plus such a venture is fun in itself for people so inclined.

    Perhaps it's too early to try and decide an actual price for a hobby version of the compiler ? Maybe release it, let people use it then assess how much they would be prepared to pay and what limitations they would accept then adjust and price the hobby version accordingly.

    (*) One additional group is those who want to take an existing project and use it but with some minor change when the full compiler is needed.
  • KyroMasterKyroMaster Posts: 6
    edited 2008-06-15 13:48
    Of course, it's their decision in how much will be the price for the compiler...All I do is post my opinions here [noparse];)[/noparse] I have to buy a propeller real soon so I can convince me, but from the features page the price for the controller itself in relation to the power it has is impressive. But a community is also important. So when I see pages like avrfreaks.net or mikrocontroller.net (in german) all people start with an AVR because it's...easy and cheap. That's the whole thing IMHO about success or failure of a yC, as there are so many controllers on the market and if you don't do e.g. DSP, you can select whatever you want. The difference between 100$ and 250$ is huge for people who can't afford much. I didn't care if they would charge 500$ for the commercial version when there's a non-commercial one for under 100$. Just because I think most of the people programming yCs are hobbyists (eventually they start making money with their developments afterwards...)
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2008-06-15 14:01
    I'm not against a C compiler in anyway but the time taken for a C programmer to learn spin is roughly nil and I find the combination of Spin for glue and assembly for speed excellent. However if you program uPs in C because you didn't want to learn assembly then things may be different.

    I've learnt spin and pasm so I can program the propeller, this is not general knowledge that can be reused on other processors, but what other processor is anything like the propeller?

    On the price issue, you could probably go higher for commercial use (it is still going to be super cheap) and lower for hobby/education. I think you may find that you make hobby sales that later become commercial sales. In the same way that I learnt to program the propeller for my own use but have probably now spend about 10X as much with parallax on boards etc for my work.

    Graham
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited 2008-06-15 16:52
    I for one would welcome a non-commercial version. The price of $249 is only the Base cost. There are additional annual update service charges, after six months and I guess that it all starts again with Prop2.

    I have used the ImageCraft’s Demo Version for a month or so now, it’s been a great learning curve, which is what Prop is all about for me and I guess many other people.

    The 4k limited code version would be nothing short of frustrating IMO. Better a non-commercial version limited to say 16K for example with upgrade options, but at the end of the day it’s a commercial decision for ImageCraft.


    Ron
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2008-06-15 17:47
    hippy said...

    Having followed the ImageCraft C developments I've been impressed so I would not stand up and criticise it and I see no problems with a fair comparison of C and Spin and I believe both have their advantages and disadvantages ( the end user can decide which comes out the winner for their particular application ). I do however worry when I see potential users looking at the availability of C as being the panacea for adopting the Propeller or any platform. It may be but it often seems to be simply kneejerk, as does rejecting the Propeller or other choices out of hand for lack of C or gcc support.

    I think the reason this happens is simply market demand. For an individual inventor or consultant, or even hobbyist, that is doing the work themselves, Spin (or _any_ language) is fine.

    But for a company that needs to hire programmers? How many highly skilled Spin programmers are out there compared to C (or Java, Pascal, etc.)? While you're waiting for one of the 10 people here to finish their current gig, your competitor is building the next iPod... with C.

    Students realize this, too. When the industry is looking for C programmers, Spin doesn't look so good on your resume, even if you're a crackerjack that could program circles around the average C programmer.

    As for the pricing issue, $100 isn't too high for non-commercial use, and $249 is probably too low. The only difference that I would suggest is the license - there should be no technical limitations to program size, etc. Otherwise, the $100 becomes too much for a "feature limited" version...

    And ImageCraft, thanks for at least considering the pricing, regardless of your decision.
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-06-15 19:20
    Hello to all the C-fans,

    SPIN is much closer to C as to Delphi.
    I used to program in Delphi and Borland-Pascal as a semiprofessional programmer.

    To me it took just ONE Week to get to know the language SPIN !

    So all you superprofessional C-programmers: i call you by your honor: how long does it take for YOU to learn SPIN ?

    If i would be a manager of the softwaredevelopment-department of a company. I would force you to learn SPIN
    to make your brains FLEXIBLE again !

    I was forced to learn C and this took me about two months. And i discovered: oh the difference between
    delphi and C is not that big that it would take me years to understand it.
    You might say "oh my god delphi ! what a big difference to C ! Yes and No.
    If it took me just two months to become common to C coming from delphi
    To you as c-programmes it should take only 3 days to become common to SPIN coming from C

    Maybe Parallax should make a developing race:
    a development-project with high demands about strong deterministic and parallal processing

    SPIN against C. I bet with SPIN you are much faster finsihed than with C !

    best regards

    Stefan
  • BradCBradC Posts: 2,601
    edited 2008-06-15 20:05
    StefanL38 said...

    Maybe Parallax should make a developing race:
    a development-project with high demands about strong deterministic and parallal processing

    SPIN against C. I bet with SPIN you are much faster finsihed than with C !

    I'd take that bet, and I'm not even a C programmer.

    See, the thing is if you are a programmer.. you can adapt to any syntax or lingo. Some more rapidly than others perhaps, but I digress....

    The arguments regarding SPIN vs C are pretty futile really as they are different tools for different jobs.

    C is great at cross platform, widely available libraries and almost any graduate with a bit of paper can use it.

    Spin is designed bespoke for the platform, kinda a version of basic and extremely simple for the beginner while being compact enough to fit a *lot* of code into the available memory space.

    Different strokes for different folks. Personally on the Propeller I use PASM where required, and SPIN where I can be slack and not worry about timing.

    On the PC I use Pascal, Python and BASH (yeah, I might be a dinosaur in todays age, but I'm a _productive_ dinosaur!)

    Looking at it objectively. SPIN is the slowest current language with the most efficient storage. More instructions per byte than any other, but you pay in speed.

    PASM is the fastest, with the limitation of 495 instructions per program routine (a cogs worth of storage).

    C sits in that middle ground. It's slower than PASM, but it's faster that SPIN, while being far less efficient in code storage. It's probably great for those that want/need cross platform, but it's kinda shoehorned into the model. A bit like a Java interpreter I guess..

    My recommendation is for the C programmers to grab a copy of ImageCraft C and have at it. The rest of us can continue on using SPIN and PASM as required and we'll all be one big happy family. The right tool for the right job.

    (I gotta stop posting when on the scotch)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • hippyhippy Posts: 1,981
    edited 2008-06-15 20:47
    There is a middle ground between fast PASM with limited program space and slow Spin with maximum program space and that's LMM which comes with speed and breaks the PASM barrier, and it's also possible to have Thumb-style LMM which doubles program capacity but is slower and slightly more limited than 32-bit LMM. Unfortunately there have not been any mainstream tools with high take-up which easily support that to date.

    Plenty of people have looked into LMM and how to maximise performance but ironically it's only ImageCraft who have taken advantage of LMM in any notable way.

    There's no criticism of those who have produced PASM and LMM tools intended, it's just that no matter how often people promote LMM there doesn't seem to be a great response. Is LMM being rejected as an option ? If so why ? Lack of tools, lack of easy to use tools, lack of understanding, or lack of promoting its benefits ?
  • PyrotomPyrotom Posts: 84
    edited 2008-06-15 21:57
    Like Mike Green, I'm an old time programmer who learned many languages over the course of my career. It will no doubt offend the C bigots out there, but my opinion is that folks who insist on only programming in one language tend to write the most difficult to maintain code. It may be very clever, and they may be masters of all of the subtleties of their preferred language, but that all works against having the code readable by others. I've had to maintain code written by many others over the years, and I'll take code written by multi-lingual programmers any day... For the last 8 years of my career I was a full-time Java programmer, but once I read the specs of the Propellor I started learning Spin and PASM, as they were obviously the right tools for the job.
  • potatoheadpotatohead Posts: 10,261
    edited 2008-06-15 22:13
    I think it's a solution to a problem that's not always a problem.

    SPIN runs quite fast. SPIN + PASM is often an excellent balance, and it's pretty easy. IMHO, it's easy enough that casual programmers (and I'm one of those) can jump in, get stuff done, and not have a lot of complexity to deal with.

    This balance, plus how the chip actually does things, is the killer feature.

    I've followed the LMM code and think it's a totally great (and surprising!) middle ground. Being able to throw C libraries at the thing, and have the performance LMM delivers, only adds to the options, but really does not replace them for all but some problems.

    Frankly, I think the current chip RAM constraints limit the overall utility of C / LMM. There is a strong case for using C over assembly language code, but again, the design of the chip mitigate that. PASM is not that hard. The way it's implemented in the COG is just sweet, with only a few quirks.

    So right now, LMM / C is pushing the envelope for most users, given they can deal with learning / language quirks. It's all good, and very interesting to follow, work though.

    Prop II will significantly expand the scale of possible projects and at that scale LMM / C is going to make a hell of a lot more sense for more projects.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!

    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
  • ImageCraftImageCraft Posts: 348
    edited 2008-06-15 22:26
    There may be a perception that somehow Spin is more suitable to the Propeller than C. I don't think that's true. Spin code is more compact, that's true, but 30K is a decent amount of space for microcontrollers. I know there are lots of production code out there using our compilers that fit in that amount of space. Otherwise, I wouldn't have tackled the project in the first place. Spin is interpreted, C uses LMM. Neither one is more suited to the Propeller than the others. Both Spin and C provide Propeller specific features like COGINIT. Both allow launching of asm drivers. C allows you to use inline asm and launching of LMM C functions. Points to C.

    I am sure there are lots of current Propeller users who are happen with Spin, if not, then they probably wouldn't be using Propeller anyway. Propeller C is about giving the users a choice. They can go for free and compact code with Spin, or low cost, faster, and less compact code with C. IN addition, consider the enhancements we will be making with the C compiler: 32 bits FP is a given, no brainer there. We can support 64 bits FP if there are demand. Lastly, source level debugger. The hooks are mostly there already. Will we support we? Only if there is a market and demand for it.

    To put it bluntly, regardless whether you can convince engineers to use Spin or not, Propeller will be more successful with a C compiler than not, but this can only happen if the C compiler is accepted and championed by you folks, the early Propeller adopters. If there are deficiencies with the tools, let me know and I will try to address them. So far, the only real criticism is the cost of the tools, and I will take that into consideration.

    If we don't make money in this, there is no point of us supporting the Propeller, and it's as simple as that.

    // richard
  • potatoheadpotatohead Posts: 10,261
    edited 2008-06-15 22:40
    I totally agree, and didn't mean to talk down at the C compiler or LMM one bit.

    I'm actually very interested in going down that road soon. I like C. It's a common denominator for me, as it's been there since the old Apple ][noparse][[/noparse]. (that was tough then --easier to just do 6502 ASM and call it good.)

    The license cost is not excessive to me, and I'm right at interested hobby level. You've done a stand up job.

    And this all has to get worked out anyway. This prop will see more use, just for having the option. Getting the model down, code running, libs created, etc... is necessary for the jump to prop II. There is gonna be some change, but I suspect that's minor by comparison.

    The real beauty of it is that Parallax will just sell both chips, leaving this work to continue to attract licenses for a very long time. And the scale of this chip is just sweet for a lot of quick and dirty, "hey, maybe I can do this?" projects. Prop II or no, I'll be running this Propeller for a long time. It's just great.

    Glad you are there to get it done.

    Edit: I think I was writing to Hippy's question more than anything.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!

    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
  • simonlsimonl Posts: 866
    edited 2008-06-15 23:25
    Well, I'm not a great programmer. I've not had a great deal of time on the Prop :-( but I was able to pick-up SPIN OK - but FP still makes my brain ache!

    That said; there's no denying that to have a C compiler WILL be what finally gets some folks to at least try the Prop', so it must be a good thing (thanks ImageCraft).

    Now to price and hobbyists: all I can say is; at $250 it's too expensive for me, as I can get stuff done on the Prop' without it, BUT I most certainly would be interested at < $100, so long as there were no limitations (though I would accept some sort of hard-coded 'this was compiled with ICC7PROP and is NOT FOR COMMERCIAL use' type of thing).

    If I got to the stage where I had a saleable product, I'd be happy to shell out an upgrade fee smile.gif

    Just my tuppence-worth.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • bambinobambino Posts: 789
    edited 2008-06-16 01:03
    @Hippy
    I don't know what percentage of people are in my boat, but it's lack of time to follow a tangent course of new learning curves.
    I love reading the posts you guys have about LMM, Interpreters, and self modifying code. But when I get some dev time it's back to what I know I can do and anything that might have rubbed off on me during reading.

    But truthfully, it's all of what you said. Those instructions and epiphimes that have been uncovered are scattered through numerous threads. Heck I do good to get the front page read in a day. At best I can set a marker and come back and use it if the need arises.
    Thank God for the good thread index!

    But once it's simple, every simpleton like me will jump on the train!
Sign In or Register to comment.