logo slogan
Phaedsys Logo

MTE Logo


The CASE for Engineering
May 2003

By Chris Hills

Chris Hills


There has been a recent trend (some might say a head long rush) into CASE tools, auto coding and code generation in the embedded world. These CASE tools and auto generation tools are, by and large, designed for large systems. Their pedigree is often in the 32-bit world and desktop systems. The problem with small-8/16 bit embedded systems is that they are somewhat unusual. They have direct access to hardware; don't usually have an OS; they have [strange] extensions to and differences from "standard" C; often a real time element coupled with restricted resources, you can't just "shove in some ram" to do the testing.

Also these CASE, simulation and auto code tools are the superstructures that can only be used on a solid foundation. The problem is that, if incorrectly set up without a solid basis and underlying embedded tools supporting them then these tools can be disastrous. Many of these tools use instrumented code. For Real-time systems this can at best make the answers "approximate". The other problem is that you may have to ship the code "as tested" with an overhead of hooks, links and debug code that may or may not have been automatically generated to the same high standards of your code…. So what is the way out of the mire for embedded engineers?

Well most of you have the tools you need in front of you already: The In-Circuit-Emulator. Traditionally seen as a "debug" tool they are not intrusive and run at full speed on the target code (and hardware) that will be shipped. Good ICE like the have a Tool Control Language… OK so it's a script language, but it has the look and feel of C. Many Engineers have used the ICE script language to write macros to map memory, set up ports and peripherals etc. However, scripts can do so much more! It can be used to run a complete series of tests and even write the test result sheets. Almost anything you can do with C you can usually do with ICE control script.

At this point it becomes possible to do real time unit and system tests that also test the code as well as the hardware. Though ICE usually can run the code "stand-alone" without the target HW… (in hard real time of course) Something simulators and CASE tools can only simulate and not in real time at that!

Recently there has been a realization among some of the CASE tool vendors that they had to do better support for the embedded and real time market. Real-time means just that. Using the debuggers the better CASE and test tools can interface to the mid and high end In-Circuit-Emulators. Thus they can exercise the code in a non-intrusive and real time manner. Also it has required them using the appropriate target compiler C is not as portable as people think!

Phaedrus Systems have realized the need for these tools have moved into testing tools that are designed for real time & embedded test.

The Tessy tool, designed by engineers from Daimler Chrysler, will completely automate unit testing using an ICE. Tessy works with most good ICE. It works in several phases. It starts with the (unit) test plan. Tessy has a Classification Tree Editor. This is a graphical editor for test cases. This is a wonderful tool that will let you easily get to 100% coverage of test cases…

So far so good now comes the catch… Some work to do. The numbers and values for the test cases have to be put in. The CTE test cases can either be sent to Tessy or to a spreadsheet. If you send them to a spreadsheet you have a large sheet that you need to put the numbers into the cells. This is where macros help. You can convert 1-10 degrees C into the actual values the compiler needs etc. This then means that there are fewer errors and if the parameters are changed the values are automatically updated. The spreadsheet is then imported into Tessy



Tessy has to be interfaced to both the compiler and the ICE and shown where the source code is. Obviously this does involve some work but only needs to be done once. The unit to test is selected and the test cases imported from the CTE can then be populated (or the spread sheet imported). Then it is simply the case of pressing the button. Tessy automatically builds a test wrapper and runs the tests on the ICE (and the target if that is fitted to the ICE) There is no modification to the tested code and it runs in real time. Individual tests or all the tests for a unit can be run at one time. Test documentation is automatically generated. Regression tests are just the press of a button.

So when looking at testing tools start with the ICE and give me a call about about Tessy. Also ask your CASE and simulator suppliers if they can interface to an ICE.



Author Details and contact


Eur Ing Chris Hills BSc CEng MIET MBCS MIEEE  FRGS   FRSA is a Technical Specialist and can be reached at This Contact


Copyright Chris A Hills  2003 -2008
The right of Chris A Hills to be identified as the author of this work has been asserted by him in accordance with the Copyright, Designs and Patents Act 1988