Design Con 2015
Breaking News
Blog

Embedded Systems Programming Languages

Page 1 / 3 Next >
View Comments: Newest First | Oldest First | Threaded View
hevangel2
User Rank
Rookie
What are the 5 HDL languages?
hevangel2   10/3/2014 11:51:28 AM
NO RATINGS
I can only think of 4, Verilog, VHDL, SystemVerilog, SystemC, what's the last one?

alex_m1
User Rank
CEO
Re: C++ Gaining Fast with Younger Programmers
alex_m1   9/23/2014 8:14:51 PM
NO RATINGS
Larry, for simplification code generation tools might work. For DSP/control systems/math  there's the matlab family , and for general embedded code , there's metacase. might be usefull for you.

DrFPGA
User Rank
Blogger
This could the start of
DrFPGA   9/19/2014 4:02:23 PM
NO RATINGS
a series of excellent posts. Hope you can do more of them..

uhln37
User Rank
Rookie
What is an embedded system programming language ?
uhln37   9/19/2014 12:43:15 PM
NO RATINGS
This is an interesting summary.

But I'm a little surprised by the title of this article.

C and C++ for embedded systems : OK (of course)

Java : Hmmm. why not.

But Java script and Python are out of the scope.

If they are, Labview is also an embedded language. And Visual Basic as well.

 

I think Ada should be in the list. This is the language specifically designed for embedded systems with safety constraints (even if Ada is not in the main stream).

 

 

Colin Walls
User Rank
Rookie
Re: C++ Gaining Fast with Younger Programmers
Colin Walls   9/17/2014 12:12:41 PM
NO RATINGS
I go along with most of the sentiments here. I continue to hold the view that, for most embededd systems - at least those that are real time  - full-on C++ is not appropriate. The language was simply not designed for this purpose.

HardwIntr
User Rank
Freelancer
Re: C++ Gaining Fast with Younger Programmers
HardwIntr   9/17/2014 3:39:21 AM
an excellent introduction to embedded software and very easy to read,  just my two cents;
first) i smile when reading the C++ folks are still trying to correct problems solved 30 years ago by Ada, but hey, that's life. C++2025 maybe?  At least, there's no C++ in commercial planes nor military (dont't talk about space) . As reboot is not an option it's probably the reason why Ada rules in these environments.
second) Like assembler is just useful for a tiny part of a software solution, i believe that C or compiled languages are just useful for the core set of functions and the most time sensitive ones. The rest is perfectly doable with an interpreter language like Python as explained in the article, or Perl or Tcl . For more memory constrained and power sensitive environments, i'm currently evaluating the Scheme language; i've compiled a static version of SCM  with the excellent musl-lib C library down to 146 Kb with the whole SLIB library compressed to 250 Kb. I'm very far away from the multi-Megabytes of Perl, Python and co.   Another implementation of Scheme to note is "Chez Scheme" developed by Cadence ... 

LarryM99
User Rank
CEO
Re: C++ Gaining Fast with Younger Programmers
LarryM99   9/15/2014 3:43:38 PM
NO RATINGS
That was basically my going-in position when looking at this code. It definitely was not implemented the way that I would have done so. I would have expected to have had to do significant debugging at a very low level. This CPU is far from current state-of-the-art in terms of Arm (it is an ARM926EJ-S core in an SoC), but the application does actually work. Yes, it could work more efficiently (very much so for the floating-point code part of it) but it does work. That inefficiency is almost a non-issue in more modern cores. I remember the same arguments when I was starting out about assembly (or even machine) language versus 'big iron' languages like FORTRAN or C. Are old fogies like me on the wrong side of the argument here? Is the lack of low-level visibility that betajet describes even an issue anymore for application-level embedded programming?

Larry M.

halherta
User Rank
Manager
Two other languages of potential interest to Embedded Programmers
halherta   9/15/2014 2:59:23 PM
NO RATINGS
Two other programming languages that could have a major impact on Embedded systems in my mind are Vala &Go. Vala is a C# like language that compiles to c code. It is used by Gnome Developers to work with the GTK+ libraries. Vala provides the programmer with the best of both worlds....working with a high level language without sacrificing performance in a major way. Go is also very promising especially on embedded linux systems. It is a very terse language that provides plenty of functionality and speed. It is also easy to learn. While not exhibiting the performance levels of optimized c code it can still be darn fast...It also supports concurrency and cross compilation right out of the box. I highly encourage others to look 'Go' up.

betajet
User Rank
CEO
Re: C++ Gaining Fast with Younger Programmers
betajet   9/15/2014 2:35:11 PM
I always recommend ANSI C (as opposed to K&R C) as the best language for embedded programming.  I'm leery of using C++, because I don't know what it's doing with dynamically-allocated memory.  When you have limited memory and an application that is supposed to run forever, dynamic memory problems like fragmentation can be killers.  I think it's vital that you have a very simple dynamic memory model or you're begging for products that reboot mysteriously every few hours, days, or weeks.

Like many C programmers, I think of C as a portable assembly language that uses high-level notations.  IMO to do embedded programming well, you should have mastered an assembly language at some point.  You rarely need to write assembly language if you have a decent C compiler, but you do need to understand the machine-language programming model because that's what's actually executing.  Some bugs can only be understood at the machine language level.

So to me the question is not whether C++11 or C++14 constructs are useful or important.  My question is whether these young whippersnappers can debug machine-level problems when they inevitably occur, and whether they understand how the program is allocating and deallocating dynamic memory in a limited-memory system with no swap space.

You kids get off my lawn!  :-)

LarryM99
User Rank
CEO
C++ Gaining Fast with Younger Programmers
LarryM99   9/15/2014 2:01:45 PM
NO RATINGS
I enjoyed reading your assessment of the various options for embedded systems programming. I am currently wrestling with a realtime application that consists of 40K lines of full-on C++ with heavy use of Boost libraries in an embedded Linux / Arm system that only has 32 MB of RAM. I would venture to guess that it is much more complex than the average application. Needless to say we need to rewrite it. My gut reaction would be to redo the implementation in straight C or relatively lightweight C++, but I am working with younger developers that are much more comfortable with relatively advanced c++11 or c++14 concepts such as smart pointers and iterators. Is this the new mainstream for embedded development? Is anyone else seeing this?

Larry M.

Flash Poll
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
EE Times on Twitter
EE Times Twitter Feed
Top Comments of the Week