Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
?
EE Times-Asia > Sensors/MEMS
?
?
Sensors/MEMS??

Virtual prototype for Android HW-SW dev't (Part 3)

Posted: 19 Dec 2012 ?? ?Print Version ?Bookmark and Share

Keywords:hardware abstraction layer? sensors? debug? API?

An easy to use software library exists for the WiiMote which allow applications to extract the currently read sensor data from the WiiMote controller. Using this library, a small application translates and forwards the sensor data into the sensor controller sub-system by using the external connectivity APIs provided by the VP. With this method, real world data can be supplied to the device under test.

As shown in figure 3, the standard SDK for Android can be used in order to upload and debug the application using the underlying sensor HAL, device driver, and Cortex-M3 based sub-system.

The connection between the SDK and the VP is now established in run mode because the SDK connects (via Ethernet Virtual I/O) to the Android debug bridge (adb), which is an application on the Android file system. While debugging, the user can supply sensor data by simply operating the WiiMote controller.

Figure 3: Using the SDK with the VP as a backend.

Sensor debug and test scenariosrecord and replay
A problem with external stimuli is the repeatability of scenarios. As an example, a bug is only triggered under circumstances that are very hard to reproduce, such as a specific combination and arrival sequence of different sensor data sets. Using a VP, the stimuli supplied from external sources such as the WiiMote can be recorded and replayed. While recording, a time-stamp is obtained for each data set. This time-stamp corresponds to the time that is simulated on the virtual device and not the time on the wall clock. During replay, the data can be supplied at the exact points in time, as shown in figure 4.

Figure 4: Scripted scenario example.

This allows for a fully deterministic repetition of scenarios, which is not only useful for debugging, but also for the automation of complex tests where user input is typically hard to incorporate. Today's highly context sensitive applications demand the ability to integrate stimuli from the external world (location, sensors, camera) into the use cases needed for testing.

When something goes wrong, the bird's eye view provided by the VP is again very helpful as shown in figure 5. Here, the Linux threads are traced along with the Android activities and the log messages coming from Android, the kernel, and even the sensor control sub-system if needed.

Figure 5: VP Analysis for Android.

Conclusion
The era of serialised hardware and software developmentCwhere the vast majority of software is developed and verified after the silicon design is completeCis declining in favour of new methods for early software development giving embedded developers access to the low level capabilities required to develop software earlier, achieve greater product quality, and exceed time-to-market requirements for the constantly changing handset market.

About the author
Achim Nohl?is a technical marketing manager for Virtual Prototypes at Synopsys. He publishes technical articles, conference papers, and blog posts about developing embedded software using virtual prototypes. His speciality is bringing up firmware, drivers and operating systems for the most recent CPUs and IPs. Achim holds a degree in Electrical Engineering from the Institute for Integrated Signal Processing Systems at the Aachen University of Technology, Germany. Before joining Synopsys, Achim worked in various engineering and marketing roles for LISATek and CoWare.

To download the PDF version of this article, click here.


?First Page?Previous Page 1???2



Article Comments - Virtual prototype for Android HW-SW ...
Comments:??
*? You can enter [0] more charecters.
*Verify code:
?
?
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?
Back to Top