3.2.1. Using a sample model as a template

To write a new model, the best procedure is to copy one of the supplied models and then edit the copy. To do this:

  1. Select which model is closest to the model you want to write. This might be, for example, Timer.

  2. Copy the source file, in this case timer.c, with a new name such as mymodel.c.

  3. Copy the make subdirectory, in this case timer.b, with a corresponding new name, in this case mymodel.b.

  4. Find the Makefile for your model (see Location of files).

    Load Makefile into a text editor and change all instances of timer to mymodel.

You can now edit MyModel.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI0058D