User manual

Project creation and build UM0036
154/385 Doc ID 7705 Rev 11
Note: If you specified to output in Hiware format in the Compiler or Assembler tabs, you must
specify a PRM script that is written for this output format in the Script Prm file name field.
You cannot use the Auto option.
When the Auto option is not checked, you have access to the Script Prm file name field. All
other fields are grayed, as they pertain only to automatic generation of the parameter file. In
the Script Prm file name field, identify the parameter file to use either by typing the path
name or using the browse button to locate it.
If you are using your own PRM file (Auto option is not checked) you should remove the
LINK command from the PRM file before building your application. The -O option in the
Linker command line is redundant with the LINK command in a PRM file. This results in a
warning during the linking of the application. For this reason, the LINK command is not
added to PRM files that are automatically generated by STVD.
For more information about creating parameter files manually, refer to the Metrowerks
SmartLinker User Manual.
Automatic segment declaration and section assignment
When the Auto checkbox is not checked, the Linker relies on script file (*.prm) that you
write for information about memory segments and the code sections that are assigned to
them.
When the Auto checkbox is checked, a configurable mapping is displayed in the Linker tab.
The mapping's first level elements are segments in the target microcontroller's memory.
Clicking on the "+" sign for a segment allows you to see the code sections that are assigned
to the segment. This mapping is used to automatically generate a linker script file (default
name Tar getSN am e.prm) that contains the declarations of memory segments and the code
sections assigned to each.
The automatically generated linker script file is not write protected and you can modify this
file in any editor. However, it is regenerated each time you build the application when the
Auto feature is enabled. If you make changes to the file and Auto is enabled, the changes
will be overwritten when STVD updates the file based on the mapping in the Linker tab.
To protect your modifications, rename the file. You can then use this file to link you
application in the same way that you would use a link script file that you wrote yourself (see
Configuring the Metrowerks linker PRM file on page 153).
Note: Using the ELF/DWARF 2.0 format to build your application will allow you to use both the
Auto PRM file generation option, or your previous PRM file. If you choose to use the
previous PRM file, note that it must correspond to the syntax used with the ELF/DWARF 2.0
format, notably the ELF syntax uses SECTION in place of SEGMENT. Also ensure that the
variables for the start07 routine are placed in a No.Init section.
If you have disabled the automatic generation of the parameter file, it will not be updated if
you make changes to your project, such as removing a source file. If you make such a
change you will have to edit the parameter file manually.
Modify the segment mapping and section assignments
You can add memory segments and delete or rename the segments that you have created.
Default segments cannot be deleted or renamed. However, you can modify their start and
end addresses.