Moxa DA-662A-I-8-LX [52/63] Device api

Moxa DA-662A-I-8-LX [52/63] Device api
DA-662A Series Software Programmer's Guide
5-5
Cross Compiling Applications and Libraries
To compile a simple C application, just use the cross compiler instead of the regular compiler:
#arm-none-linux-gnueabi-gcc o example Wall g O2 example.c
#arm-none-linux-gnueabi-strip s example
#arm-none-linux-gnueabi-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 DA-662A series boards, it is arm-none-linux-gnueabi-.
For example, the native C compiler is gcc and the cross C compiler for Moxa Marco in DA-662A series is
arm-none-linux-gnueabi-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)
Device API
The DA-662A series supports control devices with the ioctl system API. You will need to use include
<moxadevice.h>, and use the following ioctl function.
int ioctl(int d, int request,…);
Input: int d - open device node return file handle
int request argument in or out
Use the desktop Linux‘s man page for detailed documentation:
#man ioctl

Содержание

Похожие устройства

Скачать