Upgrading Target Configuration File

Navigation:  Targets >

Upgrading Target Configuration File

Previous pageReturn to chapter overviewNext page

Introduction

The target configuration file format in 20-sim 4C 2.1 has been changed. This document describes the changes that need to be made to upgrade an existing 20-sim 4C 2.0 tcf to a 20-sim 4C 2.1 tcf. Although the tcf format is backward compatible tcf files from 2.0 may not work in 2.1. The tcf file defines how and which source files are used, parsed, configured and compiled. 20-sim 4C 2.1 has changed to allow multiple sources (20-sim, Matlab, Scilab) and has multiple targets (Bachmann, TS-ARM, ...) and the process of configuration and compilation has been generalized.

 

The following sections of the TCF need to be updated.

GENERAL section

COMPILERASSISTANT section

COMPONENTS section

 

GENERAL section

VERSION

Updated the <VERSION> tag to 2.1.0

 

<VERSION>2.1.0</VERSION>

 

The version tag is used by 20-sim 4C to check whether this tcf is compatible or not.

ICON

This is a new tag that will allow to use a target specific icon in the target overview dialog. This tag may be omitted.

 

<ICON>Bachmann.ico</ICON>

FILES_TO_COPY

This tag defines which files are to be copied. This tag is backward compatible and will copy the files, however the TOKENPARSER tag is preferred in 20-sim 2.1.

 

If the TOKENPARSER section is to be used make this tag empty. (An additional file for a custom target may be added in this tag)

 

<FILES_TO_COPY />

FILES_TO_PARSE

This tag defines which files are to be parsed. This tag is backward compatible and will parse the files, however the TOKENPARSER tag is preferred in 20-sim 2.1.

 

If the TOKENPARSER section is to be used make this tag empty. (An additional file for a custom target may be added in this tag)

 

<FILES_TO_PARSE />

FILES_TO_TARGET

For Bachmann targets the content of this tag has been changed.

There is support for multiple modules at the same time, hence the 'xxsim.m' module must not be hard-coded anymore.

A model configuration file is necessary. (This is required for logging)

 

<FILES_TO_TARGET>

  <FILE>%FC_MODELBUILDDIR%\%FC_MODELNAME%.m</FILE>

  <FILE>%FC_MODELDIR%\%FC_MODELNAME%.mcf</FILE>

</FILES_TO_TARGET>

TOKENS

The TOKENS tag has been changed instead of sequence of TOKEN tags a sequence of TOKENPARSER tags will be used. (Note TOKEN tags may still be given but are ignored)

 

The TOKENPARSER tag defines a configuration file for the Token parser that will copy and parse the required source files. Note that the TOKENPARSER tag makes the FILES_TO_COPY and FILES_TO_PARSE tags superfluous.

 

<TOKENS>

  <TOKENPARSER>TokenParser.xml</TOKENPARSER>

</TOKENS>

INCLUDES

For Bachmann targets, the content of this tag has been changed and now holds a number of required files to be included.

 

<INCLUDES>

  <![CDATA[

  #include <mtypes.h> /* M1 include files */

  #include <msys_e.h>

  #include <mio.h>

  #include <mio_e.h>

  #include <res_e.h>

  #include <svi_e.h>

  #include <log_e.h>

  #include <prof_e.h>

  #include <xxsim_int.h>

  ]]>

</INCLUDES>

COMPILERASSISTANT section

The content of this section has been changed for all targets. The toolchains for the various targets is no longer located in the 'contrib' directory but in the 'toolchain' directory, hence the COMMAND needs to be updated.

 

Replace 'contrib' with 'toolchain' for all the commands.

 

COMPONENTS section

The components section holds the configuration for each Input/Output module (component). Additional tags have been added in 20-sim 4C 2.1 for better isolation of components, make a components self-containing and removing the need of entries in the GENERAL section.

The following tags have been added and are optional for backward compatibility :

 

Name

Description

<INCLUDES>

includes

<CONSTRUCT>

Code that is called once to construct this component

<DESTRUCT>

Code that is called once to destruct this component

 


NOTE: The Bachmann target configuration uses the <TERMINATE>, <CONSTRUCT> and <DESTRUCT> tag for all I/O components. Make sure you update your own configuration accordingly to make sure all I/O components are properly initialized and deinitialized.