Live data from Hacker News

Ask HN: Current state of programming embedded devices?

news.ycombinator.com

1–10 of 76 posts

Ask HN: Current state of programming embedded devices?

#1
Hi,

I recently switched to a hardware company and we are working on a medical device. We need a nice, touch-based user interface on a 5"-10" inch display. Some math calculations in the background, but no realtime stuff. I am an experienced developer on different platforms but I never programmed an embedded device.

What is the mainstream OS on embedded devices right now? Linux, Android, Win 7 Embedded? What about Windows 10 IOT?

What is a good setup? Rasberry Pi + official touch screen? Are there medical grade devices out there (doesn't matter if it is expensive)?

What about developer tools? Okay, Visual Studio for windows? But what about the other platforms? Still C?

You see, I'm pretty clueless, so any help is much appreciated!

Thanks.

Re: Ask HN: Current state of programming embedded devices?

#2
The mainstream OS choices are: Wind River VxWorks, Green Hills Integrity, BlackBerry QNX, Linux, Android, and (god forbid) some variant of Windows.

A great deal of embedded software is still done in C/C++. (Embedded is not a good environment for dynamic languages.)

Re: Ask HN: Current state of programming embedded devices?

#3
I've done a few safety-critical embedded devices for medical equipment and an air traffic control system. We used Linux/C so we didn't kill people.

The combination of "medical device" and "touch-based user interface" started me twitching. Some things to bear in mind are (1) will the interface work if the users are wearing rubber gloves? (2) there could be a problem with an infectious agent transferring from a patient to a doctor's gloves to the screen then to another doctor and another patient.

Re: Ask HN: Current state of programming embedded devices?

#4

The mainstream OS choices are: Wind River VxWorks, Green Hills Integrity, BlackBerry QNX, Linux, Android, and (god forbid) some variant of Windows. A great deal of embedded software is still done in C/C++. (Embedded is not a good environment for dynamic languages.)

Can I ask why you dislike dynamic languages in an embedded environment? Or why you think they are 'not good'?

Re: Ask HN: Current state of programming embedded devices?

#5
I'd go with a Raspberry Pi or other linux supported board. Particularly for prototyping.

If you're looking at building an interface, are you considering web-based?

I'm going to plug my own little project here, I'm also new to embedded development, but hate how everything is hard-coded to the platform you build on. I built a hardware agnostic library to make it easy to run your business logic on different hardware. It's in javascript (I've asked anonymous_ian why he doesn't like dynamic languages in embedded). http://getfavor.net

Keen to hear your thoughts.

Re: Ask HN: Current state of programming embedded devices?

#6
I work in scientific equipment, and there is a huge trend towards devices containing a touch screen with some amount of computing power. I take a look at what competitors are using, and have opened up some gadgets. The two main things for newer equipment seem to be:

* Android, when the product offers a host of mainstream computing features. I think the rationale for going with Android is: "The user already knows how to use it."

* Linux, when the product is cheaper, and has a more bare bones or restricted function set. I don't know for sure, but I think that a Linux build can be more stripped down. Little boards like Raspberry Pi and BeagleBone abound, and if nothing else, you can create a nice proof-of-concept with one of those. I've actually done this, writing my code in Python, with the expectation that the "real" programmers would turn it into something else.

I'm not in the skill areas that actually develop this stuff, so I don't know any lower level details. My job tends to be supplying the theory of operation for the actual measurement.

Both systems use SOM's (system on a module) that are typically sold with the software tools to get you started, such as a working demo OS. It is rare to see real-time stuff done on the main computer. Since you're usually talking to some sort of device hardware anyway, it's usually more convenient to put the real-time stuff on a separate microcontroller, that's got little or no interrupt overhead to deal with.

Re: Ask HN: Current state of programming embedded devices?

#8
post #3

I've done a few safety-critical embedded devices for medical equipment and an air traffic control system. We used Linux/C so we didn't kill people. The combination of "medical device" and "touch-based user interface" started me twitching. Some things to bear in mind are (1) will the interface work if the users are wearing rubber gloves? (2) there could be a problem with an infectious agent transferring from a patient…

At my workplace, we've tested capacitive touch panels with rubber gloves. Cleaning the device could be an issue, but is more general, since the same thing could happen with regular pushbuttons.

But I certainly defer to your expertise. These are the subtle issues that us non-medical guys overlook.

Re: Ask HN: Current state of programming embedded devices?

#9
I work at a company that's in the food industry.

Currently, we're running Linux with Qt 4 on PowerPC.

We're moving to a newer CPU (i.MX6 quad core). Freescale announced that they would continue manufacturing and supporting it for 15 years and it comes in industrial grade and consumer grade packaging depending on your needs.

We're moving away from Qt for the GUI. HTML5 is the way of the future. ;)

For people who are starting out, I'd recommend using Yocto. It's a build/development environment for embedded Linux. Look it up.

Edit: By they way, if it's not real-time critical, there's nothing stopping you from using any programming language you like except how difficult they can be to cross-compile.

For hard real-time stuff you need a dedicated rt system and you'll have to use C, C++ or maybe Rust.

For soft real-time stuff you can get away with RT-patched Linux. Any language with GC is generally bad with the exception of Erlang, Go and Nim; where the GC is optimised for low latency rather than bulk through-put.

Re: Ask HN: Current state of programming embedded devices?

#10

The mainstream OS choices are: Wind River VxWorks, Green Hills Integrity, BlackBerry QNX, Linux, Android, and (god forbid) some variant of Windows. A great deal of embedded software is still done in C/C++. (Embedded is not a good environment for dynamic languages.)

Can I ask why you dislike dynamic languages in an embedded environment? Or why you think they are 'not good'?

Dynamic languages have unpredictable usage of memory. This is okay when you have many gigabytes of memory. This is not okay when you have a handful of megabytes (or a single gigabyte) of memory.

Being able to accurately profile how much memory will ever be in use is very valuable. Being able to prevent unexpected usage or stop-the-world collection issues means your device is that much safer.

Also, static languages are usually faster and more predictable, to a certain degree. This is advantageous in an industry that would rather spend years developing something than have a small chance of killing someone. Bugs are unacceptable.

If you're willing to pack an Intel Atom or something into your device, fine. But if you can get by with a tiny ARM chip, why shouldn't you?

Post reply on HN