ECN Asia
  Mark as your homepage Bookmark us Print Subscription
               
Saturday, August 30, 2008
Home About Us Current Issue Archive RSS Free Subscription Trade Shows Media Kit Contact Us

Boards & Modules

Computers, Peripherals & Networking Devices

Digital Den

Electromechanical/Mechanical Devices

Embedded Systems & Networking

Integrated Circuits & Semiconductors

Microwave & RF Components

Optoelectronics & Displays

Packaging & Interconnects

Passive & Discrete Components

Power Sources & Conditioning Devices

Sensors & Actuators

Software

Test & Measurement

Search:
 
  Advanced Search
Product Info Search:
 
     
 
 
 
Issue > Jul 2007 > Cover Story
 
 
Ads by Google
 

Strategies for overlapping the development of embedded systems software and hardware


( 01 Jul 2007 )

by Dr. Adam Kolawa, Parasoft Corp.

Building embedded systems involves the production of the hardware, the development of an API that defines how to access that hardware, and software that drives usage of that hardware. Embedded systems development teams want to be able to start developing and testing software before the hardware is ready, but the software and hardware need to be developed in parallel because time to market is so critical in this industry. In this article, I provide an overview of how developers of embedded software can address this challenge. In a nutshell, I recommend performing a significant amount of testing from the desktop so that hardware testing need only verify the interfaces between the software and the hardware, and confirm that the functionality that was verified on the desktop still operates as expected on the target device.



CODING POLICIES

Since you’ll typically be using two different compilers over the course of the product lifecycle— one for compiling code that will execute on the desktop (host) system, as well as a cross-compiler for compiling code that will execute on the target hardware device— you need to be very careful about how you write your code. You and your team members should determine which coding constructs are not supported by both compilers (typically, the cross-compiler is more restrictive than the desktop compiler), then define a coding policy that specifies which constructs should be avoided.

Adherence to this policy can be checked by static analysis tools that allow you to define and enforce custom coding policies. Additionally, it is helpful to use the same tool to check for violations of industry-standard coding rules; this is a very effective and effortless way to vet many classes of bugs.



UNIT TESTING ON THE DESKTOP

Whenever you develop software, it’s important to start building and running regression test suites from the earliest phases of development. This is the only way to ensure that the software is working correctly, and that code modifications/additions do not introduce problems or unexpected changes into the existing functionality. However, early testing is complicated by the fact that embedded hardware is typically not completed until the later phases of the software development lifecycle— when it is exponentially more difficult and costly to find and resolve bugs.



Stubbing enables you to start ensuring that code works correctly as it is being built—regardless of the status or availability of the hardware. This involves “stubbing out” software calls to the hardware so that they are directed to stubs that you create to represent the API. These stubs should be designed so that when they receive inputs, they can respond with several values that make sense, according to the specification. After stubs are defined, unit test cases should be built in such a way that they actually intercept calls to the hardware and direct them to stubs instead.



With these unit tests and stubs, you can begin testing from your desktop (also known as “the host system”), using your desktop compiler to compile your program executable as well as your tests. Your goal for testing on the desktop is not only to expose defects and ensure that the software’s logic is working properly, but also to establish a robust regression test suite that can be leveraged to validate that the software functions in the same way when it executes on the target device.



UNIT TESTING ON THE HARDWARE DEVICE

Once the hardware is available, you can recompile the code with the cross-compiler, then execute and test it on the target device.



The challenge here is that your desktop-level test suite will be configured to intercept calls to the hardware and redirect them to stubs, but now that you will be testing code on the actual target device, these same calls need to be routed to the actual device. This is relatively simple, as long as you are using an automated testing tool that generates unit test cases in such a way that they are essentially small programs which can have stubbing enabled or disabled.



In order to configure your desktop regression test suite to execute on the target device, you recompile the test programs—this time using the real libraries instead of stubs— using your cross-compiler, then you deploy them to the target device for testing, which can be controlled from your testing tool’s GUI (on your desktop). The test programs then execute on the target and report back to the desktop via a serial interface or a TCP/IP connection.



FINAL THOUGHTS

Since you start testing on the desktop, you establish a regression test suite that you can run daily—regardless of whether the hardware is completed or available for testing—to ensure that problems and unexpected changes are exposed as soon as they are introduced, which is when they are fastest, easiest, and least costly to fix. Moreover, since the code has been thoroughly tested on the desktop before it ever reaches the target decide, you obtain reasonable assurance that the code will run on the target device when it is available. Most issues in the software’s logic will have been vetted and resolved during desktop testing, so this should significantly reduce the amount of time you need to spend testing the code on the target device. In fact, when the target device becomes available for testing, you should only need to use it to verify the interfaces between the software and the hardware, and to confirm that the functionality which was verified on the desktop still operates as expected on the target device.



