Debugging Embedded Systems 09
Debugging Embedded Systems 09
By Gokhan Tanyeri and Trish Messiter, Clarinox Technologies Pty Ltd, www.clarinox.com
Embedded systems are designed to accomplish a very specific task or group of tasks. Although no
single set of constraints will factor in all embedded systems, it is likely that the designer must
balance constraints such as robustness, small size and weight, real-time requirements, long life
cycle, low price, and low (or no) tolerance for malfunctions.
According to Robert Cravotta, Technical Editor – EDN, in his article “Shedding light on
embedded debugging”, 9/4/2008 “For each year of Embedded Systems Design’s annual market
survey of embedded-system developers, the single most requested area of improvement for
design activities is debugging tools. The percentage of respondents making this request has
remained steady at around 32% throughout the three years of the survey.”
There are many reasons why debugging is seen as the most problematic and costly issue of the
development cycle including increasing complexity, the balance of often conflicting constraints,
“increased inaccessibility to silicon, lack of bug reproducibility and more pressure to meet shorter
development schedule cycles.” (http://www.virtutech.com/news_events/pr/pr2007_05_14-b.html)
The trends in the industry that these reasons will continue to intensify and so new approaches to
debugging are required. In this paper we put forward some suggestions that have been found to
assist. The underlying principle is simple - use all available tools, low level and high level, to
isolate and identify the core issue. Our suggestions are:
Engineers by nature often prefer to start with a clear slate rather than reuse or adapt existing
designs. A balance however is required as companies in general require the development of
products rather than the development of increased fundamental knowledge of their engineers.
Companies too must produce new products in decreasing time frames. It is in the interest of the
companies for engineers to make best use of whatever tools and reusable code is at their disposal
to gain extra efficiencies and hence faster time to market. This is a fundamental conflict between
the engineering drive for what is best and the economic drive to be first. A sensible balance is
required.
An example how things change is to consider that a few decades ago it was common for RTOS to
be developed in-house for complex projects. These days the RTOS is far more likely to be
considered an off-the-shelf item
There are other efficiencies of similar nature however that are not yet so common place. Reuse of
in-house code is reportedly quite low. Some increased level of reuse where the code is of
sufficient standard and applicability makes commercial as well as technical sense.
Wireless protocols are becoming increasingly required in designs and it can be quite tempting for
an engineer to spend time learning the new wireless technology. However it may be more cost
effective for the company to acquire a tested wireless protocol and have the engineer develop
intellectual property at the level that sets them apart from the competition – the product
application level. Once the design phase is over, the company needs resources for the next
generation of the product not for maintaining the code for the wireless technology. It makes
economic sense to avoid being involved to follow new specifications and instead source this
technology when it is available. Let the vendor spend the tens of engineer-year effort to develop
and follow the technology for you.
Conclusion
While the ultimate goal may be to develop code that has zero issues, embedded software
engineers must live in the real and imperfect world where system complexity is such that
invariably issues will occur. The fact that debugging remains the most problematic and costly
issue of the development cycle as reported by industry survey indicates that engineers must digest
the idea of ever increasing complexity, prepare for the challenge from day one and acquire more
and better debugging tools to keep pace with the increasing demands on developments.
About Clarinox
Clarinox provides embedded systems tools, middleware, wireless and wired protocols, device
drivers and engineering services particularly for complex wireless embedded developments.
Clarinox have used the ClarinoxSoftFrame embedded wireless middleware platform over many
years and across a large variety of platforms and applications. The value of such tried and tested
software is;
• to reduce risks within commonly required code and hence reduce debug times
• to be able to use common architectural blocks (finite state machines, inter-process
communication, timers, integrated debugging)
• Ready to use wireless and wired protocols and I/O device interfaces
• Portability over almost any RTOS and processor
• Speedy time to market
Contact: [email protected]