Use the right tool for the job: embedded programming

后端 未结 8 1629
[愿得一人]
[愿得一人] 2020-12-23 22:47

I\'m interested in programming languages well suited for embedded programming. In particular:

Is it possible to program embedded systems in C++? Or is it better to u

8条回答
  •  伪装坚强ぢ
    2020-12-23 23:36

    It really boils down to what hardware platform you're operating on and hence what software platforms are open to you. For a lot of recent embedded kit - designed around a system-on-chip, a megabyte or two of RAM, a few devices - you really want a small operating system to manage the low level hardware while you concentrate on your application. Your choice of OS then constrains your available language set.

    It's certainly possible to use C++ in the embedded space, but the full feature set of the language takes a lot of work to port correctly. For example, eCos is implemented in a mixture of C and what you might call the structural aspects of C++; support for RTTI, exceptions and the STL are lacking in the free version, though there are people working on this (and a commercial port available).

    Similarly, it's possible to use Java - I know, I've ported a JVM to an embedded environment; it wasn't fun - though you usually get a cut-down Java language configuration, often something based on J2ME.

提交回复
热议问题