User manual

ST assembler ST Assembler-Linker
36/89 Doc ID 11392 Rev 4
D option
Note: If you specify multiple -D switches, they should always be separated by a space.
I option
Description: Allows to specify a string that is to be replaced by another during the
assembly.
A blank space or = is required between the string to be replaced and the
replacement string. For example -D <string> 2 is the same as -D
<string>=2.
It is possible to specify only one argument (-D <string>). In which case,
<string> is replaced with 1.
This is extremely useful for changing the assembly of a module using #IF
directives, because you can change the value of the #IF tests from the
assembler's command line. It means that you can run the assembler with
different -D switches on the same source file, to produce different codes.
Format: ASM <file> -D <string> <string> or
ASM <file> -D <string>=<string> or
ASM <file> -D <string>
Example: ASM ex1 -D EPROM 2 -D RAM 3
ASM ex1 -D EPROM=2 -D RAM=3
In both cases, EPROM is replaced with 2, RAM is replaced with 3.
ASM ex1 -D EPROM
In this case EPROM is replaced with 1.
Description: Used to specify the list of search paths for files that are included (with
#include) or loaded (with #load). The paths can be separated by the ;
character and the path list must be enclosed within double quotes. You can
also enter multiple include paths by using the -I option more than once and
separating each with a blank space.
The current working directory is always searched first. After that, the ST
assembler searches directories in the same order as they were specified
(from left to right) in the command line.
Format: ASM -I="<path1>;<path2>;...;<pathN>" call or
ASM -I="<path1>" -I="<path2>"... -I="<pathN>" call
Example: ASM -I="include;include2" call or
ASM -I="include" -I="include2" call