Download Microcross i.MX GNU X

Transcript
Section 4. How to Use i.MX GNU X-Tools
The input file’s name determines where it goes into the machine. The ‘.c’, ‘.S’, ’.cc’, ‘.cpp’ and ‘.C’ files go to the
preprocessor, ‘.i’ and ‘.ii’ files go straight to the compiler, and so on. Compilation options determine which stage of
the machine produces output (i.e., how many stages of the machine you run). The ‘–S’ means that you stop after
the assembler and the output filename ends with ‘.s’. If you keep this picture in mind, the compiler’s machinations
will not seem so strange; you will stop seeing preprocessing, compilation, assembly, and linking as separate steps
and come to see compilation as one big assembly line, for which GCC is the production manager.
The following tools listed in Tables 4.2, 4.3, and 4.4 are the main tools for developing projects with a i.MX GNU XTools Toolsuite.
Table 4.2. i.MX GNU X-Tools Compiler and Development Tools
Tool
as
cpp
gcc
gdb
gdbtk
g++
gasp
ld
Description
GNU assembler
C preprocessor
Optimizing ANSI compliant GNU Compiler Collection (controller of all compilation)
GNU debugger for source and assembly debugging with command line
Debugger using a graphical user interface called Visual GDB (a.k.a. Insight)
Optimizing ISO tracking GNU C++ compiler
GNU assembler preprocessor
GNU Linker
Table 4.3. i.MX GNU X-Tools Libraries
Tool
libc
libgloss
libm
libstdc++
Description
Non-restricted ANSI C runtime library (Newlib for cross-development)
Support library for embedded targets (board support for cross-development);
(deprecated) will be replaced by a future product
Non-restricted C math subroutine library (Newlib for cross-development)
GPL C++ class library, implementing the ISO 14882 Standard C++ library
Table 4.4. i.MX GNU X-Tools Binary Utilities
Tool
addr2line
ar
diff
diff3
Sdiff
make
nm
objcopy
objdump
patch
ranlib
readelf
run
size
strings
strip
Utility Description
Converts addresses into file names and line numbers
Creates, modifies and extracts from object code archives
Comparison tools for text files
Compilation control program
Lists symbols from object files
Copies and translates object files
Displays information from object files
Installation tool for source fixes
Generates index to archive contents
Displays information about ELF format object files
Standalone simulator
Lists file section sizes and total sizes
Lists printable strings from files
Discards symbols
Target Dependent
yes
yes
no
no
yes
yes
yes
no
yes
no
yes
yes
yes
yes
The Adobe Acrobat (PDF) files listed in Table 4.5 are available on the i.MX GNU X-Tools or Cygwin (docs
directory) CD-ROM for reference or hard-copy duplication.
i.MX GNU X-Tools User Guide ■ 41