Banners in the Generated Code
ASCET provides the possibility to insert user-defined banners in the *.c and *.h files generated via the File > Export > Generated Code menu option or via the Build > View Generated Code, > Experiment, or – in the project editor – > Build All or > Rebuild All menu options.
For that purpose, two banner template files (named, e.g., banner.template.c for generated *.c files and banner.template.h for *.h files) can be assigned to a project or default project, in the Build node of the Project Properties window.
The default location for banner template files is the target root directory ETAS\ASCET6.4\target. If you use the default location, but no banner.template.c or banner.template.h files are found when one of the menu options mentioned above is called, default template files will be generated for both. You can adapt these files to create your own banners.
Note |
|---|
If you enter a non-default location, or non-default file names, in the Build node, and these files are not found during code generation, no default files are created. |
A banner template file can contain fixed text and macros. The macros will be expanded when the banner is inserted into a code or header file. In addition to the macros in the default template file, the macros listed in the
following table
can be used.
Note |
|---|
Changes in a banner template file apply to all projects that use this particular banner template file. |
In previous ASCET versions, the inserted banners could not be modified by the user. To provide compatibility with previous versions, this behavior can be re-activated for individual targets in ASCET‑SE (see Activating Old Behavior for Banners). The cs_overload.pm file in the ETAS\ASCET6.4\target\trg_<targetname>\cp_rules\ custom directory contains the switch to the old behavior.
See also