User`s guide
Using Custom Source Files in Generated Projects
Using Custom Source Files in Generated Projects
In this section...
“Preparing to Replace G enerated Files With Custom Files” on page 3-65
“Replacing Generate d Source Files with Custom Files When You Generate
Code” on page 3-67
The Board custom code options on the Board Info pane in the model’s
Target Preferences block enable you to replace a generated file with a custom
file you p rovide. By replacing a file, you can modify the output of the code
generation process to suit your needs. For file replacement during the code
generation process to work, your custom filemusthavethesamenameas
the file to repla ce.
The following sections show you h ow to:
• Identify the file to replace — “Preparing to Replace Generated Files With
Custom Files” on page 3-65
• Create the custom replacement file — “Preparing to Replace Generated
Files With Custom Fil es” on pag e 3-65
• Configure the target preferences to use the custom file when you generate
a project — “Replacing Gener ated Source Files with Custom Files When
You Generate Co de” on page 3-67
For more information about the target preferences and the Board custom code
options, refer to Target Preferences in the online Help system.
Preparing to Replace Generated Files With Custom
Files
To change the content of a generated project, use custom code replacement
replace a generated file in the project. By replacing a generated file in a
project, you can make changes like the following in your generated project:
• Edit the file that contains linker directives to change the linking process,
such as mapping memory differently.
3-65