Mac OS X Support for the SX compiler?
I realize this is a long shot...
I've been playing with my Basic Stamp and I love it. But it is expensive to roll out in any significant projects. PIC is one option I suppose, but I like Parallax. MELabs (the PIC pro compiler folks) have no interest in releasing a Mac version of the command line compiler (I even offered them a machine and help in porting).
Is there any chance that Parallax might release a Mac version of the SX compiler? I'd expect that most of the compiler aspects would be pretty platform agnostic.
Scott Anguish
Apple employee (but not speaking for Apple)
I've been playing with my Basic Stamp and I love it. But it is expensive to roll out in any significant projects. PIC is one option I suppose, but I like Parallax. MELabs (the PIC pro compiler folks) have no interest in releasing a Mac version of the command line compiler (I even offered them a machine and help in porting).
Is there any chance that Parallax might release a Mac version of the SX compiler? I'd expect that most of the compiler aspects would be pretty platform agnostic.
Scott Anguish
Apple employee (but not speaking for Apple)
Comments
When you say the "SX Compiler", are you referring to the IDE or to the SX/B compiler, or both? If you're referrring to just the SX/B cimpiler, then one problem is that the SX/B compiler only outputs assembly language source code. You'd still need an SX assembler on the Mac as well as some sort of tool to program the SX chips on the Mac.
Thanks, PeterM
Well, I had figured that the downloader would have been a separate bit of business, like the Stamp. Didn't realize that the compiler output assembly source, rather than a binary image. So I guess it'd be the compiler and the assembler. does the SX not support an in-place programming method like PICs?
The IDE isn't so much of an issue. It's the tool chain that is really needed. The Xcode development environment on the Mac is free, and if there were command-line tools they could be integrated with it.
I know nothing about the Mac so please excuse me if this is a dumb question, but can the Mac run windows console mode apps ?
If you run SXB.EXE you will get a simple console text display showing the version # and stuff.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Coming soon... Cheap 4-digit LED display with driver IC·www.hc4led.com
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."
·
But if you're like me, the thought of installing Windows on my Mac kinda turns my stomach. That's why I keep a real PC around just for those tasks.
The biggest issue is addressing the com ports. (Bean, Windows console mode is the one mode NOT supported on any other OS in emulation mode). If your running the latest version of the OS (which is built on a FreeBSD kenrel) you can download the WINE system and run the SX Interface, BUT you will still have issues with the com port. That could be an issue with the FTDI interface as well as their calls on non-Windows platforms are not the same as their calls on Windows. There isn't much of a market for embedded tools on the MAC and it's uncertain how much of a market exisits for the Linux and Unix markets combined. CCS doesn't support the MAC at all and they are doing the C compiler so I can say with a high degree they probably won't be supporting the MAC either. As you probably already know, Microchip doesn't support the Mac with MPLAB either. Communications programming at the application layer is completely different for each of these platforms, that's why there isn't greater cross-platform support. Your goin to have a tough time getting vendors excited about doing a Mac port unless you put up a large sum of money. They will never recover their development costs unless someone pays in full for the port.
For example if I write hello world in C++
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
return 0;
}
and compile it on the macintosh in x code and visual C for the windows platform. I can run it in the "console" on both.
via something like C:helloworld.exe on the windows platform and helloworld on the macintosh (UNIX) platform.
So yes both have console mode. If Parallax has written the core compiler and assembler in ANSI C/C++ then in effect they could create a console mode version of those core programs. Then as the person from apple said then macintosh users could use something free like X Code or someone could make a simple front end (like the basicstamp Macintosh front end) to:
1. take the sx/b basic text file and run it through the console compiler something like this sxb-compiler -v -a /the/path/to/the/text/file.sxb
2. then send the assembly code through the assembler like this sxb-assembler -v -a /the/path/to/the/text/file.asm
3. finally send it to the com (serial) port (via USB to serial like I use in the macintosh basic stamp program) like this sxb-send -v /the/path/to/the/asm/file.hex
if console applications could be made then I am sure the Apple community could create a front end to Auto run those commands. (I would)
But I am also sure that if you are working with electronics and programming SX chips I am sure you know what the command line on the Macintosh (UNIX) looks like and could run them manually. pico + command line = programmed chip.
Is there any chance that Parallax is using standard ANSI C/C++ for there core functions?
Don Myers
I think I remember hearing that the software is written in Delphi (or maybe that was the stamp IDE ?).
Is there a Delphi compatible compiler for the Mac ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Coming soon... Cheap 4-digit LED display with driver IC·www.hc4led.com
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."
·
Bean-
That was the word I heard too. There isn't a true Delphi setup for Macs like there is for WinTel PCs, and while there is a sliver of hope via the very UNIX-y underpinnings of OSX (really MACH and BSD stuff, not true AT&T UNIX, but...) but no one has taken the time to do more than pay it lip service. My main hope is that at some point the SX tools will be rewritten in a more compatible language that can be ported more easily. I sincerely hope it doesn't take as long as it did for the Stamps though. I can't resurrect my old Thinkpad many more times.
-dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
This is not a sig. This is a duck. Quack.
command line application #1 compile SX/B to ASM
command line application #2 convert ASM to HEX
3rd. outline the download protocol (I believe I found this on another site) this way we can write a serial download program that works with the KEY.
No windows, No Low Level drivers, No Buttons and graphics. Just open specified text file, run function on it, save to hard drive in same place with new extension.
But, I guess it depends at this point on:
1st How close to standard Pascal is Delphi? if it's not anywhere close then it will prob. cost Parallax too much money to manually convert and maintain 2 versions. a 100% delphi version with GUI and a standard pascal command line version of compile & assemble only that they can compile on any standard pascal compiler.
2nd How tightly the compiler/assembler are tied in with the GUI (in delphi source code). Sort of like the EU asking MS to remove window media player from windows. Is the compiler & assembler a completely sep. "function/object" so to speak or do they rely on "global" GUI variables or objects and therefore to remove them would be a complete rewrite. Everyone talks about "object oriented" code where a object can stand on it's own but I admit even I could make my code a little more "object oriented" and therefore pulling a really cool canvas class I just created from one source file into another in the same IDE/language is a little harder than it seems at first.
Don Myers
Comments welcome sorry about the grammar and spelling. I am in a rush to get out the door for meeting but, didn't want this thread to die.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
And quit calling me Shirley [noparse];)[/noparse]
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Coming soon... Cheap 4-digit LED display with driver IC·www.hc4led.com
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
For example HI-TECH Software has a c compiler for the macintosh and others
http://www.htsoft.com/products/hitide3.php
As well as a free version for the macintosh and others
http://www.htsoft.com/products/PICClite.php
This is for the microchip PIC
I can also program the AVR on the macintosh in C for free.
http://ccrma.stanford.edu/courses/250a/toots/avr-osx.html
http://www.anyma.ch/2006/research/avronmac/
http://www.tigoe.net/pcomp/resources/archives//000635.shtml
I have also read how to compiler SDCC "Small Device C Compiler" for the macintosh (ie it's gcc code which creates a command line tool...)
http://sdcc.sourceforge.net/
So I can certainly program a microchip PIC and AVR MCU from the macintosh in C.
But, I to am very much like the very first poster. I started on the parallax stamp and have spent quite sometime learning PBasic. I have also gotten a few other Parallax kits. I like Parallax a lot. This forum is a great example of their support and commitment in their product. That's important to me.
Right now, I am at the "The BasicStamp was fun...." and programming it from my Macintosh made it even better and was one of the reasons I got it in the first place.
http://www.muratnkonar.com/otherstuff/macbs2/downloads.shtml
But putting a BasicStamp in every project is expensive.
Yes, I have a PC laptop as well as my Macintosh laptop. I prefer to use the Macintosh Laptop.
So for me it comes down to.
1. Download and use one of the few C MCU compilers for my Macintosh and switch to a different company and take a whole new path.
2. Stay with Parallax and use SX/B on my PC.
As for writing my own command line compiler for a PBASIC like language. Well if I had that knowledge I wouldn't be programming in SX/B and I'd be looking for a different job. Take a look at "Who is SDCC?" That's no short list. No my day job might be in software design but, that's a long way from compiler design.
If Parallax had a SX/B command line tool for the Macintosh then I wouldn't have even looked into the AVR or Microchip MCUs. The Macintosh users have a few choices. But, None of them are for the SX.
Don Myers
1 - How tightly is SX/B integrated into the IDE?
The integration between the IDE and SX/B is extremely decoupled. SX/B is a command line application that is called from the IDE, which treats it as an external tool. The IDE passes it the name of the file, waits for SX/B to complete, and then reads either the assembly listing or the error text file.
2 - How close are Pascal and Delphi as languages?
Delphi is Pascal, it's just got object oriented elements applied as a superset. Think of it as similar to C versus C++, and you'll understand the basic relationship here.
3 - How about porting the IDE Gui?
Probably not in this lifetime. The IDE was/is written in Delphi and until Borland decides to port Delphi to the Mac, the effort to port the IDE to the Mac so far exceeds the return as it make it a moot point. Without a Mac version of Delphi, it would be a from scratch re-write, not a port.
4 - What about SASM?
SASM is written in plain, vanilla C. It could compile and run on the Mac with a modest amount of porting effort. It started life as a command line program, so making a command line version for the Mac is straightforward. However, since I don't have a Mac (and there are no plans to open source SASM), I have no means of performing the port. Unfortunately, I also have no motivation to do a port. Unless Parallax suddenly decides to pay me to do a port, I would have to donate my time to perform and maintain a port on a platform I don't use and have no plans on using.
So, where does that leave things? Well, if somebody (or bodies) decided to put up the cash to pay for someone to port SX/B and someone to port SASM, you would have the first two elements of the tool chain. Someone else would have to write a Mac program to control the Sx-Key or SX-Blitz to program the chips. The protocol for programming (not debugging) is freely available on the Parallax website. Then someone would have to tie it all together with either shell scripts or a some other means of controlling all the pieces.
The result? "DOS style" embedded programming circa 1985, but running on a brand new, multi-thousand dollar Mac instead of an old XT clone.
You could do all of this, or you could buy the cheapest PC you can find (Frys has them around $300 with Windows OS) and just use the tools that are already available that provide a full GUI to do all the grunt work and let you do hardware debugging. Given that Mac folk are always talking about how easy the Mac is to use, I'm not sure why there seems to be this near Herculean effort to create a crude, unsophisticated, command line only tool chain to run on a machine and OS that always touts graphical and ease of use superiority.
Still, if someone wants to buy me a Mac and pay my rate, I'll gladly port SASM and get you started on the first step to command line mania!
Thanks, PeterM
But then every bug fix and update will require twice as much work.
I have nothing against the Macs, but I think the effort would be better spent on things that will benefit the vast majority of SX users.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Coming soon... Cheap 4-digit LED display with driver IC·www.hc4led.com
"Sometimes it is better to remain silent and be thought a fool, than to speak and remove all doubt."
·
Don Myers
I'm not suggesting in any way that the IDE be ported. Simply the compiler/assember. As PJ has said, those are fairly portable. However, unlike what PJ said, this would not give you a basic DOS level environment for development. All the tools to do professional OS X development now are command line tools that are run through a great IDE called Xcode. You edit in that app and the compile/link/go is all coordinated by that appliciation calling the various command line tools and funneling the commands through it.
Jon's point about the bottom line being if it would make Parallax money is honest, and I applaud him for it. I guess it depends on where Parallax is headed long term. Do they intend to motivate the hobbiest users to graduate from STAMP to SX or to Propeller? Right now it seems that the only option for those not using PCs (linux and Mac users) is to move to one of the free tool-chains for the other microcontrollers.
I think it's important that more thought be put into making to the main 'proprietary' tools cross-platform. Specifically, I'm talking about the compiler and assember tools. These rarely need to have anything that is platform specific directly part of their code. These are also fairly easy to debug in a cross-platform environment if they dump binaries that are then downloaded to the chips by a separate application. If properly documented, I'm sure that the download applications would spring up on the target platforms from third party users.
And honestly, I don't really understand why each microcontroller compiler is creating its own IDE. Why not leverage something cross-platform/free like Eclipse?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
With regards to Eclipse versus a custom IDE, perhaps the single biggest factor involved is that Chip Gracey originally wrote the IDE before the Java language was even invented. As a result, the SX-Key IDE was up, running, and programming thousands of chips years before Eclipse was even a glimmer in someone's eye. To leverage Eclipse now would once again put us back in "re-write from scratch" mode.
Further, I have no idea what would be involved in trying to get hardware debugging support working under Eclipse. Right now, the IDE is custom designed to show the user all the registers and memory of the chip during debugging, as well as setting breakpoints, etc, etc. Trying to create the same level of support in Eclipse would require... what? I have no idea. Have you spent any time working with the Eclipse code? Do you have any suggestions as to the level of work required?
Of course, there are also the little things that users take for granted until they're gone. On my machines, the Sx-Key IDE launches in about 1 or 2 seconds. I have never used Eclipse, but I doubt it launches in anywhere near that amount of time. I know this sounds trivial, but when a product goes from a near instant launch to a 10 or 20 second launch, folks get upset. Remember a couple of version ago when Adobe Acrobat used to launch really quick? Then Adobe came out with a "de-provement" which took waaay longer to launch. Suddenly, people started posting fixes where you deleted a bunch of DLLs so it would load faster.
All of this is a long way of saying that while the idea of leveraging an existing body of work like Eclipse may sound good on the surface, there are often very solid underlying reasons for why it's not being done.
Thanks, PeterM
BTW, I'm glad you brought all of this up. Despite sounding like some sort of voice of doom or whatever, I think it's important to at least bring these issues up. It lets everyone gauge the level of interest and offer possible soultions that people might not have thought of individually. Nothing ventured, nothing gained.
Thanks, PeterM
It seems unlikely, but thanks for the thread. It certainly won't happen without a little discussion.
JimC
I didn't think you were the voice of doom, so no worries. I'm surprised that the IDE is as old as that though.
I can't see any downside to ensuring that the basic compiler and assemblers are written in a manner that allows a cross-platform version to be created. Even just releasing them as a lib as has happened with the stamp compiler would be a huge move forwards.
I'm anxiously awaiting the updated STAMP lib this May.
And no, this is a different DMyers.
Project Engineer
D Myers
Software / Hardware Engineer & Hobbyist
Who specifically were you addressing your post to?
Thanks, PeterM
The intended audience was our friends from Parallax and our good friend from Hitt Consulting. I think if they would honestly look at the market they so chose to ignore so far, they would find that the market is there to support the product. Additionally, they could us a select interested customer crowd with the right background to write the interface. A little research turns up a fabulous software tool called RealBasic that allows you to write an interface and compiler that would cross compile to Windows, Linux, and Mac with just a checkbox click. (Heck the folks from RB (Realsoftware) are now using there own language and complier to write newer versions of itself.) This is but one example. Again, get the supporting community involved, and Parallex doesn't have to write a lick of code; just provide the required data.
As far as a simple market survey, a web counter logging what platforms have logged into their site would give an indication. Look at your competing market contenders and see how many times the free compilers for those platforms have been downloaded for Mac and Linux. These ideas take all of a half hour. This would at a minimum tell you wether it is something that is grabbing your attention and is something that should be looked into further.
I'll tell you one thing, selling a compiler for $99 is not going to attract hobbyist to your platform; not when there are platforms with free compilers out there.
No apology necessary, I was just unclear on who the post was directed toward.
With regards to the user community jumping in to help, I can only reiterate my knowledge that when Parallax open sourced the Sx-Key IDE a few years back, I was the only person who actually started working with the code and released an update. Writing the entire IDE from scratch again in RealBASIC would provide a multi-platform source base, but it would be a "from the ground up" re-write in a completely different language.
Take a look at this thread in the sandbox where a bunch of people decided to create a low cost milling machine for making PCBs.
http://forums.parallax.com/showthread.php?p=539099
It's a pretty huge thread, and you can see the enthusiasm and initial outburst of productivity slow to a crawl as it proceeds. Maybe they'll get it done, and maybe they won't. Meanwhile, there is one person in the thread who has built his own mill using a low cost, off the shelf mill and adding steppers and his own software. So, once again a single, dedicated person achieves what the group cannot.
If the Mac user community is as committed as you suggest, then I would recommend that they locate each other on this forum, band together, and create a piece of working GUI software that can take hex files from the PC SX-Key IDE, load them, display them, and download them to an Sx-Blitz. The specs for the Blitz are freely available on the Parallax website at this url:
www.parallax.com/sx/sxblitz_protocol.asp
Create this program, release it to the public on a website, and keep track of the number of downloads. If the Mac community can achieve this goal and demonstrate that they are willing to work together and complete a project, and the download statistics show some sort of reasonable size number, then I think you could clearly make your case to Parallax. If you are and Scott are the committed Mac users I think you are, then this should be simple enough to achieve since you both want it so much.
If you are right that there are a million Mac/Linux customers out there, then rallying the community, creating a program and website, and getting some reasonable downloads happening should be no problem. In fact, if you start this ball rolling, I will talk to Parallax about getting a forum section added for the Mac-centric users which will certainly give Parallax some instant feedback on the number of potential users out there. I can't guarantee they'll add the section, but I think I can can convince them if you can show some real progress.
Thanks, PeterM
I can only only offer support for what PeterM has stated as a possible approach. As a matter of fact, the SX's success (in my view) is already a result of community supporters and developers like you identified. Our SX development team is composed of PeterM (SX-Key IDE), Guenther Daubach (Programming the SX, SX-Key User's Manual), and some other core contributors like pjv and Bean. None of these engineers work in our office, yet the Parallax SX is selling better than ever. There are more contributors outside of Parallax than you may imagine, and some of the core community contributors remain anonymous. I think it's fair to say we have some kind of experience collaborating with the user community to produce a product. Your posts imply we're more ignorant than informed on this detail, which I really believe is not the case. Hey, we're trying!
You'd probably see more Mac support from us if we didn't have this RoHS situation, a new chip we developed (Propeller), and some production management issues with our current line of 200+ finished goods. We're a company of 38 people and these requests are a cost-benefit analysis, just like you indicated. We have not ignored the market, we've just not taken the time to evaluate it in detail. It comes up from time to time, but our more common SX requests are along the lines of lead-free parts, reliability characterization, integration of a C compiler, improvement of SX/B with Word variable support, and educational documentation. Mac support for the SX isn't a common request, but since it's become one on this thread we're listening and watching carefully.
You mention market research to drive the SX's usage relationship to Mac support. 80% of the SX chip sales are in China/Taiwan. They have never asked for Mac support. Of course, it's fair to point out that our US/Europe sales may be a smaller proportion of the total because of lack of Mac support. If we had more Mac support we would sell more SX chips. It's not as simple as posting everything on the net because we'll still need to document, explain and pay for such support to help a Mac developer succeed.
But we support the offer Peter described above for serious Mac developers. We'll even pay Peter to answer questions. I could even release the SX-Key firmware with a bit of coaxing. Free tools and chips are also available upon request for these developers.
Thanks,
Ken Gracey
Parallax, Inc.
Thanks for the feedback. Speaking as a Mac user who also owns a PC - I agree with your priorities. I would much rather see Word variable support and improved documentation for SX/B than you spend time on a Mac port. After speaking with other Mac folks who are in this field as a hobby or as a professional, I've come to the conclusion that most of us either run a PC emulator on our Mac or we've bought a low-end PC for just such tasks.
I do have one request (and I've mentioned this one before) but try to maintain compatability with Windows 98 if at all possible. Mac users really hate to hand over money to Microsoft just for a Windows OS upgrade - when it's not our primary machine. The software requirements of most of Parallax's products are very low, so I'd like Parallax to continue to support Windows 98 for the Basic Stamp, SX, and the Propeller.