C or Pascal
Celtic
Posts: 9
I have some experience with C and Pascal
so why learn SPIN, compiled C is much faster
also. I see ICCV7 has 45 days trial and I don't
want to spend hundreds of Euro's on a licence
(a hack would do). Is there also Pascal available
for propeller? What C compiler is best and with
documented libraries?
so why learn SPIN, compiled C is much faster
also. I see ICCV7 has 45 days trial and I don't
want to spend hundreds of Euro's on a licence
(a hack would do). Is there also Pascal available
for propeller? What C compiler is best and with
documented libraries?
Comments
You may want to re-consider the problems you want to solve with the propeller and how you can use its stregnths to your advantage before you bend it over... It is not your average microcontroller...
The people at ImageCraft did a very good work with ICC for the propeller, I'd buy its software if I would use C for the propeller but I learned assembler and the force is too powerful to resist .
Edit: I'm not admitting that I did not learn Spin, ok ? I didn't say it !. I even prefer LMM to Spin, at least I know exactly what it does... albeit maybe not exactly when ;-)
http://forums.parallax.com/showthread.php?t=113091
Since the prop has a different architecture than single ore micro's some stuff doesn't work the same as in a "standard" C environment. Spin takes these aspects into consideration. You can do the same in C or pascal IF you are aware of them and specifically address the issues, else you risk losing the gains of using C or pascal in the first place..
So, to understand these issue, many have found spin is a good starting point.
But, if you have a favorite language and don't particularly care about those kind of issues until they draw attention to themselves, then of course use your fav language. This is also a successful strategy.
Mostly it comes down to how much assembler you can handle.
Umm, well not really but I'm sure that's an achievable goal.
There are 3 Pascal compilers.
Propeller C compiler round up in approximate order of appearance.
- Small C (functional?)
- CP/M K&R C (Emulated)
- ICCv7 (LMM C)
- Catalina (LMM C)
- C to Spin (translator)
- ZOG (GNU C Bytecode interpreted)
Pascal compilers.- Hippy's Pascal
- CP/M Pascal (Emulated)
- Catalina compiled Pascal.
I won't be discussing the merit or lack thereof with any of these compilers.and launching new cogs with that in either
C, SPIN or ASM. Using either C, SPIN or Pascal
each goes back to ASM for the same reason. Starting with
developing an interpreter for a fast uC is of course
a great idea, who wants MIP's anyway?
Both are really lean environments, in that the amount of things you have to know to make effective use of the chip is modest.
And they both are fairly easy things! PASM is beautiful, and for me personally, a whole lot of fun. SPIN is compact, and it grows on you rapidly. There isn't all that much to getting started, and how it works with the chip makes a lot of sense.
Honestly, I think that's the most compelling argument. Props are just different from other CPUs. Those differences don't map to other established languages very well.
The work done to boot strap other languages on the Prop is amazing really. If you go back to the early days, you will find a post by Bill Henning, where he puts LMM out there, and the world changed... That's all great stuff, and a whole lot of fun to follow and learn about, but it's not really required in a lot of cases.
Truth is, I think we are pushing Propellers way off the rails, into territory I don't think anybody ever seriously considered, but here we are! That's all kinds of awesome.
If that's your thing, deffo do the work to get setup with C. Some great people are pushing the boundaries hard. Lots of fun and learning to be had.
If that's not really your thing, and you just want the Prop to do some stuff, take a day or two to write some SPIN. You will find a lot maps over, and when it's used with PASM, you will also find it's pretty darn sweet in how it all comes together. Frankly, your understanding of how the other languages work will be considerably enhanced for having done those things.
Lots of code in the OBEX too. Grab a thing or two and jump in. Seriously, you won't find it takes long at all.