Are GNU tools good enough for embedded designs?

Wednesday, June 8th, 2011 by Robert Cravotta

The negative responses to the question about Eclipse-based tools surprised me. It had been at least four years since I tried an Eclipse-based development tool, and I assumed that with so many embedded companies adopting the Eclipse IDE that the environment would have cleaned up nicely.

This got me wondering if GNU-based tools, especially compilers targeting embedded processors, fare better within the engineering community or not. Similar to using the Eclipse IDE, it has been far too many years since I used a GCC compiler to know how it has or has not evolved. Unlike an IDE, a compiler does not need to support a peppy graphical user interface – it just needs to generate strong code that works on the desired target. The competition to GCC compilers are proprietary tools that claim to perform significantly better at generating target code.

Are the GNU-based development tools good enough for embedded designs – especially those designs that do not provide a heavy user interface? The software for most embedded designs must operate within constrained memory sizes and need to operate efficiently or it will risk driving the cost of the embedded system higher than it needs to be.

Are you using GNU-based development tools – even when there is a proprietary compiler available for your target? What types of projects are GNU-based tools sufficient for and where is the line when the proprietary tools become a necessity (or not)?

4 Responses to “Are GNU tools good enough for embedded designs?”

  1. Jon Titus says:

    Yes, they are good enough. Many companies place the GNU tools behind their user interface.

  2. In some cases they might do better than paid-for tools: the embedded market is small, very segmented (lots of different architectures, standards etc), and is very cost sensitive in some parts.

    This means that a company making (for example) compilers for low-end processors is likely to get a low unit price and a relatively small customer base. In these conditions it will be a real struggle to provide any tool, let alone a quality tool.

    Compare this with the GNU tools – large developer base, large user base. Of course, Jon Titus is right – GNU tools are a good basis for many companies to develop their products on – AdaCore being one good example of this.

  3. A.M. @ LI says:

    Evaluating tools is all about risk mitigation. In this question you are asking if the money saved using the GNU tools is greater than the risk of paying for another option (I did not read this as a which is better GNU or LLVM style question).

    Of course as with any risk mitigation evaluation it strongly depends on your project. If you are doing things that fall outside the standard use case for the tool your risk goes up. So if I were developing for a brand new chip, lets use the MSP430 when it first arrived, and had a customer facing project I would not suggest using the GNU tools. They typically show up late to the game because it is unusual for the manufacturer to assign engineers to implement support in free tools before the chip reaches the market. On the other hand I would believe the risk significantly lower to purchase the IAR compiler for the chip the day it reaches the market because they had the resources and access to the design early enough to add support and test it.

    I use GNU tools frequently for embedded projects. On the other hand if I am doing a project that has very tight deadlines or is every expensive for the customer I will chose compilers for IAR or Kiel over GNU because of the reduced perceived risk.

    On the other hand if you have a GNU expert on hand it can be very handy to be able to fix your compiler when you discover and issue. I have been on projects where I had to drop a commercial compiler for the GNU specifically because I could not get the fix and meet my deadline.

    As far as GNU output it varies greatly based on platform and language. For example I have found that code I write for the Cortex-A8 in C and C++ the newest GNU compiler is actually a little better than RVCT 4.x. On the MSP430 I save significant space using the IAR over the GNU toolchain. It should also be mentioned that the GNU toolchain is a fast moving target. The code generated for the MSP430 between the last 3 versions has already reduced code size by 20% on my average programs and at this rate will be on par with IAR in another year or so.

  4. J.C.R. @ LI says:

    The very valuable feature of the GNU tools is that you can learn them once, and your are still one the edge 15 years later on a new target processor that don’t even existed when you learned the tools. It’s a very large community where you can find a lot of support.

    Some others compilers can be more advanced in the code generation for a new target. If you really need one of them, just say it to the GNU make with the CC or CXX variable and you are done.

    You question tend to imply that the compiler and the IDE have some kind of dependency. While some commercial entity like to emphasis this claim, it’s rarely the case in practice. Most compilers can be used by any general IDE. Using the GNU make, it’s very easy to compile the same project for many targets using different compilers.

    If you are using non UNIX machine for your dally task, you may find my point of view a bit strange. But if you routinely use a Linux system for example, you will find the GNU tools so natural that you don’t ever loose time to install an IDE.

Leave a Reply