Moxa RM-1602-T [49/52] Compilation for applications

Moxa KM-2430-T [49/52] Compilation for applications
ioPAC RTU Software RTU Programming
6-3
Compilation for Applications
To compile a simple C application, use the cross compiler instead of the regular compiler:
#arm-linux-gcc o example Wall g O2 example.c
#arm-linux-strip s example
#arm-linux-gcc -ggdb o example-debug example.c
Most of the cross compiler tools are the same as their native compiler counterparts, but have an additional
prefix that specifies the target system. In the case of x86 environments, the prefix is i386-linux-. In the case
of the ioPAC RTU controller, the prefix is arm-linux-.
For example, the native C compiler is gcc and the cross C compiler for ARM in the ioPAC is arm-linux-gcc.
Moxa provides cross compiler tools for the following native compilers. Simply add the arm-linux- prefix.
ar Manages 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)

Содержание

Скачать