SLAU131V October 2004 – February 2020
Usually, when you want to specify a file as linker input, you simply enter the filename; the linker looks for the file in the current directory. For example, suppose the current directory contains the library object.lib. If this library defines symbols that are referenced in the file file1.c.obj, this is how you link the files:
cl430 --run_linker file1.c.obj object.lib
If you want to use a file that is not in the current directory, use the --library linker option. The --library option's short form is -l. The syntax for this option is:
--library=[pathname] filename
The filename is the name of an archive, an object file, or linker command file. You can specify up to 128 search paths.
The --library option is not required when one or more members of an object library are specified for input to an output section. For more information about allocating archive members, see Section 8.5.5.5.
You can adjust the linker's directory search algorithm using the --search_path linker option or the MSP430_C_DIR environment variable. The linker searches for object libraries and command files in this order: