Re: Languages for embedded



moschops wrote:
but why avoid C++?

No particular reason for embedded systems, same as for any system. It's not a well designed language.

What affects the decision to use a given language for embedded coding?
Availability of compilers / development environments
Complexity of problem
Competence of available staff
Code reuse

I'd be grateful to hear about reasons for/against other languages besides C and C++.
Ada is an excellent language for embedded work. It is tightly specified so that compilers from different vendors normally can compile code without too many problems. It has all modern constructs built in (and as stated, tightly specified) like classes, interfaces, generics, tasks, protected objects and so on.

One of the more cool features for embedded is the language built in representation clauses that give you the possibility to map variables to memory locations and structures to device-registers. And that is NOT with a vendor specific language addition. It's native Ada.


Another option is to look at model driven development, for instance using xtUML. That solution will give you portability like never before as your models shall be platform independent (without knowledge of hardware, programming language and so on). After doing your model homework you run your models through a model compiler crafted for your platform that will turn them into code in a language of your choice. If you want lisp i'm sure it could do it. Then you compile that code WITHOUT MANUAL MODIFICATION to run on your platform. For all those who still don't believe it works I can only say that it runs in aircrafts, cars, missiles and pacemakers all over the planet. Solution gets too slow, fiddle with the MC to do VHDL instead of lisp (Go ask mentor about bridgepoint or KennedyCarter about iUML)

/Leif

.



Relevant Pages

  • Re: GMP vs. straight C arithmetic
    ... ordinary data structures that don't impose an additonal performance ... Side-effects are another crucial part of the language. ... > Take the tree structure example I gave earlier. ... determined at compile time, is this a compile time error? ...
    (comp.programming)
  • Re: Moving from 8051 to AVR
    ... C was largely based on the "B" language, ... compile to native machine instructions, ... using methods suitable for embedded systems, ... target and for an ARM target. ...
    (comp.arch.embedded)
  • Resolved: NOT. --WAS: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming:OO
    ... I certainly want more errors detected at compile time, ... > advocate reaching that goal through beefier type systems. ... in a procedural language, or in an object based language. ... Relativistic mechanics - solves the transaction thing, ...
    (comp.object)
  • Re: Teach myself C++.
    ... That seems to be an objection to the quality of implementation of ... The language IS the compilers. ... should be possible to compile some code more than once, ... I'd say that string handling is something most other languages get ...
    (sci.crypt)
  • Re: dynamic vs. static: the age-old debate
    ... necessary to compile a program, ... inseparably related to either dynamic or static typing, ... otherwise static language, and with similar effort, can write a largely ... I have the feeling you are not separating semantics and implementation; ...
    (comp.lang.misc)