Configuration is an important part of using SYS/BIOS, thus some time will be taken on it so that users gain a better understanding about it. When designers build their applications, one of the files in the project will have a .cfg extension and this is where the config information is kept. Configuration has a lot of uses and benefits. The programmer will use it for specifying which modules will be used in their application. For example, if an application uses the Clock module, this would be referenced in the configuration file to ensure that the Clock module code is linked in to the image. Also, the actual instances of each Clock can be specified at configuration time. A number of the BIOS modules are interdependent, the configuration tool will make sure that any dependent code is brought in as well. As an example, by specifying that Clock is being used, the config tool will automatically bring in the Software Interrupts module as well and create a corresponding SWI object for the Clock’s use. Also, configuration can be used to specify a number of options for both the module and each instance. There are two basic ways that the config file gets edited. The first is directly just like any other source code file. In this case, the .cfg file is not implemented in C, but rather in a scripting language based on Javascript. The nice thing about this is that programmers can use their favorite editor to edit the file and the scripting language provides a very rich way to implement it. In addition to the fundamental methods of creating objects and setting their parameters, the scripting language provides all the things that would be expected to control it, such as ‘if’ statements and looping constructs. The second way to set up a config file is to use the visual editor that comes with the CCS product. This tools is called “XGCONF” and provides an easier and more intuitive configuration technology. The results are presented in a visual manner and it also has the additional benefit of doing error checking on the fly, so errors will be seen almost immediately, rather than when the project is built.

