Shop OBEX P1 Docs P2 Docs Learn Events
SX C++ — Parallax Forums

SX C++

Oliver H. BaileyOliver H. Bailey Posts: 107
edited 2006-05-19 04:09 in General Discussion
Hello Everyone,
The attached SX SRC file was actually written in an older version of SourceBoost C++ and a postprocessor that I'm about finished with. It will run in the SX-SIM, assemble, and program without a problem. It essentially creates a task class for a multitasking OS and flashes RB.0, RB.1, and RB.3 at different rates. I also have the Sourceboost C working as well, and I am going to get the SourceBoost Pascal working next. This is not intended to replace the current C development going on right now as I'm pretty certain the C compiler coming will have a lot more support for things like LCD's and I2C Master/Slave interfaces. This is more for people who may want C++ or Pascal as an alternate langauge choice for the SX. If there's enough Interest I would be willing to see what type of licensing can be done and provide a real manual in PDF format along with the postprocessor tools.
I'm also working on an SX-Key interface for Linux. I have the communications working between the key and the OS. I'm wring some command line utilties that can be used to download the code and start the debugger. Sadly, SASM is a DLL so there isn't much chance that I will be able to port the assembler, however I already have the assembler running under WINE. If theres enough interest, I will turn this into a real product. Not too expensive, somewhere between $29-$39.

Let me know if theres any interest.

Oliver

