Download Moxa UC-7402
Transcript
UC-7402 User’s Manual Programmer’s Guide Obtaining help Use the Linux man utility to obtain help on many of the utilities provided by the tool chain. For example to get help on the armv5b-linux-gcc compiler, issue the command: #man armv5b-linux-gcc Cross Compiling Applications and Libraries To compile a simple C application, just use the cross compiler instead of the regular compiler: #mxscaleb-gcc –o example –Wall –g –O2 example.c #mxscaleb-strip –s example #mxscaleb-gcc -ggdb –o example-debug example.c Tools Available in the Host Environment Most of the cross compiler tools are the same as their native compiler counterparts, but with an additional prefix that specifies the target system. In the case of x86 environments, the prefix is i386-linux- and in the case of UC-7402 Xscale boards, it is mxscaleb-. For example the native C compiler is gcc and the cross C compiler for Xscale in UC-7402 is mxscaleb-gcc. The following cross compiler tools are provided: ar Manage archives (static libraries) as Assembler c++, g++ C++ compiler cpp C preprocessor gcc C compiler gdb Debugger ld Linker nm Lists symbols from object files objcopy Copies and translates object files objdump Displays information about object files ranlib Generates indexes to archives (static libraries) readelf Displays information about ELF files size Lists object file section sizes strings Prints strings of printable characters from files (usually object files) strip Removes symbols and sections from object files (usually debugging information) 5-3