Dr. Adam Kolawa is the co-founder and CEO of Parasoft, a leading provider of Automated Error Prevention (AEP) software solutions. Kolawa's years of experience with various software development processes has resulted in his unique insight into the high-tech industry and the uncanny ability to successfully identify technology trends. As a result, he has orchestrated the development of several successful commercial software products to meet growing industry needs to improve software quality - often before the trends have been widely accepted. Kolawa, co-author of Bulletproofing Web Applications (Hungry Minds 2001), has contributed to and written over 100 commentary pieces and technical articles for publications such as The Wall Street Journal, CIO, Computerworld, Dr. Dobb's Journal, and IEEE Computer; he has also authored numerous scientific papers on physics and parallel processing. His recent media engagements include CNN, CNBC, BBC, and NPR. Kolawa holds a Ph.D. in theoretical physics from the California Institute of Technology, and has been granted ten patents for his recent inventions. In 2001, Kolawa was awarded the Los Angeles Ernst & Young's Entrepreneur of the Year Award in the software category.



 

 
 
 
ADVERTISEMENT
 
 
 
Ads by Google
 
OUR SPONSOR
   
   
 
 
 
   
   
     
 
 
         
     
 
Related Articles
   
EDA software incorporates multi-threaded router
DVB cores for low-cost FPGA
Single-chip laser navigation system simplify mouse design, manufacturing
Too many choices hinder parallel programming
Has optical technology’s 13-year victory over Moore’s Law come to an end?
Engaging teams in collaborative design process
Low power platform meets next-generation multimedia apps
Ethernet switch enables auto-sensing
Development tool for 8- and 32-bit microcontrollers
Audio processor for mobile phones
   
 
Product News
   
B&K Precision Introduces Compact Switching DC Power Supply
APEM Offers LPI Series ADA Compliant Pushbutton Switch
ESI Provides Optical Positioning System Featuring Zero Translation
Yaskawa's J1000 Drive with 1/8-7.5 hp
Sonar Transducer for Level Control from Hawk
Hoffer's HRT1 Rate Indicator/Totalizer
ASI Offers Spring Clamp Terminal Blocks
AAEON Releases Fanless Operator Panel PC-AOP-8120XT
SV Series Servo Drives from Applied Motion
Fairchild Introduces Voltage Translator for I2C Applications
   
  More News >>
 
     
     
 
         
 
 
     
         
 
spacer
Country Report
spacer
   
bullet

TAIWAN: Inductor technologies are developed independently

bullet

KOREA: Inductor manufacturers are highly competitive, but scarce

bullet

CHINA: World’s high-volume producer of transformer, coil and inductor

bullet

TAIWAN: Moderate but steady growth in LED market

bullet

KOREA: LED has a bright future in our homes

  more on country report >>
   
 
spacer
Our Sponsor
spacer
   
bullet
 
   
 
     
 
     
 
spacer
Features
spacer
   
bullet

DDR memories: Comparison and overview

bullet

Miniaturization in synchronous buck DC/DC applications employing DrMOS

bullet

SoC microcontrollers power portable medical device innovation

bullet

Part three: ESD protection

bullet

Switching power supplies go green

  more on features >>
   
 
Distribution
   

Value addition is the key in distribution

Distributors supply solutions, not just parts

Taiwan distributors compete by bolstering in-house R&D

“Nature of distribution is changing”

Top supply chain predictions in Asia Pacific for 2008

  more on distribution >>
   
 
     
         
 
 
     
         
 
Industry Focus
   

Ethernet adoption encourages open protocols

Managing Bluetooth profiles: A billion served

Enabling a true wireless multimedia home network

Bluetooth paves the way for truly wireless car interiors

Eliminating massive clock trees in SoC designs using GALS

  more on industry focus >>
   
 
Web Exclusives
   

Power-management solutions for telecom systems improve performance, cost, and size

Changing the network security playing field

WiMAX “personality pack” provides complete IEEE802.16 functionality

LED: A tiny light source with a bright future

SSDs: Carving a Niche in the Consumer and Enterprise Markets

  more on web exclusives >>
   
 
     
     
   
     
 
Semiconductors
   

Simulating the effect of blockers on data converter performance in wideband receivers

Decrease processor power consumption using a CPLD

Taking full advantage of new, low-power MCUs

Power train integration for 2007 and beyond: The true dawn of multi-chip modules

Wireless network options for industrial applications

  more on semiconductors >>
   
 
Field Applications
   

Test Equipment

Power Sources/Circuit Protection

Advanced Signal Processing Dramatically Improves Capability of Artificial Limbs

Voice Interface Technology for Hands-free Function in Automobiles

LXI: A Technology Leap for Test Instrumentation

  more on field applications >>
   
 
     
     
   
     
     
 
INDUSTRY LINKS
   
Photonics Association (Singapore)
bullet Singapore Industrial Automation Association (SIAA)