Configuring Command-Line Tools. NXP CodeWarrior Development Studio
Quảng cáo
Quảng cáo
Chapter 2
Using Build Tools on the Command Line
CodeWarrior build tools may be invoked from the command-line. These command-line tools operate almost identically to their counterparts in an integrated development environment (IDE). CodeWarrior command-line compilers and assemblers translate source code files into object code files. CodeWarrior command-line linkers then combine one or more object code files to produce an executable image file, ready to load and execute on the target platform. Each command-line tool has options that you configure when you invoke the tool.
•
Configuring Command-Line Tools
•
•
•
2.1 Configuring Command-Line Tools
This chapter explains:
•
Setting CodeWarrior Environment Variables
•
Setting the PATH Environment Variable
2.1.1 Setting CodeWarrior Environment Variables
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
Freescale Semiconductor, Inc.
39
Configuring Command-Line Tools
Use environment variables on the host system to specify to the CodeWarrior command line tools where to find CodeWarrior files for compiling and linking. The table below describes these environment variables.
Table 2-1. Environment variables for CodeWarrior command-line tools
CWFolder
MWCIncludes
MWLibraries
The environment variable...
specifies this information
CodeWarrior installation path on the host system.
Directories on the host system for system header files for the
CodeWarrior compiler.
Directories on the host system for system libraries for the
CodeWarrior linker.
A system header file is a header file that is enclosed with the "<" and ">" characters in include directives. For example
#include <stdlib.h> /* stdlib.h system header. */
Typically, you define the
MWCIncludes
and
MWLibraries
environment variables to refer to the header files and libraries in the subdirectories of your CodeWarrior software.
To specify more than one directory for the
MWCIncludes
and
MWLibraries
variables, use the conventional separator for your host operating system command-line shell.
NOTE
CWFolder
environment variable specifies the CodeWarrior installation path on a host system. Verify the CodeWarrior installation path on the host system before setting the
CWFolder environment variable.
Listing 2-1. Setting environment variables in Microsoft® Windows® operating systems
rem Use ; to separate directory paths set CWFolder=Replace this text with the CodeWarrior installation path on the host system.
set
MWCIncludes=%CWFolder%\PA_Support\ewl\EWL_C\include;%CWFolder%\PA_Supp ort\ewl\EWL_C++\include;%CWFolder%\PA_Support\ewl\EWL_Runtime\Runtime_
PA\Include set MWLibraries=%CWFolder%\PA_Support\ewl\lib
2.1.2 Setting the PATH Environment Variable
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
40 Freescale Semiconductor, Inc.
Tải xuống
Quảng cáo