SLAU131V October 2004 – February 2020
Linker command files allow you to put linker options and directives in a file; this is useful when you invoke the linker often with the same options and directives. Linker command files are also useful because they allow you to use the MEMORY and SECTIONS directives to customize your application. You must use these directives in a command file; you cannot use them on the command line.
Linker command files are ASCII files that contain one or more of the following:
To invoke the linker with a command file, enter the cl430 --run_linker command and follow it with the name of the command file:
cl430 --run_linkercommand_filename |
The linker processes input files in the order that it encounters them. If the linker recognizes a file as an object file, it links the file. Otherwise, it assumes that a file is a command file and begins reading and processing commands from it. Command filenames are case sensitive, regardless of the system used.
Example 1 shows a sample linker command file called link.cmd.