-3

I'm doing an essay on this for college and I can't really find sources.

So far I've found these:

https://www.quora.com/Which-is-the-best-programming-language-for-embedded-system

http://www.eetimes.com/author.asp?doc_id=1323907

Why does C dominate in the embedded software market?

I'm meant to evaluate the suitability of event driven programming in non graphical applications. All I know is that event driven languages are bad for this because they are heavier, slower and the GUI portion of them is wasted.

I want to be able to explain how other languages, such as C and JavaScript, don't have these problems and also what other features makes them better suited to embedded systems.

Edit: So it turns out that all of what I know is wrong. I would like to know what makes VB.NET bad at programming embedded systems (if it is bad), and what kind of criteria there is for a language to be good at programming embedded systems.

Tom Shaw
  • 15
  • 1
  • 4
  • Possible duplicate of [Why does C dominate in the embedded software market?](http://softwareengineering.stackexchange.com/questions/84514/why-does-c-dominate-in-the-embedded-software-market) – gnat Mar 20 '17 at 16:10
  • I've read through that and it didn't quite cover what I wanted, however I did find a few interesting points. Should have added that as a source mb. – Tom Shaw Mar 20 '17 at 16:11
  • Essentially I want to know what makes event driven bad, which is not mentioned in that. I also just would like some sort of list of necessary features for languages used in embedded systems. – Tom Shaw Mar 20 '17 at 16:14
  • They are? I thought there a lot of event-driven languages for embedded systems out there. Java quickly comes to mind. – T. Sar Mar 20 '17 at 16:14
  • Some embedded areas are less demanding than others. Likely a controller for a microwave oven has much more lax constraints than an engine injection controller. One could probably program a microwave oven controller in Python. But having several languages in a stack comes with a price. With embedded devs being already proficient in C, and many tasks demanding C for ultimate performance and hardware control, other languages have hard time sneaking in. OTOH embedded systems come in different sizes; larger sizes have more power and more need for better abstraction than C affords. – 9000 Mar 20 '17 at 16:16
  • Well, I have very limited knowledge on the area, but my tutor says they are, and all of the sources I've found don't even mention event driven. The only time I see it mentioned is in papers explaining a new event driven language or something like that. – Tom Shaw Mar 20 '17 at 16:16
  • 3
    You can create event-driven code in any language. You can even look at nginix as being "event-driven", though it's pure C. But neither Node nor Erlang likely fit an embedded controller well. – 9000 Mar 20 '17 at 16:19
  • 5
    Please give an example of an "event driven language". "Event driven" is first and foremost a design style, a common abstraction, which doesn't require a specific language to do. – whatsisname Mar 20 '17 at 16:36
  • 6
    Note that regardless of the language used, quite a bit of embedded programming is typically "event driven". Quite a bit of what happens in many embedded systems is in response to interrupts provided by the hardware. – Jerry Coffin Mar 20 '17 at 17:09
  • Could a server or a router be considered non-graphical as well? At least optional. – JeffO Mar 20 '17 at 18:53
  • @9000: Very right! There is a huuuuuge range in "power" when it comes to embedded systems. For example, the embedded system I carry in my pants pocket has as much RAM as my last laptop and more CPU cores than the one I'm using to type this comment. OTOH, there probably is an 8bit µC with 32K RAM or something like that in my microwave. – Jörg W Mittag Mar 20 '17 at 20:30
  • Sorry, I have very little knowledge on this subject. I'm specifically looking at VB.NET and similar languages. All I've been told is that it's bad at programming embedded systems, whereas languages such as C and JavaScript are good. I would like a list of what makes VB.NET bad at programming embedded systems (if it is bad), and a list of things that would make a language good at programming embedded systems. I'm a bit confused and can't find the information I need. – Tom Shaw Mar 21 '17 at 18:19
  • Event-driven programming in embedded is the only one method can be used: it starts from hardware interrupts, and requirements to be real-time fast in asynchronous events occurs. Somebody teched you like a log. – Dmitry Ponyatov Jun 04 '19 at 13:14

2 Answers2

0

I was waiting for you to give an example of an "event driven language" to see whether I understand what you're asking. But I decided that you probably have some misconceptions. This first sentence of your question makes sense, "I'm meant to evaluate the suitability of event driven programming in non graphical applications." But then everything you wrote after "All I know..." is confusing and probably wrong.

Event driven programming is a design style. I don't know what you mean by event driven language and I'm skeptical whether that's a thing.

Event driven programming is very suitable for embedded systems because many embedded systems are event driven by nature. An event can be a button push, sensor detection, received network packet, timer expiration, etc. Think of an elevator, printer, or wireless router.

Miro Samek explains this well in the first couple pages of the Introduction chapter of Practical UML Statecharts in C/C++, which is subtitled "Event-Driven Programming for Embedded Systems". (You can read the Introduction from the Amazon listing if you click on the "Look Inside" link.)

Event driven programming is commonly used for GUI applications because it's very easy to do so with tools such as Microsoft Visual Studio. Every beginning desktop application developer starts with event driven programming and has access to a multitude of examples.

Conversely, a beginning embedded systems developer typically writes a main super-loop to blink an LED. Embedded development tools don't provide the event driven framework like Visual Studio does. And examples of event driven programs are uncommon. That might explain why event driven programming is less common in embedded systems. But it would be wrong to say that event driven programming is not suitable for embedded systems.

Edit: You've changed the question. I don't understand why you originally wrote "event driven" when you were asking about VB.NET.

VB.NET is not suitable for typical embedded systems but I don't believe any of the reasons are related to the concept of "event driven". Here are a few ideas you can research further. Programs written in .NET languages run on computers where the .NET framework (CLR and FCL) has been installed. The .NET framework does not exist for smallish microcontrollers used for many embedded systems. Embedded systems often have limited resources in terms of memory and CPU power. The .NET framework and .NET programs are too resource hungry for these resource limited systems. Embedded systems often have real-time requirements. .NET features such as garbage collection make it non-deterministic or difficult to ensure that timeliness deadlines can always be met.

kkrambo
  • 151
  • 4
  • I've been writing 'event driven' because the unit is 'U14 Event Driven Programming' and all of the questions are asked in relation to event driven programming. We are doing the unit entirely using VB.NET, and have been told that it is an event driven programming language. – Tom Shaw Mar 23 '17 at 00:36
  • The criteria I'm doing is: 'Evaluate the suitability of event driven programs for non-graphical applications Create a word processed evaluation in which you consider if it would be appropriate to use an event driven language such as Visual Basic or AppInventor to create a control system such as a burglar alarm which would not use a GUI. Consider which features would still be useful and which would be redundant.' – Tom Shaw Mar 23 '17 at 00:37
  • Your suggestions are extremely helpful. Now I just need some criteria that a language needs to be good for embedded systems, I might be able to work that out from what I have so far though. Thank you :) – Tom Shaw Mar 23 '17 at 00:41
-2

IN GENERAL, Whatever language is more closer to machine code(011010110 etc) is more faster.

Further compiler optimization can also make huge difference.

C code is directly compiled to machine code hence faster for any task whether it be used in embedded systems.

While Java code is compiled to bytecode which JVM understands and further converts it into machine code