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 le with a custom
le you p rovide. By replacing a le, you can modify the output of the code
generation process to suit your needs. For le replacement during the code
generation process to work, your custom lemusthavethesamenameas
the le to repla ce.
The following sections show you h ow to:
Identify the le to replace “Preparing to Replace Generated Files With
Custom Files” on page 3-65
Create the custom replacement le “Preparing to Replace Generated
Files With Custom Fil es” on pag e 3-65
Congure the target preferences to use the custom le 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 le in the project. By replacing a generated le in a
project, you can make changes like the following in your generated project:
Edit the le that contains linker directives to change the linking process,
such as mapping memory differently.
3-65