As I said in the last blog entry, independent embedded C/C++ compiler companies are becoming rare birds. Of the independent companies that support multiple platforms, besides us ImageCraft, there are Green Hills (US), IAR (SE), Cosmic (FR), Rowley (UK), and… um, I think that’s it. Since being bought up, Hiware/Metrowerks primarily target Freescale chips; Hi-Tech clearly will concentrate only on Microchip’s PIC; Keil, despite being an “ARM company,” still sell tools for the 8051, C166 etc. probably because the money is good, but who knows how long that will last?… Most if not all compiler companies were started by compiler gearheads (who else would be crazy enough to start a compiler company?) a while ago. In fact Cosmic and ImageCraft are tangentially related through our lineage with Whitsemiths. With the different product pricing and the vast number of embedded devices, most of us in fact do not compete directly with each other per se. However, there is …
The GCC Equation
(dun dun duuuuunnnn…..)
Different embedded compiler companies “die” for different reasons, most likely financially related, and in 2009, the GCC equation must be a factor directly or indirectly. (Click on …more… to continue)
A one paragraph summary of GCC (GNU Compiler Collection, previously known as the GNU C Compiler back in 1985 when I was arguing with Richard Stallman why it’s a bad idea and he argued why I should join in the Cause) is this: GCC is a high quality compiler collection that is free to use if you agree with its terms (the GNU Public license or GPL). The base GPL stipulates that under some conditions, you grant your users certain rights (“Freedom”) to your code. A less restrictive LGPL license gives you more freedom on what you need to release. As each GPL release takes months of Stallman’s time to write, I’d not attempt to summarize or interpret them beyond the above, as any such attempt would be inaccurate (as surely would someone say that I already mis-characterized GCC in the above). Interested parties should visit http://fsf.org instead.
GCC is used in many embedded projects. While anyone can build their own GCC binaries, you can download them pre-built and in some cases, some commercial vendors would sell you GCC with support, or with their own IDE, or libraries etc. GPL does not restrict you from making money per se, even selling GCC if you wish (finding customers is of course a different story).
It’s tough to argue for buying a multi-thousands ARM compiler when GCC is Free. So how does one compete with Free, regardless whatever license restriction it may or may not have? Different companies have different solutions, and after looking at this problem for a while, this is what will do:
The 8-bit Solution
Despite a movement to adopt 32-bit architectures, there will continue to be a big market for the 8-bit (and 16-bit) MCUs. This is the market where GCC does not excel in due to the inherent limitations of the GCC compiler architecture. So, to be more successful in this market, we will need to take advantage of GCC’s weakness and optimizes better. For the AVR, we are already better than GCC code quality wise but competing against Free is still tough. What this means is that we will be implementing mixed pointer qualifiers (e.g. __far, __near, __huge etc.) and generate optimal code for each type of pointer access. As 8 bit MCUs typically have different address space, this will be a big win. For the AVR, this means better control of flash data, especially for the XMega (GCC doesn’t support the simple flash space well already and the XMega will definitely stretch GCC’s limit); for the Cypress PSoC1 M8C (if we were to reenter the market), this means much better code density for data access.
Some compilers implement whole program analysis to support mixed pointer usage, but we believe that the programmers can give better guidance in most cases, resulting in a more robust compiler. Embedded programmers who are concerned about code size know their stuff well.
The 32-bit Solution
For the 32-bit, we already have an ARM/Thumb compiler and the Propeller C compiler. Nothing needs to be done about them. However, it does not make sense for us to compete with the free GCC on potentially new targets such as the AVR32 and the ARM Cortex. As our resource is limited, in this space, we will leverage GCC and give commercial users a better solution by integrating GCC with our simple to use IDE and Dinkumware’s rock solid C/C++/EC++ Library. This eliminates any possible encumberment for the users from LGPL, thus providing values to our customers. This also frees up resource so that we can work on software stacks (e.g. eMOS, SD/File System, etc.) for the targets, giving our customers a complete solution. Or may be even porting to OSX or Linux etc.
We will continue to keep our pricing competitive and tools easy to use. GCC presents a challenge, but then again, each challenge presents an opportunity. Life is never boring.