Shop OBEX P1 Docs P2 Docs Learn Events
C Objects for the Propeller: Parallax will support your efforts — Parallax Forums

C Objects for the Propeller: Parallax will support your efforts

Ken GraceyKen Gracey Posts: 7,401
edited 2009-08-28 23:49 in Propeller 1
Dear Propeller programmers,

Parallax would like to assist any developers who wish to produce more objects for the Imagecraft ICCV7 Compiler for the Propeller. Some customers simply want to program in C, and we want to make their adoption of the Propeller architecture easier.

We can assist developers in the following ways: free Propeller hardware, free Imagecraft compilers, cash, barter or other recognition. Whatever makes our·C developers interested·(jazzed, allen and others) - we·would be pleased·to support your efforts. Your object would be posted on OBEX and be part of the Imagecraft distribution.

At present, there are objects for floating point math, SPI,·I2C, TV and an assortment of necessary routines. But we need more examples to make this complete.

If this is of interest to you, post here or·contact me directly.

Sincerely,

Ken Gracey
Parallax, Inc. ···
«1

Comments

  • jazzedjazzed Posts: 11,803
    edited 2009-03-11 21:30
    Ken,
    I'll do what I can. Will PM you with ideas ... and some status [noparse]:)[/noparse]. I'm always into something.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • WNedWNed Posts: 157
    edited 2009-03-11 21:39
    Hi Ken,
    I was totally jazzed when I saw a C compiler available for the Propeller, and kind of disappointed when I saw the lack of C objects in the exchange. I'd love the opportunity to contribute but am not sure I'm really qualified enough to ask for "free stuff". I did some C programming in the mid 90's so it would take me a bit to get back to the mind set, but I'm headed there anyway for another project. If I could just get the compiler from you, I'd like to start work on an object that manages the 16 port Parallax servo controller as well as a simple database object (hopefully with SD support, but I'll have to start simple).
    Here's hoping more qualified people than myself are just as excited by your proposal!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "They may have computers, and other weapons of mass destruction." - Janet Reno

    Post Edited (WNed) : 3/11/2009 10:23:07 PM GMT
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2009-03-11 23:24
    WNed,

    I don't expect miracles from anybody. Please PM me your shipping address and I'll get a compiler out to you. I made the offer knowing that there's variable skill, interest and abilities to code in C. I'd like to bring ICCV7 closer to maturity and improve the Parallax support for it.

    Sincerely,

    Ken Gracey
  • VGVG Posts: 32
    edited 2009-03-11 23:40
    Hi Ken,
    I have a bit vector index I wrote for my PhD thesis. I always wanted to share it. Indexing is basis for relational databases. I have a few other algorithms I can post.
    First what do I need to have? I already have a prop proto. I have Visual C++ package but I don't have a C compiler for Prop how can I get it? What else I should have?
    Sincerely,
    Venkata.
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2009-03-11 23:43
    Venkata,

    Send me your shipping address. You need the C compiler.

    Thanks,

    Ken Gracey
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-03-12 00:01
    Ken's holding out the carrots for C code development. I like it.

    Too bad my C is worse than my spin. <SMIRK>

    Hats off you guys, good to see this going forward!


    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • JamesRonaldJamesRonald Posts: 39
    edited 2009-03-12 01:17
    Ken,

    I've only been playing around with the propeller for a short time. I'm a C developer, mostly doing embedded Linux for the ARM processor and some small projects using the Atmel AVR. I've found spin quite easy to use but a little slow. I have not really looked at PASM but I'd love to give ICC for the propeller a go. My current project is another balance bot (my third revision) but this time using better parts and a propeller instead of an AVR. I hope the that ICC will work with Viewport as I'm hoping to use that as well.

    Thanks.
    Jim Ronald
  • JetfireJetfire Posts: 34
    edited 2009-03-12 01:41
    I wanted to give C for the prop a go, but was really put off by the $100 or $250 price tag. I'm also concerned if using the non-commercial version would prevent licensing under most open software licenses.

    If you search in the Parallax store for "propeller c" with quotes you get ICCV7 and with no quotes you don't see it on the first page.
  • Q*bertQ*bert Posts: 59
    edited 2009-03-12 02:34
    Ken,

    I'm new to the Propeller but I've been using C for AVR programming for some time now. I've been interested in the ICC compiler, but was put off by an apparent lack of interest in the community.

    I have a PPDB, SpinStudio and bunches of sensors, displays, etc.

    If I can get the compiler I'll be happy to give it a "spin"...

    Craig
  • BradCBradC Posts: 2,601
    edited 2009-03-12 02:42
    I thought ICC came with a fully featured, unlimited one month trial ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-03-12 04:01
    Hmmm....I have been wanting to try C for the Propeller. I need to read up on it again and maybe use the trial before asking for freebies. Someone that is more familiar with the C implementation in the Prop, can you give a quick overview for others that may pop into this thread? I have seen the discussion of large memory model, what else? What is the speed comparision with SPIN and ASM?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2009-03-12 04:45
    Update.

    We have assembled a team. From this post I have at least eight (8) C developers who want to contribute. I could handle about 6 more for a total of 14 people. With this size we should be able to push ICCV7 into the realm of acceptability for commercial applications if 1/3rd of the team delivers documented and functional objects. And whatever is "wrong" with ICCV7 we can improve with the support of Imagecraft. Everybody who requested ICCV7 shall receive a license courtesy of Parallax and Imagecraft. By Thursday I'll reply to everybody who has contacted me via PM or e-mail.

    We still have room for others.

    Thank you for the support thus far - let's make this compiler useful for the C programmers.

    Ken Gracey
  • jazzedjazzed Posts: 11,803
    edited 2009-03-12 05:19
    Timothy D. Swieter said...
    Hmmm....I have been wanting to try C for the Propeller. I need to read up on it again and maybe use the trial before asking for freebies. Someone that is more familiar with the C implementation in the Prop, can you give a quick overview for others that may pop into this thread? I have seen the discussion of large memory model, what else? What is the speed comparision with SPIN and ASM?
    The ICCPROP C compiler is ANSI C 89 with some extentions ... allows·"//" inline comments for example. Below are some measurements I made from an early ICCPROP release.

    SPIN/PASM/ICCPROP Comparisons
    

    SPIN PASM     ICCPROP[noparse][[/noparse]1] - Condition
     
    25us 200ns    1.04us - Bit toggle while loop cycle[noparse][[/noparse]2] time.
     
    40us 420ns    2.1us  - Bit toggle while loop set by if-else loop with ndx & 1.
     
    50us 520ns[noparse][[/noparse]3] 2.9us  - Bit toggle while loop set by if-else loop with ndx & 1 + increment.
     
    40us 420ns    3.8us  - Function call bit toggle while loop cycle time.
     
    26s  800ms    14s    - Fibo29 test (relative ... not necessarily the best performance measure).
     
    [noparse][[/noparse]1] ImageCraft C default LMM unrolled by 4 and uncached.
    [noparse][[/noparse]2] A cycle is a transition from state 1 to state 2 back to state 1. Some "periods" of cycles are asymetrical.
    [noparse][[/noparse]3] Asymetrical comparison if_z, if_nz, then increment.
    
    


    ICCPROP is very competetive with SPIN and "not much worse" than PASM in most cases on performance, but C binary code performing the same function as SPIN will be about·four times·bigger than·the SPIN binary.

    I've written complicated code in SPIN, PASM, and C. SPIN is a little easier than C from a module management perspective being an obj.method, etc... middle level language.

    C and SPIN are comparable in many ways in language features except that C organizes data structures better; SPIN DAT blocks can be data structure like, but not VAR blocks. C is a strongly "typed" language providing better accident prevention ... SPIN allows anything to be passed to a method in any way. C has an explicit multi-dimensional array syntax and SPIN does not. C is of course compiled and run by the LMM interpreter COG and most instructions are executed by the COG core; SPIN is compiled to bytecodes and interpreted by the SPIN COG VM. SPIN is a fair compromise of object oriented ideas and structured simplicity. C is of course a structured language that can be used in obscure ways to perform in object oriented ways. C has function pointers, SPIN does not (not directly anyway ... there is a way to trick SPIN into calling object methods in a "function pointer" way).

    SPIN provides lots of language operator features not found in C such as the |< decode operator. NOTHING is wrong with SPIN of course, except for maybe the "repeat n from -1 to -1" statement [noparse]:)[/noparse] and it is fairly easy for the novice to understand. C is an industry standard and ICCPROP works well. C to me at least is a little better organized at the module level. The comment delimiters of the languages could not be more different, but the basic idea of block and inline comments are similar in both.

    Free C programming tutorials are everywhere on the net. If you can write SPIN, you can write C.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • ImageCraftImageCraft Posts: 348
    edited 2009-03-12 06:33
    Thank you Ken for spearheading this.

    Just a quick note that ICC user should sign up for the icc-prop mailing list (http://www.dragonsgate.net/mailman/listinfo) as we announce updates there. In fact, I just made a new one release:

    **
    V7.04C March 11, 2009
    Assembler
    - Fixed the restricton that only one tab is allowed at the beginning
    of a line in an asm file.

    ***

    This fix eliminates an unnecessary aggravation with writing asm driver code.

    What I hope to do eventually is to allow users to browse for C objects on the web using the ICC IDE and download them as they wish, automagically. One step at a time though...
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-03-12 08:12
    Jazzed - thanks for the overview, OK, this is intriguing me. This may be the push I need to get back into C since I only did a little of it in college and various odds and ends since. Can ASM be written in-line or called some how? Probably another post somewhere on this, I will search the forum later tonight.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • Brian FairchildBrian Fairchild Posts: 549
    edited 2009-03-12 08:43
    Timothy D. Swieter said...
    Can ASM be written in-line or called some how? Probably another post somewhere on this, I will search the forum later tonight.
    Have a look in the online help for ICCPROP over on the imagecraft website.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-03-12 08:44
    Will do Brian. You know, I might have to write some RGB LED and LCD display drivers, that would be a good exercise.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • TJHJTJHJ Posts: 243
    edited 2009-03-12 16:31
    E-Mail Sent. [noparse]:)[/noparse]

    Great work all.

    TJ

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I owe everyone here a bunch, So thanks again for answering my dumb questions.
    Projects. RG500 ECU system. PropCopter. Prop CanSat. Prop Paste Gun.
    Suzuki RG500 in a RGV 250 frame.
    Bimota V-Due (Running on the fuel injection system)
    Aprilia RS250
  • PavelPavel Posts: 43
    edited 2009-03-12 16:38
    Ken,

    I'm a professional software developer with extensive experience in C (in addition to other C-like languages) and I also have 2+ years of experience with Propeller (mainly Spin). I'd like to contribute to this initiative and I've sent you a more detailed e-mail last night (or very early this morning --- it's all one blur smile.gif ).
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2009-03-12 16:43
    OK Pavel and others.

    I'm finishing up some tasks this morning and I'll get through the PMs and e-mails by early afternoon, and set up each of you with the ICCV7 compiler license.

    Thanks for your patience,

    Ken Gracey
  • RaymanRayman Posts: 14,849
    edited 2009-03-12 16:58
    I would really love to work on this... Sometimes I want to just quit my job and do this stuff all the time! (Isn't that sad?). I've had the full ICC software for a long time (at the original price), but still haven't found the time get started with it.
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2009-03-12 21:30
    I've got enough C coders at this stage, so I need to stop accepting more of them and reply to those who have graciously agreed to participate.

    It's going to take me a day or two to get back to all of those who've made a request to participate, so please be patient. Each person has a variety of specific requests that can't be handled in mass. I literally ran out of bandwidth replying to e-mail and doing my regular job, almost like returning from a week off of work (two weeks to catch up!).

    Thanks, Ken
  • jazzedjazzed Posts: 11,803
    edited 2009-03-12 23:11
    In over your head a little Ken? I'm sure you'll get through this fine. Make a list, check it twice, find volunteers to fill in the blanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Need a Propeller PC logic analyzer?
    Try Propalyzer http://www.brouhaha.com/~sdenson/Propalyzer
    http://forums.parallax.com/showthread.php?p=788230
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-03-13 00:15
    I chose to not sign up because I am sure there are better souls out there to take the first crack at it and get the most for Parallax's money/license being given out. I am very excited though to see what starts showing up so that I may improve my C and keep using the Prop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2009-03-15 03:15
    Update: Parallax and ImageCraft have distributed for free over a dozen ICCV7 Compilers to forum members in the last two days. All of the participants live on the forums so there will be a general increase in C activity from this point forward.

    Our hope is that this will generate some functional C objects for other customers, and speed the maturity of ICC for the Propeller into a quality product.

    Sincerely,

    Ken Gracey
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-03-15 03:22
    Hi, probably a fairly obvious question for a seasoned C programmer but I would like it clarifying , what makes a Propeller C object , is it just a module or modules + header.

    thanks

    Jeff T.
  • jazzedjazzed Posts: 11,803
    edited 2009-03-15 16:35
    Unsoundcode said...

    Hi, probably a fairly obvious question for a seasoned C programmer but I would like it clarifying , what makes a Propeller C object , is it just a module or modules + header.

    thanks

    Jeff T.

    Hi Jeff.

    This is not an unreasonable question ... many seasoned C programmers have such expectations. ImageCraft provides source (for licensed users), headers, and libraries. The .c files·are often obscured (less these days than before) and headers with good documentation are provided with the libraries.·Spin does not have all the "facility" of C, and the obex has full sources for Spin. It is Parallax ultimately that should make the decisions on OBEX content, but the community can offer suggestions.

    Proposed C OBEX Content:

    It seems to me at least that·in the best interest·of the community·C OBEX packages should:
    1. Have the source files (*.c *.h and non-generated·*.s ... .S or .asm)
    2. Have the project files (.prj and .src)
    3. Have instructions in a README.txt for building
    4. NOT be missing files required for successful build with default ICC installation
    5. NOT Have·Output files (*.lk, *.o, *.cmd, *.binary, or generated *.s)
    6. All·files require Copyright YEAR, Your Name (and others if applicable) and MIT license.

    Output files defined above should never be included in the obex package. Optionally, one can provide libraries which can be generated with ilink-prop.exe, but these may not be optimal for everyone using the package especially for any unused functions, etc.... Parallax might prefer not having libraries in obex anyway.

    To make all of this easier to produce and use, it is best when you start a project to define an output directory using: Project->Options->Compiler Options->Paths·... In the Paths tab you can define the Output Directory·(remove any quotes from the text box or ICC will complain). Once you have defined an output directory, you will exclude it from your project directory .zip folder before submitting to obex.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • jazzedjazzed Posts: 11,803
    edited 2009-03-15 16:55
    BTW: I am not a big proponent of "Coding Standards" as the language definition is usually good enough for me ... BUT I would recommend that any code posted should at least have function APIs well defined in some form. It does not matter much whether this is done in the .c or .h file ... people develop their own styles.

    What does matter is that function return values (if any) and parameters are clearly and fully described.

    Misusing functions are the biggest contributor to "functional" bugs second only to misusing global data (in my experience ... YMMV).

    One of the nicest documentation tools available in my opinion is Doxygen ... many industry types use this package for producing readable docs from marked up sources. Good engineers using the package make the tech-writer obsolete ... some engineers give tech-writers job security [noparse]:)[/noparse] Doxygen is available on Windows, Linux, and Mac OS. Doxygen can generate HTML, RTF, and Latex doc package/files.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • telluriantellurian Posts: 52
    edited 2009-03-15 17:22
    jazzed said...



    It seems to me at least that in the best interest of the community C OBEX packages should:

    <OL>
    <LI>
    <LI><FONT color=blue>Have the project files (.prj and .src)

    <LI>
    <LI><FONT color=#0000ff>NOT be missing files required for successful build with default ICC installation

    <LI>
    * <FONT color=blue>All files require Copyright YEAR, Your Name (and others if applicable) and MIT license.

    </OL>
    Output files defined above should never be included in the obex package. Optionally, one can provide libraries which can be generated with ilink-prop.exe, but these may not be optimal for everyone using the package especially for any unused functions, etc.... Parallax might prefer not having libraries in obex anyway.

    I'll second this proposal, it covers the basic content requirements. Good documentation cannot be stressed enough, and it is probably best to aim it at beginners, not seasoned C hacks.

    -tellurian
  • NetHogNetHog Posts: 104
    edited 2009-08-27 17:03
    Wish I saw this back in March [noparse]:)[/noparse]
Sign In or Register to comment.