More on Real-time Testing

Embedded systems can benefit from testing on the host prior to testing on the target system for the following reasons.

  • The host generally has a better development and debugging environment than the target which makes the process of edit, compile, link, and test go faster.
  • All the overhead of target system debugging is eliminated — downloading, acquiring the ICE which may be shared with others on the project, and so forth.

Some parts of real-time applications may be ideally suited for host testing. For example, consider a real-time application that, among other things, requires a trivial in memory real-time database. The database could be coded and debugged on the host with no need for the target system.

Other parts of the real-time application may require a small bit of fudging before host testing can take place. Consider the requirement to periodically read an analog channel every 20 ms and report an error if the channel reading is out of range. There are two problems: (1) the host does not allow for multi-tasking or timing increments down to 20 ms, and (2) there are no analog channels to read. The first problem is solved if your kernel will run on the host computer. If this is not the case, then the sample rate can be ignored and the channel can be sampled in a tight loop. The second problem can be solved by writing a function called readChannel, which on the host returns a meaningful random number. When running on the target system the function would be changed to read the actual value. One may be tempted to using conditional compiles in this type of situation, but we recommend against it - it makes for messy code.

Overall testing on the host requires that the kernel/OS run on the host as well as the target, otherwise, the dynamics of multi-tasking and inter-task communication cannot be tested. If the kernel/OS does not run on the host, the best you can do is test tasks individually and integrate them together on the target for final testing.

View Entire Paper | Previous Page | White Papers Search

If you found this page useful, bookmark and share it on:

 
Embedded Star Newsletter
Don't have time to visit Embedded Star everyday? Then sign up for our free newsletter. We'll send you an email when we have something to share with you. Your email address will be kept confidential and we will not share, sell, or rent it to anyone. You can unsubscribe at any time by clicking a link in the email.

Enter your email address to sign up for our free newsletter:   

If you are familiar with RSS feeds, you can also sign up for our free blog feed. Our RSS feed is updated in real-time while our newsletter is updated daily.