Embedded systems are capricious little things. They are made up of a bunch of (often uncontrolled) variables. Embedded system do not float happily in the placid lake that is a 2 GHz processor with 2 GB in RAM and 200 GB in hard disk. They don’t have layers upon layers of code that ultimately isolates de final application from the outside. I don’t think there is need to get into a cerebral debate about software standards and how even embedded systems software can also be isolated from external variables, ideally it is true, but embedded systems are also all about the outside variables, that’s the whole point, so, no matter how well built the software is, it’s still written to talk to the outside, so there are still very specific issues that PC software or web software doesn’t have to deal with.
Tools are a very big issue when it comes to these critical differences. The embedded world has tools that are laughable in other places of software development. I am saying this literally because my brother is a web software developer and he finds it funny how complicated it is for embedded systems development to make automated tests. You cannot just make a software controlled solar power battery charger and expect it to work without ever taking the thing out into the sun for hours and endless hours. But you can actually make a web application and have it test itself, in fact, the latest approaches even force you to write a test…no…wait…software development tools apparently evolve at the speed of my internet cable ISP (when it is in a good mood), apparently the latest approaches are now all about writting a behavior and expect the tool to write the test and then the code or part of the code that makes sense with that test. Does that makes sense:
when there is too much light
load the battery with less current
I laugh sarcastically at the absurdity of that “code”, yet, there seem to be people (like my brother) doing just that (in the web software space). One such tool is called Cucumber. And it apparently makes sense out of stuff similar to my laughable example. This tool is based on a very new paradigm called Behavior driven development and it’s the latest thing in web software develoment.
I’ve been thinking about this and I’m having a hard time figuring out how this paradigm could fit into embedded developments. There are a lot of things out there, there are UML and SysML modeling languages, two approaches commonly used to model embedded systems. There are tools that will generate some sort of basic code structure out of a state diagram and on the other side of the develoment process (the coding side) there are graphical tools (such as Freescale’s Processor Expert) that will generate code structures, drivers, initialization code, etc. But there are no tools that bridge the gap naturally from requirements, to design, to coding, to testing. There are just too many variables. Then there is the issue of code overhead, how much extra lines of code will be generated for processing all those instructions? My brother also tends to laugh if I mention 1KB Flash Microcontrollers, actually, he also laughs at 512 KB flash, 64 KB RAM, 32 bit MCU (yet, he own an alarm clock, a car, and many other things that use these kinds of processors). But there is a point, his software will run on gigantic servers that don’t care how many instructions they have to execute for a single line of “natural expression code”, but embedded systems do care.
So, is there a point in even pursuing these types of develoment approaches? What alternatives are there to help make better code, that is ready to be tested and can be developed faster? Am I missing something? Is the next breakthrough in embedded systems development going to just be following where PC software has already walked or will embedded systems steer in some other direction? What do you think?