| |||
| Home > Overview of the ARM Compiler toolchain > Using a text file to specify command-line options | |||
Some operating systems restrict the length of the command line. You can either:
specify options that extend beyond this limit by including them in a text file
place all of your command-line options in a text file.
To use a text file to specify command-line options:
Create a text file containing the required command-line options. The options must be specified on a single line. For example:
--debug --cpu=ARM926EJ-S
Use the --via command-line option
to specify the file location containing the required options. For
example:
armcc --via myoptions.txt
You can use any filename extension, or no filename extension.
The compiler reads the command-line options from the specified file and combines them with any additional options you have specified on the command-line. The priority given to a command-line option depends on:
the command-line option
the position of the --via option on the command-line.
To see the priority of the options, specify the --show_cmdline option.
For example, if armcc.txt contains the options --debug
--cpu=ARM926EJ-S:
armcc
-c --show_cmdline --cpu=ARM7TDMI --via=armcc.txt hello.c [armcc --show_cmdline
--debug -c --cpu=ARM926EJ-S hello.c]
In this case, --cpu=ARM7TDMI is not used
because --cpu=ARM926EJ-S is the last instance
of --cpu on the command-line.
armcc --via=armcc.via -c --show_cmdline
--cpu=ARM7TDMI hello.c [armcc --show_cmdline --debug -c hello.c]
In this case, --cpu=ARM926EJ-S is not used
because --cpu=ARM7TDMI is the last instance of --cpu on
the command-line. In addition, --cpu=ARM7TDMI is
not shown in the output, because this is the default option for --cpu.
Assembler Reference:
Compiler Reference:
Linker Reference:
Creating Static Software Libraries with armar:
Using the fromelf Image Converter: