
UC-8100-LX Software Manual
Programmer's Guide
6-4
#export MANPATH=“/usr/local/arm-linux-gnueabihf-4.7-20130415//man:$MANPATH”
Alternatively, you can add the same commands to
$HOME/.bash_profile
to cause it to take effect for all login
sessions initiated by this user.
NOTE
The toolchain will be installed at /usr/local/arm-linux-gnueabihf-4.7-20130415/. This means that the original
/usr/local/arm-linux-gnueabihf-4.7-20130415/ path will be overwrited. If you have installed an old arm-linux
toolchain, you could have to rename the original one before you install the new one.
134B
Obtaining Help
Use the Linux
man
utility to obtain help on many of the utilities provided by the tool chain which is located at
/usr/local/arm-linux-gnueabihf-4.7-20130415/share/doc/gcc-linaro-arm-linux-gnueabihf/man/. For example
to get help on the
arm-linux-gnueabihf-gcc
compiler, issue the command:
moxa@Moxa:~$ man
/usr/local/arm-linux-gnueabihf-4.7-20130415/share/doc/gcc-linaro-arm-linux-gnueab
ihf/man/man1/arm-linux-gnueabihf-gcc.1
Cross Compiling Applications and Libraries
To compile a simple C application, just use the cross compiler instead of the regular compiler:
#arm-linux-gnueabihf-gcc –o example –Wall –g –O2 example.c
#arm-linux-gnueabihf-strip –s example
#arm-linux-gnueabihf-gcc -ggdb –o example-debug example.c
52B
Test Program—Developing Hello.c
In this section, we use the standard “Hello” programming example to illustrate how to develop a program for
the UC-8100-LX.
#include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
The following 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)
Содержание UC-8100-LX
Страница 8: ...UC 8100 LX Software Getting Started 2 2...
Страница 38: ...UC 8100 LX Software Manual Security On UC 8100 LX 4 2...