Image

Automated Tools Augment Programmer Efficiency

May 11, 2016
Style checkers and static analysis tools are ways to improve code quality. We examine some of the alternatives in this space.
Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.

How do you improve the output capability and quality of embedded programmers? One way is to give them better tools such as static analysis and compliance tools. They tend to be mandatory in embedded arenas such as military and avionics, but—according to the latest Barr Group survey—less prevalent in general.

The challenge isn’t just getting the tools into developers’ hands (although battles with the bean counters are ever-present), but also getting developers to use them. While training definitely helps on the latter front, developers often discount the value of these tools.

There are a variety of myths about them as well that are easily debunked. For example, these tools are not just for military and avionics applications.

Most embedded code is still developed in-house.

Another myth is that the tools can be expensive to buy and use. That myth has a few more caveats, because most of these tools are not just simple static analysis tools. They are often part of a coordinated suite of tools that include things like code coverage analysis, coding standards compliance, requirements traceability, code visualization, and more. Some companies sell their tools unbundled, possibly reducing the initial cost if only a few modules are required. Some developers may already have similar tools in their toolbox that could also reduce costs.

The more difficult problems include trying to justify the cost of these tools and to incorporate them into the development process. The latter is easier at the start of a project because bad habits are more easily corrected. Adding the tools to the mix of an existing project often generates many new bugs to be addressed, of which some are false positives. How well a tool addresses these challenges often dictates how successful they are in the long run at helping to improve the overall development process. Even a large number of true positives can be a distraction, though these bugs really do need to be fixed in the long run. 

The discussion about these types of tools has been ongoing, so why is it more important now? One reason is the rise of the Internet of Things (IoT). The IoT inherently requires a wider range of coding to occur from embedded devices through the cloud, all of which are prone to errors and security issues. The systems tend to be beyond the scope of a single person to implement and execute, making these types of analysis tools more valuable; they provide a more consistent development environment across the IoT platforms, in addition to detecting bugs.

According to VDC Research, most code for embedded applications is developed in-house (see figure). Still, this code may make use of third-party, open- or closed-source libraries and runtime. Good programmers using good programming practices are useful for the code they generate, but what about third-party code? Most developers have access to the source code, so the standard analysis tools can handle it, but code is sometimes available only in binary form. Grammatech’s CodeSonar supports a mixed-mode analysis that can analyze binary code allowing third party libraries to be checked.

Automated tools like static analysis can pay huge dividends in the long run. They are worth checking out if you are not already using them since they can improve code quality, reduce delivery times, and provide an edge over the competition. The challenge in comparing tools will be the variety of options and variance in features between different vendor products. Features like code coverage and standards compliance tend to be common, but other features may be unique. Products will often integrate nicely with development tools like integrated development environments (IDE), but typically not with each other. Some incorporate their own life-cycle management support while others integrate with third-party tools.

Deciding on what tools will work best with your current development process can take a good bit of time and effort. It is not something to be done in an afternoon discussion while running through a checklist. These tools typically require some training to be used effectively and efficiently.

Looking for parts? Go to SourceESB.

Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.
About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!