Comments

  • James NewtonJames Newton Posts: 329
    edited 2006-05-18 05:40
    Well...

    It's always good to have another language to choose from....

    but...

    Since SourceBoost does not appear to be open source at first glance, and since using C++ on an SX strikes me as being sort of like useing a nuclear reactor to fry eggs, I'm not sure I see the point.

    What does SourceBoost have to offer that any of the other commercial C compilers don't?

    Pascal would be cool! There is already an open source Pascal like language called XPL0 that is available for the SX, but it is byte code interpreted so I don't think there is a Pascal compiler.

    A Linux deveopment system for the SX would be very cool and might bring in some nice open source people to the SX table. When you say "start the debugger" what exactly does that mean? Is there a debugger for the SX-Key under Linux?

    And by all means, do something to replace SASM. It's a wort on a blot on the face of reliable assembly. On the other hand you have to understand; when I say assembler, I mean with a good macro ability. The nicest assembler in the world is worse than even SASM if it doesn't have really good, powerfull macros. In my mind, assembler = macro processor + oh, yes, those instruction things for the uC. SASM is fine for standard assembly, I just rail against the messed up, buggy, macro support in it.

    And yes, I have reported many of those bugs. The fact that I'm probably the only person who uses the macro features to that degree makes it perfectly understandable that they have not been fixed. My understanding is also that SASM is rather a can of worms internally and needs to be re-written anyway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • Oliver H. BaileyOliver H. Bailey Posts: 107
    edited 2006-05-18 12:09
    James,
    This is not intended to be an open source project. It's also not a debate over C++, since code compactness on C++ (as with other object oriented langauges) is highly dependent upon style of coding. I've used this C++ compiler and I have not had problems with memory usage. I made the original post to see if there would be any interest in having another set of compilers (pascal, C, C++) available for the SX. If you look at the source that I posted, you will see that it loads, assembles, and runs in the simulator (and debugger) today. My intention was to see if there is any vocalized interest in this. Of 55 people who viewed this so far, your the only one to express interest, so it appears that interest is minimal at best. If no one else has interest then I will just continue to use it myself. I am developing an interface to the SX on Linux. That WILL NOT be open source. Not everything is meant to be open source. SASM is here to stay as there is no reason to write a new SX Assembler. SASM works and the core of the processor is not changing, so there is no reason to invest time and money in a new assembler. These are not byte code compilers (which are actually called interpreters), they actually create assembly code. Then I run it through a post processor to make it compatible with the SX-Key and simulator/debugger. If there is enough interest in making this a product, I was also going to add a PDF manual, and see if I can bundle the compilers and offer this package at a reasonable price which would be well within the reach of students and hobbiests. If I see enough positive reponse then I will make the product offering. If not, I will simply continue to use them for my own needs.

    Regards,
    Oliver
  • dkemppaidkemppai Posts: 315
    edited 2006-05-18 15:57
    Oliver H. Bailey said...

    ...This is not intended to be an open source project.·I made the original post to see if there would be any interest in having another set of compilers (pascal, C, C++) available for the SX. My intention was to see if there is any vocalized interest in this. Of 55 people who viewed this so far, your the only one to express interest, so it appears that interest is minimal at best. If no one else has interest then I will just continue to use it myself. I am developing an interface to the SX on Linux. That WILL NOT be open source...
    Maybe you could explain to us the advantages of the additionial 'for pay' compilers·you are working on.
    So far, all I see is a 'possible' announcement for a language, which as far as I can tell will be very similar
    to other products being developed or that are currently avaliable.

    Right now·I'm waiting for the parallax supported C compiler to be finished up. If you have something for
    a similar price, that will be avaliable sooner with the same level of support, I'm all ears!

    -Dan

    ·
  • Oliver H. BaileyOliver H. Bailey Posts: 107
    edited 2006-05-18 17:25
    Dan,
    If you downloaded the sample program and ran it you would see that this is a C++ file compiled to work with the SX-Key assembler, simulator, and debugger now! So it's hardly a "possible announcement" as it already works. I don't think there are any other Pascal or C++ compilers out there that work within the SX Key program, so I'm not sure what other SX compilers your referring to. As I said in the original post, I am looking to see if there is enough interest in making this a product for sale. If there is enough interest, then I will do the documentation and provide support and make it available for users at a reasonable price. I have not seen any other C coilers that currently work within the SX-Key IDE and you state that you are waiting as well. I would be interested in seeing the other products your referring too, since I have been looking for a solution for months and found none that worked. So share with us with the other compilers available today. If one of them is better and priced right then maybe I'll buy it as well.

    Regards,
    Oliver
  • James NewtonJames Newton Posts: 329
    edited 2006-05-18 18:14
    Let me be more clear. If you have "SX/P" (a Pascal for the SX) I would be very interested in knowing the full price. I assume that would include the price of SourceBoost and then the price of your post processor. I guess there are other people who would be interested in "SX/C++" but that is not I. It may be a good thing to have an alternative to SX/C since that is currently "vaperware"

    But if you aren't going to open source, then you have a credibility problem. Serious language vendors are expected to maintain the langauge, support it, and keep it available for long times to come so thier users don't get stuck without support, etc... after purchasing the program. You are talking about a solution that depends on 3 totally seperate companies. If this is an "also ran" or an "I'll do it if enough people pay" or anything like that, then it is an invitation to us to loose money /in the long run/ when the next version of SASM doesn't support your output or the next version of SourceBoost doesn't supply working input or whatever.

    If the price is low and someone has a specific project that they would love to write in Pascal (or C++ :/ ) then it's probably worth the money for a one off thing.

    I paid Pavel for a copy of C2C a long time ago. Then he dropped out of site and I guess sold the compiler to someone else (?) and now he is back with SourceBoost. My registration is not valid and there is no upgrade path (as far as I can see) so my investment is wasted except for the 1 project I did with the compiler when I purchased it.

    Since then, I've stuck to SASM used a little SX/B to make that easy sometimes. I tried investing my own time in macros to make SASM more like a real language and still use those (lots of good return on my investment there) but lack of interest from others and buggy support for macros in SASM limit that.

    I'm eagerly waiting for SX/C and hope it will make larger projects with the SX48 easier to justify. In the mean time...

    ...I recommend MSP430s to my clients when they need a more complex project...

    ...sad huh? I still do small, high-speed projects in the SX28 in SASM / SX/B / my macros. But the investment in the IAR compiler for the MSP430 is justified by the number of versions of that chip and the range of solutions I can provide with it. Untill there is a solid, low cost C compiler available, I'm staying away from the 48.

    If you sold your source to Pavel or to Parallax (and they contracted with Pavel) , I guess that would help my feelings on it.

    Hope that makes sense... Don't mean to belittle your project; its a wonder that you got that working!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-05-18 19:06
    I'm not doing much at the moment with microcontrollers, but I would definitely look at a C / C++ / Pascal package.

    If you have the time / resources, I would say put it on the market. If you get a good package together, you can always shop it around, and find different sales channels, especially within edu. You could also self-publish books built around the package, bundled with an SX board & SX key, and create a product similar to the Stamps in Class courses.

    What would be cool would be to build an Eclipse-based IDE for the Parallax micros that supported all of the languages. Also, a way to easily use text editiors such as UltraEdit, with a link to the compiler, would be good.
  • Oliver H. BaileyOliver H. Bailey Posts: 107
    edited 2006-05-18 20:11
    Hello Everyone,
    I thought my original post was clear but I guess not. Let me clarify a few items. It is not my intention to sell anything in this fourm. There is another fourm for that purpose. Second, some of the posted comments would infer that I am selling another persons compiler, which I am not at this time. What I am doing is putting together pieces from one other source and myself to make a cost effective alternative langauge solution. Since my career dates back publicly to the Model I Radio Shack and the original IBM PC, I don't think my credibility is at issue here. The purpose of the original post was to see if there was enough interest to offer a product of this nature. I would have to write a manual, and there are several logistics that need to be worked out. So, this is not a "possible langauge announcement" but rather information gathering. Becuase this is information gathering, I have not set a price because there is not a product offering as of yet. I seemed to have sparked a debate that is wide encompassing and that is not and was not my intent. I have not written any documentation for this as of today. I am well aware that I would have to support this and that is why I am trying to guage the level of interest. I don't want to invest time and money to find there is no interest in a product of this type. On the other hand if I get a postivie response and enough people saying they are interested, then I will pursue putting this together as a product. Of the comments thus far, Kevin has the best handle on where this is going.
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-05-18 23:22
    I would also like to clarify that the SX C compiler is by no means vaporware.

    We just like products to be as clean and professional as possible before we release them.

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • James NewtonJames Newton Posts: 329
    edited 2006-05-18 23:59
    Sorry if I offended, Ryan. But what do you call a product that has been promised and not yet released? Indevelopmentware?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • Oliver H. BaileyOliver H. Bailey Posts: 107
    edited 2006-05-19 01:24
    One final note. I have not seen it printed anywhere that the Parallax C compiler is or will be free, or that it is or will be open sourced. I believe that Parallax has been very gracious and generous in spending time and money to develop the SX Basic compiler and offer it at no charge. As for the Parallax C compiler, compiler writing is not throwing a few lines of code together to blink an LED. There is a lot of work, and even more thought that goes into writing a compiler. Imagine writing a program that may generate an infinite combination of codes that have to work together each and every time. Having written code generators and parsers myself, I can tell you it is not a picnic and sometimes bugs get reported years after the project is finished. I see a lot of people critize compiler bugs and I would suggest those people write a compiler or two and then critize. The CCS compilers are excellent products and offer a tremendous number of peripherals that are unmatched by anyone else. There are no perfect compilers! The right combination of source code will eventually break even the most stable of compilers. The same holds true for operating systems. When the first space shuttle blew up after takeoff, NASA found numerous holes in the operating system that would cause an aborted takeoff to send the shuttle out of control into the ocean because the program would simply hang. And in all fairness the Parallax C project has only been going on for slightly under 6 months, less time than it takes to give birth. I believe the goal is to provide tools that are worth using at affordable prices and with adequate support. That's all I have to say about all of this. I never meant to spark debate or defend my credibility as a result of the original post. I will monitor this for a few days and see if there is any real interest in my idea.

    Regards,
    Oliver
  • pjvpjv Posts: 1,903
    edited 2006-05-19 02:20
    Hello Oliver;

    I have been following this thread with some serious interest. I presently write all my SX code in assembler, and the same for the Propeller code. That does not mean that I am not interested in higher level languages..... its just that from the little I've seen there has not been much to crow about for the SX controller. I believe for me this will change with the Spin language for the Propeller, although when I need high performance (usually), 200 to 500 machine instructions per high level instruction and the non or poor determinism to boot, just won't cut it.

    That said, I believe Spin will be phenomenal as an over-layer orchestrating a bunch of real-time/fast stuff done in assembler in disparate Cogs. I'm having so much fun learning all that already.

    Back to the "C" issue, I am looking forward to the Parallax release of a regurgitated CCS compiler. I had purchased the CCS product (albeit it was only offered as a Beta), and found it to worse than totally useless. So with Parallax with their serious customer satisfaction approach to business, I'm sure hoping for the best..... but won't be surprised if it remains disappointing. I doubt that ANY amount of work could make that pile of cr@p usable. My belief was that a total re-write was contemplated, and all PIC-ness would be eliminated at the roots, not just "worked around". If that happens, then there could be some good things in store.

    I applaud you for the work you have undertaken; I would find a Pascal or C compiler performing well on an SX a great value... not being a "tools guru" I'm sure there is a lot involved.

    One last point; I know nothing about the other CCS products (mostly PIC, I believe), but I hope your statement of "The CCS compilers are excellent products" excludes the one they created for the SX. If not, then in my eyes your judgement of what is "excellent" raises some serious doubts.........

    Cheers,

    Peter (pjv)
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-05-19 04:09
    Well, the fact that Parallax is working with CCS to develop a C compiler @ ~ $100USD is because there IS a market for a reliable, affordable C compiler for the SX.

    I bought a RS WAM kit to refresh some electronics theory, and it's more fun than I expected. But if it came in either C or Basic versions, I would have personally picked C, simply because I'm not very interested in Basic, but very interested in C. Others have posted that they are looking forward to the CCS compiler for learning C, while working with a product they are interested in (SX uc).

    As far as support is concerned, it isn't fair to compare Oliver to Parallax or Pavel. He hasn't even put the product together yet, and people are taking pot shots at his ability to support it.
Sign In or Register to comment.